Hi My Wireguard connection drops every couple of days which I think is either due to VPN changing ip address or connection just dropping for unknown reason. When this happens it doesn't re-establish the Wireguard VPN connection again unless I delete the Wireguard interface and setup the connection from scratch. Even restarting the router doesn't fix the issue.
Is there a way I can get it to re-establish the VPN connection without having to set it up again?
Thanks, will give that a go and see what happens. The problem usually happens every 5-7 days therefore I won't know immediately if it helps but will monitor over the week.
The issue still seems to be happening after applying the workarounds. The VPN connection is not dropping but I lose connection on the device that is connected to the router via ethernet cable. This seems to happen about every 5-7 days or so. If I delete the VPN interface in network and set it up again then I'm ok for another 5-7 days.
This issue is doing my head in and I tried searching the forum and can't seem to find a solution. Can you advise?
When the issue happens, collect the diagnostics from both server and client and post it to pastebin.com redacting the private parts:
ubus call system board; uci show network; uci show firewall; crontab -l; \
wg show; ip address show; ip route show table all; ip rule show; iptables-save
I have tried the above and it's still not working. I don't think the allowed ips was the issue as it still was dropping connection to wired device when set to 0.0.0.0/0.
It is very strange that it's effecting wired connections and not when using wireless. It intially works for almost a week then drops for no reason like it don't like anything plugged into the router.
I have removed listen port and restarted VPN PBR and it did not make any difference. I was thinking is there a way to add device via MAC address in VPN And PBR instead of ip and would this work?
I have the same problem as topic-starter. As soon as my internet-provider drops the connection due to account arrears or ISP-router reboots, it is not possible to connect to VPN. Restarting of WG-interface, rebooting openwrt-router, etc result to nothing.
So I try to apply mentioned advises. But
Initially I set up my router according to this manual.
In order to bypass wireguard-VPN for some sites. Found the solution here.
I must admit, that everything works fine with these options, until internet connection, provided by ISP router, drops down. Or power failure. Then it is impossible to connect to VPN-server without creating new interface etc.
uci -q delete network.@route[0]
uci set network.lan.ip4table="1"
uci set network.lan.ip6table="1"
uci set network.wan.ip4table="2"
uci set network.wan6.ip6table="2"
uci -q delete network.lan_wan
uci set network.lan_wan="rule"
uci set network.lan_wan.in="lan"
uci set network.lan_wan.mark="1"
uci set network.lan_wan.lookup="2"
uci set network.lan_wan.priority="30000"
uci -q delete network.lan_wan6
uci set network.lan_wan6="rule6"
uci set network.lan_wan6.in="lan"
uci set network.lan_wan6.mark="1"
uci set network.lan_wan6.lookup="2"
uci set network.lan_wan6.priority="30000"
uci commit network
/etc/init.d/network restart