1
20.7 Legacy Series / Restart OpenVPN client
« on: November 18, 2020, 09:46:47 pm »
I have a problem that I've been fighting with for quite some time.
I have two OPNsense instances connected via a site-2-site OpenVPN tunnel. Node1 is acting as a client to Node2. About once every month (sometimes more) I wake up to a monit alarm telling me that Node2 is down. This means that the OpenVPN client on Node1 has crashed and I have to start it again. Troubleshooting this has been hard as all I can see in the log on Node1 is "openvpn[78610]: Exiting due to fatal error". I figured there must be some way to monitor the service and try to start it automatically if it is down as a workaround and so I went down the monit path. All went well until I had to configure a start script for the service. Is there a way to stop/start the OpenVPN client command line? Alternatively: How can i troubleshoot the root cause to prevent it from happening in the first place?
I have two OPNsense instances connected via a site-2-site OpenVPN tunnel. Node1 is acting as a client to Node2. About once every month (sometimes more) I wake up to a monit alarm telling me that Node2 is down. This means that the OpenVPN client on Node1 has crashed and I have to start it again. Troubleshooting this has been hard as all I can see in the log on Node1 is "openvpn[78610]: Exiting due to fatal error". I figured there must be some way to monitor the service and try to start it automatically if it is down as a workaround and so I went down the monit path. All went well until I had to configure a start script for the service. Is there a way to stop/start the OpenVPN client command line? Alternatively: How can i troubleshoot the root cause to prevent it from happening in the first place?