Hi. i have a wireguard server with dynamic ip. Client connects using ddns.
Client is travel-box. It routes all the traffic via wg interface.
Persistence turned on, 25 sec timeout.
wireguard_watchdog script runs every minute - In case server ip changes it picks up new ip address and updates wg0 configuration.
BUT... tunnel stops working when server IP has changed.... because there is old static route and no new route.
Routes before IP changes:
1) default via wg0
2) [server ip] via [local gateway ip]
so, after server gets new ip, tunnel config got updated automatically by watchdog, but static routes not.
If i manually add new static route
[new server ip] -> via [local gateway ip]
then tunnel starts working fine.
What am i doing wrong?
Is there better wireguard_watchdog version which takes care of new static route as well?
p.s. its openwrt 18.06