The OpenVPN Virtual Private Network

Comment 0 for bug 280160

Thierry Carrez (ttx) wrote :

Binary package hint: network-manager-openvpn

Using openvpn rc9-3ubuntu2 and network-manager-openvpn 0.7~~svn20080928t225540-0ubuntu1.

When openvpn sends itself a SIGUSR1, network-manager-openvpn calls nm-openvpn-service-openvpn-helper with the "restart" parameter but that fails, resulting in the tearing down of the openvpn connection :

nm-openvpn[5682]: [server] Inactivity timeout (--ping-restart), restarting
nm-openvpn[5682]: SIGUSR1[soft,ping-restart] received, process restarting
[...]
nm-openvpn[5682]: UDPv4 link remote: 192.168.122.1:1194
nm-openvpn[5682]: [server] Peer Connection Initiated with 192.168.122.1:1194
nm-openvpn[5682]: Preserving previous TUN/TAP instance: tun0
nm-openvpn[5682]: /usr/lib/network-manager-openvpn/nm-openvpn-service-openvpn-helper tun0 1500 1541 10.8.0.6 10.8.0.5 restart
NetworkManager: <info> VPN plugin failed: 2
nm-openvpn[5682]: script failed: external program exited with error status: 1
nm-openvpn[5682]: Exiting
NetworkManager: <info> VPN plugin failed: 1
NetworkManager: <info> VPN plugin state changed: 6
NetworkManager: <info> VPN plugin state change reason: 0
NetworkManager: <WARN> connection_state_changed(): Could not process the request because no VPN connection was active.
NetworkManager: nm_system_device_flush_ip4_routes_with_iface: assertion `iface_idx >= 0' failed
NetworkManager: nm_system_device_flush_ip4_addresses_with_iface: assertion `iface_idx >= 0' failed
NetworkManager: <info> Policy set (eth0) as default device for routing and DNS.
nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/01ifupdown' exited with error status 1.
NetworkManager: <debug> [1223468236.827482] ensure_killed(): waiting for vpn service pid 5674 to exit
NetworkManager: <debug> [1223468236.828433] ensure_killed(): vpn service pid 5674 cleaned up

That can occur by default just by inactivity : when connected using a udp-based openvpn, by default it uses "ping-restart 120" which will result in openvpn sending a SIGUSR1 to itself after 120 seconds of VPN inactivity.

Running "sudo /usr/lib/network-manager-openvpn/nm-openvpn-service-openvpn-helper tun0 1500 1541 10.8.0.6 10.8.0.5 restart" on an opened connection results in:

** (process:5944): WARNING **: <WARN> helper_failed(): nm-openvpn-service-openvpn-helper did not receive a valid VPN gateway from openvpn

Its return code is 1.