split-vpn
split-vpn copied to clipboard
dynamic IP server
When using wireguard as a client to connect to a server with a dynamic IP and its IP is changed, Is there any functionality that will check if the connection is working and if not restart the connection which will resolve the new servers IP and connect again?
Hi @ahmaddxb,
Unfortunately there's nothing built-in to do that transparently, but if you add PersistentKeepalive = 25 in your wireguard config Peer section, you can make a very simple script to watch the wireguard tunnel for the latest handshake and if it was more than 25 seconds ago then bring the tunnel down and back up again.
I can help you make this watcher script if you're having trouble figuring it out, if it's something you want to do.
Hi @ahmaddxb,
This issue has become stale so I'm closing it, but if you ever have any more questions, feel free to re-open!