I use wireguard fine on my openwrt router. But sometimes it just completely drops off.
Today i restarted my router, to test if a other device would connect to the router then correctly.
But my whole internet connection disappeared. Nothing on the web would load anymore.
I had to go into the openWRT settings to disable the firewall redirect from lan>wireguard vpn and disable the wireguard interface. then reboot. Now i have internet again. But as soon as i enable the wireguard interface, internet is gone. I then have to restart the router to get internet back, a simple stop of the wireguard interface is not enough.
Again, wireguard was functioning fine before the reboot. No settings should therefore be incorrect or something.
Help would be appriciated!
I am using the Dynalink WRX-36.
EDIT: It just started working again, and i have the feeling i just disabled/enabled the config file.
I rebooted the router and it does not work anymore.
Rebooting breaks things. Even made a config backup and restored it, but that will not make it work.
What changes did you make prior to reboot?
Wireguard is dependent on accurate time. If wireguard starts before your system time is synced, the two endpoints won’t handshake. From your Edit, this would cause similar issue to your experience.
Nothing was changed before the reboot. I also put back a backup file that was working fine two days ago, and it also does not work. Going to firewall and putting LAN > WAN instead of LAN > Wireguard adapter is the only thing that makes internet work again.
And then even doing that is a sometimes...I just had to reboot after putting LAN > WAN, while previously it worked without a reboot.
Rebooting the router with LAN > WAN works great though. no issues.
I tried a lot now already. Removing the custom DNS servers from the wan interface and then enabling "Use DNS servers advertised by peer". And disabling that and keeping the custom dns servers.
It's just really random when the wireguard service works. When it works, it keeps working till i restart/reboot. But when i do, it's a big hassle to get it working again.
It could very well be your routers time is correct, or is loosing the time when it is rebooted. Wireguard requires your time to be in sync. I myself do not start up my wireguard till ntp was synced
I already tried restarting wireguard, stopping it, preventing it from starting on boot and then rebooting, and then starting the service after reboot, but it won't work anymore for some reason.
When it works it will probably be totally random by doing something i already tried before...
Sometrimes i get no data whatsoever, and sometimes i get tiny amounts of data.
See the following screenshots:
But while it has a handshake, i have no internet.
Also, just now i switched off the wireguard interface, put LAN back to WAN, and i got no internet back. I had to reboot the router to get internet back. While other times i get internet back without a restart of the router. I'm going crazy from this drama.
EDIT: I saw in the system settings that the time is set at UTC, and that it is an hour earlier then in the time where i live. Could that be something to chance?