VPN connection gets dropped within 10 minutes

2 risposte [Ultimo contenuto]
anonymous

Hi all,

today I've tried setting up a VPN on my ThinkPad T400 using the network-manager.

Following this tutorial (https://www.cyberciti.biz/faq/linux-import-openvpn-ovpn-file-with-networkmanager-commandline/) I've imported the respective .ovpn files and added my user credentials in the GUI.

After checking the "Use this connection only for resources on its network" box under "Edit Connections" -> respective VPN connection -> "Edit" -> "IPv4 Settings" -> Routes I was able to connect to the Internet through the VPN.

Now, however, the VPN connection gets dropped after at max. 10 minutes.

Do you have any ideas on how I could fix this?

Excerpt from syslog:

Aug 12 23:18:57 T400libre nm-openvpn[10345]: write to TUN/TAP : Invalid argument (code=22)
Aug 12 23:19:57 T400libre nm-openvpn[10345]: write to TUN/TAP : Invalid argument (code=22)
Aug 12 23:20:52 T400libre com.canonical.indicator.application[1514]: (process:1834): indicator-application-service-WARNING **: Application already exists, re-requesting properties.
Aug 12 23:20:57 T400libre nm-openvpn[10345]: write to TUN/TAP : Invalid argument (code=22)
Aug 12 23:21:57 T400libre nm-openvpn[10345]: write to TUN/TAP : Invalid argument (code=22)
Aug 12 23:22:12 T400libre dbus[943]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Aug 12 23:22:12 T400libre systemd[1]: Starting Hostname Service...
Aug 12 23:22:12 T400libre dbus[943]: [system] Successfully activated service 'org.freedesktop.hostname1'
Aug 12 23:22:12 T400libre systemd[1]: Started Hostname Service.
Aug 12 23:22:57 T400libre nm-openvpn[10345]: write to TUN/TAP : Invalid argument (code=22)
Aug 12 23:23:52 T400libre dbus[943]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Aug 12 23:23:52 T400libre systemd[1]: Starting Hostname Service...
Aug 12 23:23:52 T400libre dbus[943]: [system] Successfully activated service 'org.freedesktop.hostname1'
Aug 12 23:23:52 T400libre systemd[1]: Started Hostname Service.
Aug 12 23:23:57 T400libre nm-openvpn[10345]: Connection reset, restarting [0]
Aug 12 23:23:57 T400libre nm-openvpn[10345]: SIGUSR1[soft,connection-reset] received, process restarting
Aug 12 23:24:02 T400libre nm-openvpn[10345]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Aug 12 23:24:02 T400libre nm-openvpn[10345]: Attempting to establish TCP connection with [AF_INET]********** [nonblock]
Aug 12 23:24:03 T400libre nm-openvpn[10345]: TCP connection established with [AF_INET]**********
Aug 12 23:24:03 T400libre nm-openvpn[10345]: TCPv4_CLIENT link local: [undef]
Aug 12 23:24:03 T400libre nm-openvpn[10345]: TCPv4_CLIENT link remote: [AF_INET]**********
Aug 12 23:24:03 T400libre nm-openvpn[10345]: WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1604', remote='link-mtu 1636'
Aug 12 23:24:03 T400libre nm-openvpn[10345]: WARNING: 'tun-mtu' is used inconsistently, local='tun-mtu 1500', remote='tun-mtu 1532'
Aug 12 23:24:03 T400libre nm-openvpn[10345]: [**********] Peer Connection Initiated with [AF_INET]***********
Aug 12 23:24:05 T400libre nm-openvpn[10345]: Preserving previous TUN/TAP instance: tun0
Aug 12 23:24:05 T400libre nm-openvpn[10345]: /usr/lib/NetworkManager/nm-openvpn-service-openvpn-helper --bus-name org.freedesktop.NetworkManager.openvpn.Connection_30 --tun -- tun0 1500 1607 ********** restart
Aug 12 23:24:06 T400libre nm-openvpn[10345]: WARNING: Failed running command (--up/--down): could not execute external program
Aug 12 23:24:06 T400libre nm-openvpn[10345]: Exiting due to fatal error
Aug 12 23:24:06 T400libre NetworkManager[959]: [1565645046.0068] device (tun0): state change: activated -> unmanaged (reason 'unmanaged') [100 10 3]
Aug 12 23:24:06 T400libre dbus[943]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Aug 12 23:24:06 T400libre NetworkManager[959]: [1565645046.0217] devices removed (path: /sys/devices/virtual/net/tun0, iface: tun0)
Aug 12 23:24:06 T400libre NetworkManager[959]: (nm-openvpn-service:10338): nm-openvpn-WARNING **: openvpn[10345] exited with error code 1

apitsch (non verificato)
apitsch (non verificato)

Following the steps in the tutorial solved the VPN connection issue for me.