Im been using OpenVPN on my DD-WRT router for a few days now and the connection has remained stable. Im using policy based routing to only route specific IPs over the VPN (https://charleswilkinson.co.uk/2016/05/14/selective-routing-using-ddwrt-and-openvpn). This morning I noticed that my VPN connection was closed (the VPN status page of the router also showed state - client (blank) and the log was completely empty).
A simple reboot fixed the connection, but I am looking for a way to automate the re-connect. I don't think I can use the routers built in watch dog as I think it monitors the "main" connection not the PBR VPN connection.
as per the VPN companies setup instructions my config file has the following
remote-cert-tls server
remote-random
nobind
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
ping-timer-rem
reneg-sec 0
I think I can probably modify the ping-timer-rem command, or add one of the other ping commands, but I'm not really sure which one.
Can someone help me with this?
Also, any idea on how to test for the problem described above (unplugging just the modem doesn't simulate the problem, the router shows state - Client: RECONNECTING init_instance and when the modem come back online the VPN does re-establish itself)