Practices - Wireguard on DHCP WAN


I have a few WIreguard interfaces; and I want to test bringing them up/down at scheduled intervals via cron. This is because the WAN interface on the "server-end" is DHCP-based and may change it's public IP. Using a hostname in the config does not cause an update after the link is up.

Can someone give me the command-line-equivalent to the "Stop" and "Connect" buttons in LuCI for WG interfaces?

ifdown/ifup ?


lol, thanks @trendy, brain fart

That's known (if not even intended) behaviour. You may want to have a look at wireguard_watchdog that comes with wireguard-tools that's specifically intended to solve this problem. Cronjobbing ifup of the wireguard interface would solve that, too, but rather bluntly and at the risk of interrupting a perfectly fine existing connection.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.