Wireguard, refresh DNS to Endpoint?

Started by Bytechanger, May 07, 2021, 10:12:04 AM

Previous topic - Next topic
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

May 07, 2021, 10:51:10 AM #1 Last Edit: May 07, 2021, 11:31:08 AM by lfirewall1243
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
(Unoffial Community) OPNsense Telegram Group: https://t.me/joinchat/0o9JuLUXRFpiNmJk

PM for paid support

@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
OPNsense 22.7.9*WG-kmod*OpenSSL*OpenVPN* AdGuardHome*i7-7700*32GB*256SSD*ix0-1, igb0-4, em0*OpenVPN+Wireguard WG0, WG1*NetGear ProSafe XS508*AP Netgear WAX610*alles echtes Blech* Sorry, my English is translated via app*