Unable to connect to OpenVPN endpoint

Bug #1071138 reported by tbys on 2012-10-25
66
This bug affects 12 people
Affects Status Importance Assigned to Milestone
NetworkManager
New
Undecided
Unassigned
network-manager (Ubuntu)
Undecided
Unassigned
network-manager-openvpn (Ubuntu)
Undecided
Unassigned

Bug Description

Hello,

I am facing some problems getting OpenVPN working through NetworkManager on Ubuntu 12.10. I am able to connect when using the 'regular' OpenVPN client and a config file, but not through NM with a similar config. From my investigations so far, it seems that the /sys/devices/virtual/net/tap0 device doesn't get created, but I am unable to work out why that is happening. I tried putting apparmor into complain mode to make sure it wasn't a problem with that. I pasted what I believe is the relevant part of syslog below (edited out identifiable information). Can anyone help me with some pointers as to how to troubleshoot this?

Best Regards

Oct 25 13:38:22 havet NetworkManager[952]: <info> Starting VPN service 'openvpn'...
Oct 25 13:38:22 havet NetworkManager[952]: <info> VPN service 'openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 2650
Oct 25 13:38:22 havet NetworkManager[952]: <info> VPN service 'openvpn' appeared; activating connections
Oct 25 13:38:22 havet NetworkManager[952]: <info> VPN plugin state changed: starting (3)
Oct 25 13:38:22 havet nm-openvpn[2656]: OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 2
0110424-2 (2.2RC2)] built on Oct 8 2012
Oct 25 13:38:22 havet nm-openvpn[2656]: WARNING: Make sure you understand the semantics of --tls-remote before using it (see the man page).
Oct 25 13:38:22 havet nm-openvpn[2656]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Oct 25 13:38:22 havet NetworkManager[952]: <info> VPN connection '<I removed the hostname>' (Connect) reply received.
Oct 25 13:38:22 havet nm-openvpn[2656]: LZO compression initialized
Oct 25 13:38:22 havet nm-openvpn[2656]: Attempting to establish TCP connection with [AF_INET]xxx.xxx.xxx.xxx:15001 [nonblock]
Oct 25 13:38:23 havet nm-openvpn[2656]: TCP connection established with [AF_INET]xxx.xxx.xxx.xxx:15001
Oct 25 13:38:23 havet nm-openvpn[2656]: TCPv4_CLIENT link local: [undef]
Oct 25 13:38:23 havet nm-openvpn[2656]: TCPv4_CLIENT link remote: [AF_INET]xxx.xxx.xxx.xxx:15001
Oct 25 13:38:23 havet nm-openvpn[2656]: [xxxx.xxxxx.xxxx] Peer Connection Initiated with [AF_INET]xxx.xxx.xxx.xxx:15001
Oct 25 13:38:25 havet nm-openvpn[2656]: TUN/TAP device tap0 opened
Oct 25 13:38:25 havet nm-openvpn[2656]: /usr/lib/NetworkManager/nm-openvpn-service-openvpn-helper tap0 1500 1576 init
Oct 25 13:38:25 havet NetworkManager[952]: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/tap0, iface: tap0)
Oct 25 13:38:25 havet NetworkManager[952]: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/tap0, iface: tap0): no ifupdown configuration found.
Oct 25 13:38:25 havet NetworkManager[952]: <warn> /sys/devices/virtual/net/tap0: couldn't determine device driver; ignoring...
Oct 25 13:38:25 havet NetworkManager[952]: <warn> VPN plugin failed: 2
Oct 25 13:38:25 havet nm-openvpn[2656]: WARNING: Failed running command (--up/--down): external program exited with error status: 1
Oct 25 13:38:25 havet nm-openvpn[2656]: Exiting
Oct 25 13:38:25 havet NetworkManager[952]: SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/tap0, iface: tap0)
Oct 25 13:38:25 havet NetworkManager[952]: <warn> VPN plugin failed: 1
Oct 25 13:38:25 havet NetworkManager[952]: <info> VPN plugin state changed: stopped (6)
Oct 25 13:38:25 havet NetworkManager[952]: <info> VPN plugin state change reason: 0

