I have several Wireguard acc from providers. all of them are ok on android and Windows. but when I set it up on router ( Xiaomi 4C with PCWRT ) It’s ok till we leave home for a work or anything or Sleep.. after that when we connect to router wifi or with lan wireguard did not working… need to Reboot the router or disconnect and reconnect from APPS/ Wireguard …
I tested that on three xiaomi 4c with several Internet providers…..
WireGuard on the router is a straight build of open source code. I think the disconnects overnight or after long idling depend on the server side and connectivity conditions. For now, just log in and restart the connection when that happens.
That said, we’ll add a connection monitor in the next firmware update to mitigate this condition.
The problem is related to NTP settings and especially the way the clock which drives the Wireguard drifts (since routers don’t have a RTC built-in).After a while, or when you have turned off the router for a day or two and try to reconnect, it becomes a problem..
For your internet to work, Wireguard must work (since you’re tunneling WAN traffic through it).
For Wireguard to work, it depends on a monolithic timestamp (meaning it must always go forward). If router has been powered off for a while, the date will be all sorts of wrong. And so, the NTP settings must correct this on startup.
For NTP settings to work, you need internet to work (back on square 1).
Some people have suggestion to manually set the time (2030-10-10 – 10.00 for example) during initial startup everytime you reboot. To trick WG, and then it will be set correctly when NTP syncs. And a cron job every hour or so to correct the drift. This has worked a while for me, but it always screws up sooner or later. Hopefully this can be better optimised or fixed.
If it would be possible to route NTP through ISP internet (not VPN) and have it sync once in a while (like a watchdog timer). It would fix WireGuard.
Forgot to mention, my experience with Wireguard is only with OpenWRT routers. But i was having similar problems.
If this problem is already migitated or fixed with PCWrt software, then i don’t wether or not it’s a server or client side of the problem that causing the issue.