[Bug 451533] Re: network-manager openvpn fails to connect

Ronald ronald645 at gmail.com
Fri Dec 25 14:55:10 UTC 2009


I'm suffering from the *exact* same problem.
Specs:
- Default unmodified ubuntu kernel
- Firewall fully open on both sides, except on the server I do (to access other computers in my network):
     - sysctl net.ipv4.conf.all.forwarding=1
     - iptables -A POSTROUTING -o ra0 -j MASQUERADE -t nat

Server.conf:

>>><<<
dev tun
ifconfig 10.8.0.1 10.8.0.2
secret static.key 1
comp-lzo
>>><<<

Client.conf:

>>><<<
remote 8.8.8.8 # Yes, I changed it for this post :)
dev tun
ifconfig 10.8.0.2 10.8.0.1
secret static.key 0
comp-lzo
route 10.1.9.0 255.255.255.0
>>><<<

static.key and both config files are located in /etc/openvpn/
static.key is generated with: openvpn --genkey --secret static.key

Doing
- openvpn --config /etc/openvpn/server.conf on the server.
- openvpn --config /etc/openvpn/client.conf on the client.
Gives me a good openvpn connection allowing to access all my computer in my network.

However, when trying to use the openvpn plugin inside network-manager as
a client stuff goes wrong. I generated a config file from network-
manager (by allowing all users to use it):

>>><<<
[connection]
id=VPN-connection 1
uuid=ae53c3a0-7308-41c0-97b8-da1cb7bc8ac5
type=vpn
autoconnect=false
timestamp=0

[ipv4]
method=auto
routes1=10.1.9.0;24;0.0.0.0;0;
ignore-auto-routes=false
ignore-auto-dns=false
dhcp-send-hostname=false
never-default=false

[vpn]
service-type=org.freedesktop.NetworkManager.openvpn
local-ip=10.8.0.2
comp-lzo=yes
remote=8.8.8.8
connection-type=static-key
remote-ip=10.8.0.1
static-key=/etc/openvpn/static.key
>>><<<

This does not work, the log say:

Dec 25 15:15:54 Charlie NetworkManager: <info>  Starting VPN service 'org.freedesktop.NetworkManager.openvpn'...
Dec 25 15:15:54 Charlie NetworkManager: <info>  VPN service 'org.freedesktop.NetworkManager.openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 7639
Dec 25 15:15:54 Charlie NetworkManager: <info>  VPN service 'org.freedesktop.NetworkManager.openvpn' just appeared, activating connections
Dec 25 15:15:54 Charlie NetworkManager: <info>  VPN plugin state changed: 3
Dec 25 15:15:54 Charlie NetworkManager: <info>  VPN connection 'Thuis' (Connect) reply received.
Dec 25 15:15:54 Charlie nm-openvpn[7642]: OpenVPN 2.1_rc19 i486-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Oct 13 2009
Dec 25 15:15:54 Charlie nm-openvpn[7642]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Dec 25 15:15:54 Charlie nm-openvpn[7642]: /usr/sbin/openvpn-vulnkey -q /home/ronald/.static.key
Dec 25 15:15:54 Charlie nm-openvpn[7642]: LZO compression initialized
Dec 25 15:15:54 Charlie nm-openvpn[7642]: TUN/TAP device tun0 opened
Dec 25 15:15:54 Charlie nm-openvpn[7642]: /sbin/ifconfig tun0 10.8.0.2 pointopoint 10.8.0.1 mtu 1500
Dec 25 15:15:54 Charlie nm-openvpn[7642]: /usr/lib/network-manager-openvpn/nm-openvpn-service-openvpn-helper tun0 1500 1545 10.8.0.2 10.8.0.1 init
Dec 25 15:15:54 Charlie NetworkManager:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/tun0, iface: tun0)
Dec 25 15:15:54 Charlie NetworkManager:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/tun0, iface: tun0): no ifupdown configuration found.
Dec 25 15:15:54 Charlie NetworkManager: <info>  VPN plugin failed: 2
Dec 25 15:15:54 Charlie nm-openvpn[7642]: script failed: external program exited with error status: 1
Dec 25 15:15:54 Charlie nm-openvpn[7642]: Exiting
Dec 25 15:15:54 Charlie NetworkManager:    SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/tun0, iface: tun0)
Dec 25 15:15:55 Charlie NetworkManager: <info>  VPN plugin failed: 1
Dec 25 15:15:55 Charlie NetworkManager: <info>  VPN plugin state changed: 6
Dec 25 15:15:55 Charlie NetworkManager: <info>  VPN plugin state change reason: 0
Dec 25 15:15:55 Charlie NetworkManager: <WARN>  connection_state_changed(): Could not process the request because no VPN connection was active.
Dec 25 15:15:55 Charlie NetworkManager: <info>  Policy set 'Default' (wlan0) as default for routing and DNS.
Dec 25 15:16:07 Charlie NetworkManager: <debug> [1261750567.001411] ensure_killed(): waiting for vpn service pid 7639 to exit
Dec 25 15:16:07 Charlie NetworkManager: <debug> [1261750567.001625] ensure_killed(): vpn service pid 7639 cleaned up

-- 
network-manager openvpn fails to connect
https://bugs.launchpad.net/bugs/451533
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list