Thanks for the advice Tom. You were right. Rather embarrassingly, there was an offending addon - which I won’t mention in case it’s against forum rules- that was causing the issue. Connections on boot seem really stable now. I’ll monitor things over the coming days to see if the connection drops at all, and maybe we can look at a fix if this happens, given that dillthedog said the automatic restart would not occur if the VPN tunnel goes down or fails to connect, but only if the vpn process crashes. Cheers.
Been looking in to this again, since dill posted. I’m currently testing a solution, but my vpn is pretty solid; but simulating a drop; it worked. You could try this:
Please take notice we are starting and enabling the timer here, not the service; won’t work if openvpn-watchdog.service is enabled.
The timer is just scedule for the watch dog service to run every 15 min. The server checks if /proc/sys/net/ipv4/conf/tun0 exists, if it does then the watch dog service does nothing and process is repeated in 15 min. If /proc/sys/net/ipv4/conf/tun0 doesn’t exist, it means the tunnel has dropped and restating the openvpn@ service should bring the vpn tunnel back up.
Just to clarify this point. We were discussing the systemd Restart=xxxxx, so the specific issue was/is whether systemd would restart the process. However, that doesn’t preclude the possibility of OpenVPN restarting/resetting itself if a problem occurs – which it often does.