Ubuntu – Can’t set up a vpnc connection with network-manager on Kubuntu 15.04

vpnc

My VPN connection is not working for me on a clean install of Kubuntu 15.04, and it was on 14.10 and earlier versions. I can set up a connection via the "connection editor", but when I want to connect it flashes up a window that is probably where I should type the passwords (but it's gone immediately, so I can't tell). After saying for a while that it is connecting, it gives up. Syslog looks like this:

grep NetworkManager /var/log/syslog
Jul  9 15:12:11 hostname NetworkManager[811]: <info> Starting VPN service 'vpnc'...
Jul  9 15:12:11 hostname NetworkManager[811]: <info> VPN service 'vpnc' started (org.freedesktop.NetworkManager.vpnc), PID 2136
Jul  9 15:12:11 hostname NetworkManager[811]: <info> VPN service 'vpnc' appeared; activating connections
Jul  9 15:12:15 hostname ureadahead[307]: ureadahead:NetworkManager_new.1445: Ignored relative path
Jul  9 15:12:15 hostname ureadahead[307]: ureadahead:NetworkManager: Ignored relative path
Jul  9 15:12:15 hostname ureadahead[307]: message repeated 3 times: [ ureadahead:NetworkManager: Ignored relative path]
Jul  9 15:12:15 hostname ureadahead[307]: ureadahead:NetworkManager_new.1490: Ignored relative path
Jul  9 15:12:15 hostname ureadahead[307]: ureadahead:NetworkManager: Ignored relative path
Jul  9 15:12:15 hostname ureadahead[307]: message repeated 2 times: [ ureadahead:NetworkManager: Ignored relative path]
Jul  9 15:14:11 hostname NetworkManager[811]: <error> [1436447651.584396] [vpn-manager/nm-vpn-connection.c:1778] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.

Creating a connection with the passwords in the configuration didn't help either:
Jul 9 16:46:17 hostname NetworkManager[811]: [1436453177.020663] [vpn-manager/nm-vpn-connection.c:1778] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.

I have tried manually creating a conf file, which seemed to be partially successful. ifconfig had an extra item called tun0, I could ping websites using URLs, but couldn't load any websites in my browser. This might be an indication that my problem similar to this one, but not quite, because not having websites working is quite a restriction. This is what I did there:

user@hostname:~$ sudo vpnc-connect /etc/vpnc/my_vpn_config.conf
[sudo] password for user: 
Enter IPSec secret for groupname@123.123.123.123: 
Enter password for user@123.123.123.123:
VPNC started in background (pid: 19663)...
user@hostname:~$ ping askubuntu.com
PING askubuntu.com (122.122.122.122) 56(84) bytes of data.
64 bytes from 122.122.122.122: icmp_seq=1 ttl=59 time=51.1 ms
user@hostname:~$ sudo vpnc-disconnect
Terminating vpnc daemon (pid: 19663)

the syslog for this connection looks like this:

