OPNsense Forum

Archive => 21.1 Legacy Series => Topic started by: Bytechanger on May 07, 2021, 10:12:04 AM

Title: Wireguard, refresh DNS to Endpoint?
Post by: Bytechanger on May 07, 2021, 10:12:04 AM
Hi,

I´ve set up an connection to an wireguard server. He has an dynamic ip, so I set Endpoint to an dyndns-address.
It works, but when the server gets at night a new ip, my wireguard doesn´t refresh the Endpoint IP.

So is there a way to restart this wireguard connection to get this new dns inside (with monit or else?).

Greets

Byte
Title: Re: Wireguard, refresh DNS to Endpoint?
Post by: lfirewall1243 on May 07, 2021, 10:51:10 AM
I had the same problem.

I looked when the other side gets a new IP, mostly its every day at the same time.
A few minutes later i run a cron job whch restarts wireguard

Wireguard has no support for dyndns. The cron job at the bottom solved my problem
https://github.com/opnsense/plugins/issues/2268
Title: Re: Wireguard, refresh DNS to Endpoint?
Post by: Mondmann on May 07, 2021, 04:04:57 PM
@lfirewall1243

Hi guys,
thanks a lot for this food for thought.
This solution was just too simple for me to come up with.
Zitat from lfirewall1243:
"Created a cron Job which is rebooting the Wireguard Service after 00:01 where the IP changes always"

Greetings from Germany