Automatically restart an OpenVPN connection

  • 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

Log in to reply