Jul  9 16:15:54 hostname NetworkManager[811]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed
Jul  9 16:15:54 hostname NetworkManager[811]: <info> (tun0): carrier is OFF
Jul  9 16:15:54 hostname NetworkManager[811]: <info> (tun0): new Tun device (driver: 'unknown' ifindex: 6)
Jul  9 16:15:54 hostname NetworkManager[811]: <info> (tun0): exported as /org/freedesktop/NetworkManager/Devices/5
Jul  9 16:15:54 hostname NetworkManager[811]: <info> devices added (path: /sys/devices/virtual/net/tun0, iface: tun0)
Jul  9 16:15:54 hostname NetworkManager[811]: <info> device added (path: /sys/devices/virtual/net/tun0, iface: tun0): no ifupdown configuration found.
Jul  9 16:15:54 hostname NetworkManager[811]: <info> (tun0): link connected
Jul  9 16:15:54 hostname NetworkManager[811]: <info> (tun0): device state change: unmanaged -> unavailable (reason 'connection-assumed') [10 20 41]
Jul  9 16:15:54 hostname NetworkManager[811]: <info> (tun0): device state change: unavailable -> disconnected (reason 'connection-assumed') [20 30 41]
Jul  9 16:15:54 hostname NetworkManager[811]: <info> Activation (tun0) starting connection 'tun0'
Jul  9 16:15:54 hostname NetworkManager[811]: <info> Activation (tun0) Stage 1 of 5 (Device Prepare) scheduled...
Jul  9 16:15:54 hostname NetworkManager[811]: <info> Activation (tun0) Stage 1 of 5 (Device Prepare) started...
Jul  9 16:15:54 hostname NetworkManager[811]: <info> (tun0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Jul  9 16:15:54 hostname NetworkManager[811]: <info> Activation (tun0) Stage 2 of 5 (Device Configure) scheduled...
Jul  9 16:15:54 hostname NetworkManager[811]: <info> Activation (tun0) Stage 1 of 5 (Device Prepare) complete.
Jul  9 16:15:54 hostname NetworkManager[811]: <info> Activation (tun0) Stage 2 of 5 (Device Configure) starting...
Jul  9 16:15:54 hostname NetworkManager[811]: <info> (tun0): device state change: prepare -> config (reason 'none') [40 50 0]
Jul  9 16:15:54 hostname NetworkManager[811]: <info> Activation (tun0) Stage 2 of 5 (Device Configure) successful.
Jul  9 16:15:54 hostname NetworkManager[811]: <info> Activation (tun0) Stage 3 of 5 (IP Configure Start) scheduled.
Jul  9 16:15:54 hostname NetworkManager[811]: <info> Activation (tun0) Stage 2 of 5 (Device Configure) complete.
Jul  9 16:15:54 hostname NetworkManager[811]: <info> Activation (tun0) Stage 3 of 5 (IP Configure Start) started...
Jul  9 16:15:54 hostname NetworkManager[811]: <info> (tun0): device state change: config -> ip-config (reason 'none') [50 70 0]
Jul  9 16:15:54 hostname NetworkManager[811]: <info> Activation (tun0) Stage 5 of 5 (IPv4 Configure Commit) scheduled...
Jul  9 16:15:54 hostname NetworkManager[811]: <info> Activation (tun0) Stage 3 of 5 (IP Configure Start) complete.
Jul  9 16:15:54 hostname NetworkManager[811]: <info> Activation (tun0) Stage 5 of 5 (IPv4 Commit) started...
Jul  9 16:15:54 hostname NetworkManager[811]: <info> (tun0): device state change: ip-config -> ip-check (reason 'none') [70 80 0]
Jul  9 16:15:54 hostname NetworkManager[811]: <info> Activation (tun0) Stage 5 of 5 (IPv4 Commit) complete.
Jul  9 16:15:54 hostname NetworkManager[811]: <info> (tun0): device state change: ip-check -> secondaries (reason 'none') [80 90 0]
Jul  9 16:15:54 hostname NetworkManager[811]: <info> (tun0): device state change: secondaries -> activated (reason 'none') [90 100 0]
Jul  9 16:15:54 hostname NetworkManager[811]: <info> Activation (tun0) successful, device activated.
Jul  9 16:17:49 hostname NetworkManager[811]: <info> (tun0): device state change: activated -> unmanaged (reason 'removed') [100 10 36]
Jul  9 16:17:49 hostname NetworkManager[811]: <info> (tun0): deactivating device (reason 'removed') [36]
Jul  9 16:17:49 hostname NetworkManager[811]: <info> devices removed (path: /sys/devices/virtual/net/tun0, iface: tun0)

kvpnc gives error: Timeout while connecting to 123.123.123.123. vpnc connect process will be killed. Pinging the gateway returns within 50ms.

I'm not too sure what else to try. Other options (pptp, openconnect, openvpn) seem to require a CA certificate, which I don't have, so I assume I'm stuck with vpnc. Hopefully someone out there will have some ideas?

Edit: it seems to be a variant of this bug, although the fix there didn't work for me.

Related Question