Reset OpenVPN Service



  • Hello!! is there a way to reset OpenVPN Service if ping to some server fails?
    Thanks a Lot
    Stefano


  • LAYER 8 Rebel Alliance

    What kind of problem do you encounter? Just asking because I never had to restart the OpenVPN service (I run around 50 OpenVPN Instances) to fix any problems.
    Of course I restart the Services after any Config change. :-)

    -Rico



  • I have a problem because i’m Using a mobile provider and use the vpn for public ip...
    But sometimes the wan connection Dead and pfsense wont reconnect to vpn, the only thing I can do is to restart the OPenVPN service...
    PFSense sometime after wan connection drop connect but sometime not.. I don’t know why..: :(

    Thanks a lot
    Stefano



  • @wes93 what are do you see in the openvpn log?

    Who is your VPN provider or is it your own or some custom server?

    I use PIA, and they would have issues with some server starting to respond with Auth Failed and openvpn would just keep retrying the same server. So what I did is set the "Do not retry connection when authentication fails" and then setup Service Watchdog to restart that Openvpn service when it stopped.

    But again that depends on exactly what's going on with yours whether that's a valid option.



  • My VPN Provider is PrivateVPN.
    The Log of the VPN

    Dec 22 10:01:08	openvpn	5717	NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
    Dec 22 10:01:37	openvpn	5717	RESOLVE: Cannot resolve host address: it-mil.privatevpn.com:1194 (hostname nor servname provided, or not known)
    Dec 22 10:02:07	openvpn	5717	RESOLVE: Cannot resolve host address: it-mil.privatevpn.com:1194 (hostname nor servname provided, or not known)
    Dec 22 10:02:07	openvpn	5717	Could not determine IPv4/IPv6 protocol
    Dec 22 10:02:07	openvpn	5717	SIGUSR1[soft,init_instance] received, process restarting
    Dec 22 10:02:07	openvpn	5717	Restart pause, 300 second(s)
    Dec 22 10:07:07	openvpn	5717	NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
    Dec 22 10:07:37	openvpn	5717	RESOLVE: Cannot resolve host address: it-mil.privatevpn.com:1194 (hostname nor servname provided, or not known)
    Dec 22 10:08:06	openvpn	5717	RESOLVE: Cannot resolve host address: it-mil.privatevpn.com:1194 (hostname nor servname provided, or not known)
    Dec 22 10:08:06	openvpn	5717	Could not determine IPv4/IPv6 protocol
    Dec 22 10:08:06	openvpn	5717	SIGUSR1[soft,init_instance] received, process restarting
    Dec 22 10:08:06	openvpn	5717	Restart pause, 300 second(s)
    

    I will try with Watchdog option.
    Thanks a Lot
    Stefano


Log in to reply