Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Openvpn does not reconnect on disconnects

    Scheduled Pinned Locked Moved OpenVPN
    3 Posts 3 Posters 2.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N Offline
      NotAnAlias
      last edited by

      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, https://www.reddit.com/r/PFSENSE/comments/3wji3v/openvpn_client_doesnt_reconnect_automatically/

      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.

      1 Reply Last reply Reply Quote 0
      • J Offline
        jameswebb
        last edited by

        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.

        James

        1 Reply Last reply Reply Quote 0
        • P Offline
          pvuchetich
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.