I use Wireguard on my router as a Client in my house in the mountains. I have the problem, when I restart the ruouter where I have installed wireguard server I lose the connection with the client.
Is there a way to renew the client wireguard connection automatically (example: every 8 hours) on Openwrt?
This allows me to solve the problem by waiting for a maximum of 8 hours.
Hi.
Close situation that have with mikrotik client.
Solution for most of mikrotik users, crontab running on client side, with a simple script running every 5/10 mns, with a ping to internal ip of your router server. If ping fail, restart wireguard from client side.
Not a clean solution, but does the job.
I router I have a GL.iNet GL-AR750. When the server changes IP (router restart), the client connection remains on the old IP and the vpn tunnel does not work. To reactivate it I have to renew the "wireguard" interface in OpenWRT, and it takes the new IP. Persistent Keepalive should check the connection life every 25s but it doesn't seem to work.
into "System" -> "Scheduled tasks" per lleachi instructions.
It will sort dynamic IP change at "server" peer side. Total downtime with this should be 150 seconds in worst case regarding wireguard (add router restart time and maybe a few name server resolution failures and thats it).
I believe that script is part of wireguard-tools, so one needs to install that package first and paste mentioned code into text field and click submit button.