Openvpn not re-connecting on error - why?



  • Hi Everyone,

    I have few boxes that have OpenVPN re-connect whenever there is an internet disconnection or any other error but one of them simply does not do it even though I have checked the "Infinitely resolve server"

    What do you think is causing the issue? My OpenVPN is a client on pfSense.

    Here is log from system:

    Mar 10 05:14:52 php: : rc.newwanip: on (IP address: 44.55.22.79) (interface: wan) (real interface: vr1).
    Mar 10 05:14:52 php: : ROUTING: setting default route to 44.55.22.1
    Mar 10 05:14:53 check_reload_status: Reloading filter
    Mar 10 05:14:53 apinger: Exiting on signal 15.
    Mar 10 05:14:54 apinger: Starting Alarm Pinger, apinger(58217)
    Mar 10 05:15:16 dnsmasq[42609]: reading /etc/resolv.conf
    Mar 10 05:15:16 dnsmasq[42609]: using nameserver 8.8.4.4#53
    Mar 10 05:15:16 dnsmasq[42609]: using nameserver 8.8.8.8#53
    Mar 10 05:15:16 dnsmasq[42609]: using nameserver 45.45.47.47#53
    Mar 10 05:15:16 dnsmasq[42609]: using nameserver 45.45.45.47#53
    Mar 10 05:15:16 dnsmasq[42609]: ignoring nameserver 127.0.0.1 - local interface
    Mar 10 05:15:16 dnsmasq[42609]: ignoring nameserver 127.0.0.1 - local interface
    Mar 10 09:52:45 php: /index.php: Session timed out for user 'admin' from: 21.23.43.20
    Mar 10 09:52:58 php: /index.php: Successful webConfigurator login for user 'admin' from 21.23.43.20
    Mar 10 09:52:58 php: /index.php: Successful webConfigurator login for user 'admin' from 21.23.43.20
    Mar 10 09:53:22 check_reload_status: Reloading filter
    Mar 10 09:53:24 check_reload_status: Syncing firewall
    Mar 10 09:53:26 kernel: ovpnc1: link state changed to UP
    Mar 10 09:53:26 check_reload_status: rc.newwanip starting ovpnc1
    Mar 10 09:53:31 php: : rc.newwanip: Informational is starting ovpnc1.
    Mar 10 09:53:31 php: : rc.newwanip: on (IP address: 172.16.17.158) (interface: opt2) (real interface: ovpnc1).
    Mar 10 09:53:31 apinger: Exiting on signal 15.
    Mar 10 09:53:32 apinger: Starting Alarm Pinger, apinger(36102)
    Mar 10 09:53:32 check_reload_status: Reloading filter
    Mar 10 09:53:34 dnsmasq[42609]: reading /etc/resolv.conf
    Mar 10 09:53:34 dnsmasq[42609]: using nameserver 8.8.4.4#53
    Mar 10 09:53:34 dnsmasq[42609]: using nameserver 8.8.8.8#53
    Mar 10 09:53:34 dnsmasq[42609]: using nameserver 45.45.47.47#53
    Mar 10 09:53:34 dnsmasq[42609]: using nameserver 45.45.45.47#53
    Mar 10 09:53:34 dnsmasq[42609]: ignoring nameserver 127.0.0.1 - local interface
    Mar 10 09:53:34 dnsmasq[42609]: ignoring nameserver 127.0.0.1 - local interface
    Mar 10 09:53:36 check_reload_status: Syncing firewall
    Mar 10 09:53:38 kernel: ovpnc2: link state changed to UP
    Mar 10 09:53:38 check_reload_status: rc.newwanip starting ovpnc2
    Mar 10 09:53:42 apinger: ALARM: CLOUD_VPN(172.16.17.157) *** down ***
    Mar 10 09:53:43 php: : rc.newwanip: Informational is starting ovpnc2.
    Mar 10 09:53:43 php: : rc.newwanip: on (IP address: 172.25.25.6) (interface: opt3) (real interface: ovpnc2).
    Mar 10 09:53:43 apinger: Exiting on signal 15.
    Mar 10 09:53:43 check_reload_status: Reloading filter
    Mar 10 09:53:44 apinger: Starting Alarm Pinger, apinger(43501)
    Mar 10 09:53:48 dnsmasq[42609]: reading /etc/resolv.conf
    Mar 10 09:53:48 dnsmasq[42609]: using nameserver 8.8.4.4#53
    Mar 10 09:53:48 dnsmasq[42609]: using nameserver 8.8.8.8#53
    Mar 10 09:53:48 dnsmasq[42609]: using nameserver 45.45.47.47#53
    Mar 10 09:53:48 dnsmasq[42609]: using nameserver 45.45.45.47#53
    Mar 10 09:53:48 dnsmasq[42609]: ignoring nameserver 127.0.0.1 - local interface
    Mar 10 09:53:48 dnsmasq[42609]: ignoring nameserver 127.0.0.1 - local interface
    Mar 10 09:53:55 apinger: ALARM: CLOUD_VPN(172.16.17.157) *** down ***
    Mar 10 09:53:55 apinger: ALARM: PBX_VPN(172.25.25.5) *** down ***
    Mar 10 09:54:05 check_reload_status: Reloading filter

    Here is log from OpenVPN:

    Feb 26 11:14:19 openvpn[50479]: UDPv4 link remote: [AF_INET]87.66.50.20:1194
    Feb 26 11:14:20 openvpn[50479]: [server-SOLUTION_ServerCloud] Peer Connection Initiated with [AF_INET]87.66.50.20:1194
    Feb 26 11:14:22 openvpn[50479]: Preserving previous TUN/TAP instance: ovpnc1
    Feb 26 11:14:22 openvpn[50479]: Initialization Sequence Completed
    Mar 10 05:11:52 openvpn[50479]: [server-SOLUTION_ServerCloud] Inactivity timeout (–ping-restart), restarting
    Mar 10 05:11:52 openvpn[50479]: SIGUSR1[soft,ping-restart] received, process restarting
    Mar 10 05:11:54 openvpn[50479]: WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
    Mar 10 05:11:54 openvpn[50479]: NOTE: the current –script-security setting may allow this configuration to call user-defined scripts
    Mar 10 05:11:54 openvpn[50479]: Re-using SSL/TLS context
    Mar 10 05:11:54 openvpn[50479]: LZO compression initialized
    Mar 10 05:11:54 openvpn[50479]: TCP/UDP: Socket bind failed on local address [AF_INET]44.55.22.1: Can't assign requested address
    Mar 10 05:11:54 openvpn[50479]: Exiting
    Mar 10 05:11:54 openvpn[50479]: /usr/local/sbin/ovpn-linkdown ovpnc1 1500 1542 172.16.17.158 172.16.17.157 init
    Mar 10 05:12:08 openvpn[57235]: [server-ServerPhones-VPN] Inactivity timeout (–ping-restart), restarting
    Mar 10 05:12:08 openvpn[57235]: SIGUSR1[soft,ping-restart] received, process restarting
    Mar 10 05:12:10 openvpn[57235]: WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
    Mar 10 05:12:10 openvpn[57235]: NOTE: the current –script-security setting may allow this configuration to call user-defined scripts
    Mar 10 05:12:10 openvpn[57235]: Re-using SSL/TLS context
    Mar 10 05:12:10 openvpn[57235]: LZO compression initialized
    Mar 10 05:12:10 openvpn[57235]: TCP/UDP: Socket bind failed on local address [AF_INET]44.55.22.1: Can't assign requested address
    Mar 10 05:12:10 openvpn[57235]: Exiting
    Mar 10 05:12:10 openvpn[57235]: /usr/local/sbin/ovpn-linkdown ovpnc2 1500 1558 172.25.25.6 172.25.25.5 init
    Mar 10 09:53:22 openvpn[28535]: OpenVPN 2.2.0 i386-portbld-freebsd8.1 [SSL] [LZO2] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Aug 6 2012
    Mar 10 09:53:22 openvpn[28535]: WARNING: using –pull/--client and --ifconfig together is probably not what you want
    Mar 10 09:53:22 openvpn[28535]: WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
    Mar 10 09:53:22 openvpn[28535]: NOTE: the current –script-security setting may allow this configuration to call user-defined scripts
    Mar 10 09:53:22 openvpn[28535]: LZO compression initialized
    Mar 10 09:53:22 openvpn[28586]: UDPv4 link local (bound): [AF_INET]44.55.22.1
    Mar 10 09:53:22 openvpn[28586]: UDPv4 link remote: [AF_INET]87.66.50.20:1194
    Mar 10 09:53:23 openvpn[28586]: [server-SOLUTION_ServerCloud] Peer Connection Initiated with [AF_INET]87.66.50.20:1194
    Mar 10 09:53:26 openvpn[28586]: TUN/TAP device /dev/tun1 opened
    Mar 10 09:53:26 openvpn[28586]: do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
    Mar 10 09:53:26 openvpn[28586]: /sbin/ifconfig ovpnc1 172.16.17.158 172.16.17.157 mtu 1500 netmask 255.255.255.255 up
    Mar 10 09:53:26 openvpn[28586]: /usr/local/sbin/ovpn-linkup ovpnc1 1500 1542 172.16.17.158 172.16.17.157 init
    Mar 10 09:53:26 openvpn[28586]: Initialization Sequence Completed
    Mar 10 09:53:35 openvpn[37151]: OpenVPN 2.2.0 i386-portbld-freebsd8.1 [SSL] [LZO2] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Aug 6 2012
    Mar 10 09:53:35 openvpn[37151]: WARNING: using –pull/--client and --ifconfig together is probably not what you want
    Mar 10 09:53:35 openvpn[37151]: WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
    Mar 10 09:53:35 openvpn[37151]: NOTE: the current –script-security setting may allow this configuration to call user-defined scripts
    Mar 10 09:53:35 openvpn[37151]: LZO compression initialized
    Mar 10 09:53:35 openvpn[37438]: UDPv4 link local (bound): [AF_INET]44.55.22.1
    Mar 10 09:53:35 openvpn[37438]: UDPv4 link remote: [AF_INET]44.77.24.55:1195
    Mar 10 09:53:36 openvpn[37438]: [server-ServerPhones-VPN] Peer Connection Initiated with [AF_INET]44.77.24.55:1195
    Mar 10 09:53:38 openvpn[37438]: TUN/TAP device /dev/tun2 opened
    Mar 10 09:53:38 openvpn[37438]: do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
    Mar 10 09:53:38 openvpn[37438]: /sbin/ifconfig ovpnc2 172.25.25.6 172.25.25.5 mtu 1500 netmask 255.255.255.255 up
    Mar 10 09:53:38 openvpn[37438]: /usr/local/sbin/ovpn-linkup ovpnc2 1500 1558 172.25.25.6 172.25.25.5 init
    Mar 10 09:53:38 openvpn[37438]: ERROR: FreeBSD route add command failed: external program exited with error status: 1
    Mar 10 09:53:38 openvpn[37438]: ERROR: FreeBSD route add command failed: external program exited with error status: 1
    Mar 10 09:53:38 openvpn[37438]: Initialization Sequence Completed


Log in to reply