OPNsense Forum

English Forums => 25.1, 25.4 Production Series => Topic started by: Profiteer on March 13, 2025, 08:07:54 PM

Title: Using Monit to watch VPN Clients
Post by: Profiteer on March 13, 2025, 08:07:54 PM
I've seen this one mentioned a couple of times throughout the years, but I haven't seen an answer so far that would be applicable to 25.1. I have an OpenVPN Client configured to operate as a tunnel from my firewall to my VPN provider of choice to forward my internet traffic through. However, my connection to the remote VPN server dies very frequently (every 10ish minutes for the last few days or so). I've been trying to figure out how to configure Monit (given I have no other option) to monitor the status of my VPN tunnel and restart when the status is anything other than "connected," but every solution I've tried to implement simply does not work and I have no clue where to go from here. Remotely pinging the VPN's gateway is one of the solution's I've tried and it hasn't been going well and none of the information provided by the .conf, .stat, .sock, or .up files seems to be useful. I'm very used to PFSense's Watchdog plugin, which makes it very easy to tell it to watch the service and restart when it dies or behaves abnormally. Any help on getting started would be greatly appreciated!
Title: Re: Using Monit to watch OpenVPN Clients
Post by: Profiteer on March 15, 2025, 05:21:09 PM
Update: I tried to implement a Wireguard configuration and I'm having the same issue. After a short span of time, the tunnel dies. When I went poking around, my gateways for my VPN interfaces were both offline. After restarting both OpenVPN and Wireguard, the gateways came back up. So, something seems to be bringing the connections down and they won't come back without a manual service restart.