Oct 25 13:38:25 havet NetworkManager[952]: <info> Policy set 'xxxx' (wlan0) as default for IPv4 routing and DNS.
Oct 25 13:38:25 havet NetworkManager[952]: <info> Policy set 'xxxx' (wlan0) as default for IPv6 routing and DNS.
Oct 25 13:38:25 havet NetworkManager[952]: <warn> error disconnecting VPN: Could not process the request because no VPN connection was active.
Oct 25 13:38:30 havet NetworkManager[952]: <info> VPN service 'openvpn' disappeared

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: network-manager 0.9.6.0-0ubuntu7
ProcVersionSignature: Ubuntu 3.5.0-17.28-generic 3.5.5
Uname: Linux 3.5.0-17-generic x86_64
ApportVersion: 2.6.1-0ubuntu3
Architecture: amd64
Date: Thu Oct 25 14:21:40 2012
EcryptfsInUse: Yes
IfupdownConfig:
 # interfaces(5) file used by ifup(8) and ifdown(8)
 auto lo
 iface lo inet loopback
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
IpRoute:
 default via xxx.xxx.xxx.xxx dev wlan0 proto static
 xxx.xxx.xxx.xxx/16 dev wlan0 scope link metric 1000
 xxx.xxx.xxx.xxx/24 dev wlan0 proto kernel scope link src xxx.xxx.xxx.xxx metric 9
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
 WimaxEnabled=true
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: network-manager
UpgradeStatus: No upgrade log present (probably fresh install)
nmcli-con:
 NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT READONLY DBUS-PATH
 xxxxxxxx e371edb9-a655-4eac-b057-783fd3c942ca 802-11-wireless 1351142226 Thu 25 Oct 2012 02:17:06 PM JST yes no /org/freedesktop/NetworkManager/Settings/2
 xxxxxxx 1b0cae8c-ad21-4819-ab2c-f52b3a9257e3 802-11-wireless 1351121904 Thu 25 Oct 2012 08:38:24 AM JST yes no /org/freedesktop/NetworkManager/Settings/1
 xxx.xxx.xxx 69939077-49ac-45ef-9075-5738a8b4123d vpn 0 never yes no /org/freedesktop/NetworkManager/Settings/0
 Wired connection 1 aa1f264a-14b5-4ccc-8a01-99339df056d1 802-3-ethernet 1351139826 Thu 25 Oct 2012 01:37:06 PM JST yes no /org/freedesktop/NetworkManager/Settings/3
nmcli-dev:
 DEVICE TYPE STATE DBUS-PATH
 wlan0 802-11-wireless connected /org/freedesktop/NetworkManager/Devices/1
 eth0 802-3-ethernet unavailable /org/freedesktop/NetworkManager/Devices/0
nmcli-nm:
 RUNNING VERSION STATE NET-ENABLED WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
 running 0.9.6.0 connected enabled enabled enabled enabled disabled

Bug #1071745 is the same for Precise.

Upstream thread reference: http://comments.gmane.org/gmane.linux.network.networkmanager.devel/22204

tbys (tbys) wrote :
tbys (tbys) on 2012-10-25
description: updated
tags: added: precise
Marius B. Kotsbak (mariusko) wrote :

Could this be a duplicate of bug #777864?

description: updated
tbys (tbys) wrote :

Indeed it looks very similar. As far as I can tell with my limited knowledge, the problem is that the openvpn plugin helper fails to set up the tap0 device. It is possible that I could make things work for myself by adding tap0 to /etc/network/interfaces, but as the poster of #777864 mentions, it seems like network manager should be able to do this for me.

Marius B. Kotsbak (mariusko) wrote :

Japp, it is more a workaround, but does it work if you try that?

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager (Ubuntu):
status: New → Confirmed
tbys (tbys) wrote :

Adding

auto tap0
iface tap0 inet dhcp

to /etc/network/interfaces causes startup to "pause 60 second for network".

If I add tap0 using
sudo ip tuntap add mode tap tap0
then nm-openvpn tries to configure a new tap device (tap1)

Also, I tried disabling tap in the nm-openvpn config, and the same thing happens for tun0

Oct 27 21:43:01 havet NetworkManager[949]: <warn> /sys/devices/virtual/net/tun0: couldn't determine device driver; ignoring...
Oct 27 21:43:01 havet NetworkManager[949]: <warn> VPN plugin failed: 2

tbys (tbys) wrote :

Also modifying /etc/network/interfaces causes nm not to start at all.

tbys (tbys) on 2012-10-29
description: updated
tbys (tbys) on 2012-10-29
description: updated
description: updated
description: updated
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager-openvpn (Ubuntu):
status: New → Confirmed

Affects 13.10 as well but only for a split vpn, it works for a full vpn

flickerfly (josiah-ritchie) wrote :

I find this intemittently with my split vpns. I get successes of 1 in 3. Once it's up, it's solid though. It'll run all day so annoying but not a critical stop for me. I'm seeing also that driver issues with tun0 when it fails. Thanks for all the work on this folks.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers