Openvpn does not reconnect on disconnects

  • Whenever there seems to be an Internet outage, the openvpn service seems to stop. It says daemon not running status > services
    I have to manually start it.

    Is there way for it to automatically start up again?

    I am on 2.3.3 amd64, nanobsd.

    I would show the log, but I started the service again and it made too many new log messages to see the old ones.

    Seems like a similar issue here,

    I am using a domain name to connect to, not an ip address directly. I'll go ahead and try using an ip address instead, but I'm not sure why that would make a difference.

  • Seems fishy! OpenVPN should pick up again on a connection failure.

    However, if you want to have a somewhat basic solution you can download the "Service Watchdog" package and have OpenVPN restart automatically if it stops :)

    Feel free to restart the server/client on low verbosity level (3 is good) then fire over the logs if you want further inspection.


  • Related question for options to get OpenVPN to reconnect after service interruption:

    The issue that I just ran into is the OpenVPN client did not reconnect after a service outage, and it is at a remote location. The remote location is a residential location connected via cable modem/DHCP, and the current options are to cycle power to pfSense, or use a remote desktop support to control a PC at that location to access pfSense to restart the OpenVPN client.  Both of those options are viable, but I would prefer a self-healing option.

    For recovering from an OpenVPN service interruption, does it make ANY sense to have TWO openVPN connections between two pfSense firewalls, so that if one route does not restart itself after a service interruption, the other route will? (e.g, Site A client –> Site B server, AND Site A server <-- Site B client), or does this type of configuration just create more problems?

    The alternative I am planning is to use a PC configured as an OpenVPN client to both pfSense servers (it is already connected as an OpenVPN client to one for remote access), but I would need to set up dynamic DNS at the remote site because it gets its IP via DHCP from the cable modem provider.

Log in to reply