OpenVPN does not reconnect when gateway switches

Started by Pfirepfox, April 30, 2020, 03:45:19 PM

Previous topic - Next topic
Hi All,

I have two gateways, one normal WAN via a physical connection and another via 4G for fail over. On the rare occasion where the physical connection fails the 4G successfully takes over and most of the network is redirected to the 4G conenction via the gateway group.

The one exception to this is the OpenVPN (client) tunnel. This fails to renegotiate and connect back to the server, restart the connection then works and everything is ok.

Is there someway to use Monit to test the connection and if it is down then restart the tunnel? Or does OpenVPN have the ability to do this?

So far i have attempted to use "keepalive 240 480" in the advanced configuration but no success so far.