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

    OpenVPN daemon/service stops after brief WAN outage - how to automate?

    Scheduled Pinned Locked Moved OpenVPN
    4 Posts 2 Posters 622 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.
    • F Offline
      Finger79
      last edited by

      Whenever there is a WAN outage, the existing client OpenVPN tunnel fails (obviously).  When the WAN connectivity is re-established, I'd like for the OpenVPN tunnel to also reconnect.  As it is, I am having to manually log into pfSense and restart the service.

      I've tested this in both OpenVPN 2.3.x on pfSense 2.3.4-p1 and OpenVPN 2.4.x on pfSense 2.4.0-beta.
      openvpn_daemon_down_after_wan_disconnect.png
      openvpn_daemon_down_after_wan_disconnect.png_thumb

      1 Reply Last reply Reply Quote 0
      • F Offline
        Finger79
        last edited by

        From this thread, they recommend the Service Watchdog package.  I am testing this now.

        I'm still wondering if there is a more ideal way to prevent the service from failing in the first place during a WAN outage.

        1 Reply Last reply Reply Quote 0
        • S Offline
          SpaceBass
          last edited by

          out of curiosity, it looks like your screenshot is of the client end.

          Does the client eventually time out and reconnect?

          1 Reply Last reply Reply Quote 0
          • F Offline
            Finger79
            last edited by

            @SpaceBass:

            out of curiosity, it looks like your screenshot is of the client end.

            Does the client eventually time out and reconnect?

            Yeah, it's a client setup to a 3rd party VPN provider.  And nope, the client doesn't time out and reconnect on its own.  The service is completely stopped in pfSense until I manually log in and restart it.

            I've had success testing the Service_Watchdog package in a VM.  Just enabled it in production.  This may be a decent workaround.

            I'm still curious what the root cause of the service failing in the first place.

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