vpn auto-connect works, but doesn't connect automatically when network is available.

Bug #1323594 reported by Minosone on 2014-05-27
This bug affects 16 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)

Bug Description

I'm having a bug in Ubuntu Trusty Tahr 14.04 LTS. The issue I'm having is that with a connection set to auto-connect to a PPTP-vpn, it does not auto-connect when (wireless)-network becomes available.

Syslog returns this error:

<error> [1401130450.367538] [nm-vpn-connection.c:1374] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.

However it does connect when when connecting to the particular connection manually. e.g. I select the wireless network in the network-manager.

This bug seems related to bugs:

The difference between my situation and the others is that vpn-autoconnect does work, it just doesn't work automatically.

Josh Dragon (misticzerx0r) wrote :

I am having the same issue. I have two different ubuntu machines both doing this! Very annoying please someone hear our cries! My vpn setup works great i just cant get it to auto connect in fact it won't even connect to the network when I have auto connect to vpn selected. I have to uncheck it to get it to connect to the network again. Please fix thanks!

Launchpad Janitor (janitor) wrote :

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

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

Same here. If I have wifi set to automatically connect to VPN, it doesn't connect on its own, I have to select the wifi network every time I log in / unlock my screen. If I *don't* have wifi set to automatically use VPN, the same wifi network will connect automatically, as expected. VPN works just fine, it's just the extra step that's annoying.

druucifer (druucifer) wrote :

I am experiencing the same bug in Mint 17 MATE Edition. If I set my wired connection to automatically start with the VPN, then my wired connection won't start automatically.

Nev Delap (nevdelap) wrote :

Same, on my Zenbook with Ubuntu 14.04, and my netbook with Mint 17 Cinnamon Edition. When set to automatically connect to the VPN it doesn't automatically connect to the WIFI, when manually connecting to the WIFI it does connect to the VPN.

Nev Delap (nevdelap) wrote :

Additionally, when unsuspending the Ubuntu machine doesn't reconnect to the WIFI, but the icon animates as if it is trying, but it gives up. The Mint machine does reconnect mostly, but sometimes appears connected but doesn't have connectivity and needs to be disconnected and reconnected.

Nev Delap (nevdelap) wrote :

Mine is an openvpn.

Vincent Yu (ubuntu-en) wrote :

Looks like NetworkManager is having issues getting the user's VPN password from gnome-key-daemon. I've posted a workaround at http://askubuntu.com/a/332796/109757. Basically, change password-flags=1 to password-flags=0 in /etc/NetworkManager/system-connections/<VPN> (warning: this will store the VPN password in plaintext).

royden (ryts) wrote :

Remains an issue on (L)ubuntu Xenial, network-manager 1.0.4-0ubuntu9

Minosone (menno-pleijster) wrote :

This issue seems to be no longer present on my system in Ubuntu 16.04. Wifi and VPN connect automatically without problems.

Changed in network-manager (Ubuntu):
importance: Undecided → Low
status: Confirmed → Fix Released
johnnynobody (engage1) wrote :

I'm having this problem with an ethernet connection and openvpn on Ubuntu 16.04.01 LTS. When booting or rebooting, the network won't come up at all. But, if I select "Disconnect VPN" the network comes up. After the network comes up, I can enable the VPN and the client connects to the server.

network-manager 1.2.2-0ubuntu0.16.04.3
network-manager-openvpn 1.1.93-1ubuntu1
openvpn 2.3.10-1ubuntu2

Marzanna (marzanna) wrote :

I have this bug in freshly installed Xubuntu 17.04.
Ethernet doesn't connect automatically with VPN.

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

Other bug subscribers