Practices - Wireguard on DHCP WAN

#1

All,

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?

#2

ifdown/ifup ?

3 Likes
#3

lol, thanks @trendy, brain fart

#4

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.

2 Likes
closed #5

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