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

    Automatically restart an OpenVPN connection

    Scheduled Pinned Locked Moved OpenVPN
    1 Posts 1 Posters 981 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.
    • J
      jeffnoone
      last edited by

      On the pfSense machine, have an OpenVPN client configured for connecting to ibVPN VPN provider.
      The interface is listed as: IBVPN_USA interface (opt7, ovpnc3).
      The contents of the advanced configuration are:
      "verb 5; auth-user-pass /cf/conf/ibVPN.pas; fragment 1300; persist-key; persist-tun; link-mtu 1578; explicit-exit-notify 3; redirect-gateway def1"

      I have no problem getting the OpenVPN connection up, BUT it only seems to last 24-48 hours as a functioning connection.
      When I check on the pfSense interface, the OpenVPN connection appears to be up, but it wont transmit any data, not even a ping externally

      So I am hoping for some help to Automatically restart an OpenVPN connection, say at 5AM every day. It looks like Cron might help, but what commands are needed. How do I program Cron to do this?
      Or is there some command I can put in the advanced configuration that forces a renewal, say every 24 hours?

      Any help appreciated
      Thanks
      Jeff

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