OPNsense Forum

English Forums => Virtual private networks => Topic started by: wotcha on February 25, 2023, 07:09:10 PM

Title: Do VPN services & connections autoreconnect upon failure?
Post by: wotcha on February 25, 2023, 07:09:10 PM
Sorry couldn't google foo find an answer anywhere...

For OpenVPN & Wireguard, what if the connection fails or stops (for any reason), is there any auto reconnect feature in OPNsense?

Is it possible to create a monit script that is called when pings fail, that will restart the VPN connections?

Btw, I have in System: Gateways: Single, in each interface:
- Disable Gateway Monitoring -- uncheck

Title: Re: Do VPN services & connections autoreconnect upon failure?
Post by: bartjsmit on February 26, 2023, 09:43:15 AM
for WireGuard add PersistentKeepalive to the config. For OpenVPN use these:

persist-tun
persist-key
keepalive 10 60
Title: Re: Do VPN services & connections autoreconnect upon failure?
Post by: wotcha on February 26, 2023, 12:31:56 PM
thank you so much