NetworkManager does not auto-connect to VPNs marked "Connect Automatically"

Bug #280571 reported by Biji
428
This bug affects 95 people
Affects Status Importance Assigned to Milestone
NetworkManager
Fix Released
Wishlist
network-manager (Debian)
Fix Released
Unknown
network-manager-openvpn (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

VPN connections marked "Connect Automatically" are not activated when a wired or wireless network becomes available.

Fixed upstream in commit:

commit ece5e209cdc409a21e249dacbdbc953a1db4c6b7
Author: Jiří Klimeš <email address hidden>
Date: Tue Aug 21 17:49:41 2012 +0200

    core: VPN autoconnect feature (bgo #560471) (rh #483120)

    We go through the SECONDARIES state where we check if there are some
secondary
    (VPN or other) UUIDs that are to be activated before progressing to
ACTIVATED.
    In case of an error with a secondary UUID or its activation, the base
connection
    can't activate successfully.

Revision history for this message
Alexander Sack (asac) wrote :

could you please test the latest intrepid packages and if that doesnt help post a bug about this at bugzilla.gnome.org and drop the bug id you get there here? Thanks.

Changed in network-manager:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Alexander Sack (asac) wrote :

also state what vpn you are trying to connect to. attach your complete syslog as well.

Revision history for this message
Biji (biji) wrote :

Here is versions:

ii network-manager 0.7~~svn20081008t224042-0ubuntu3 network management framework daemon
ii network-manager-gnome 0.7~~svn20081012t133407-0ubuntu1 network management framework (GNOME frontend
ii network-manager-openvpn 0.7~~svn20081008t224042-0ubuntu1 network management framework (OpenVPN plugin
ii network-manager-pptp 0.7~~svn20081008t224042-0ubuntu1 network management framework (PPTP plugin)

vpn using openvpn to connect using Password-ed type of VPN

Revision history for this message
Tristan Hill (stan) wrote :

Possible duplicate of https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/279517 .

The "related:" comment from http://bugzilla.gnome.org/show_bug.cgi?id=349151 appears to talk about this - although no apparent mention of the "Connect Automatically" checkbox (which may have been added since that bug was created)

Revision history for this message
Gabriel Bauman (gabrielbauman) wrote :

I've tested using an OpenVPN connection on latest 8.10. Reconnecting to wireless or any other network does not cause the VPN to autoconnect, with the VPN's "connect automatically" option checked.

 o network-manager:
     0.7~~svn20081018t105859-0ubuntu1

 o network-manager-openvpn:
     0.7~~svn20081015t024626-0ubuntu1

Revision history for this message
Gabriel Bauman (gabrielbauman) wrote :

Here's the syslog.

description: updated
Changed in network-manager:
status: Incomplete → Confirmed
Revision history for this message
Alexander Sack (asac) wrote :

please open a bug in bugzilla.gnome.org for this issue as its best dealt there. Please give us the bug id you get there. Thanks!

Changed in network-manager:
importance: Low → Medium
status: Confirmed → Triaged
Revision history for this message
Alexander Sack (asac) wrote :

also please attach the complete syslog.

Revision history for this message
Hugo (hugoideler) wrote :
Revision history for this message
Martin Mai (mrkanister-deactivatedaccount-deactivatedaccount) wrote :

Thanks you Hugo. Linking the bug to the package.

Changed in network-manager:
importance: Undecided → Unknown
status: New → Unknown
Changed in network-manager:
status: Unknown → Confirmed
Revision history for this message
Gabriel Bauman (gabrielbauman) wrote :

Still broken, years later. Lucid is about to be released and this was reported in the Hardy era. The upstream bug appears stalled.

Revision history for this message
Christoph Langner (chrissss) wrote :

I can confirm that this is still an issue in Lucid. Trying a pptp vpn here.

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

Do I understand correctly that even though there is a "Connect Automatically" checkbox for VPN connection profiles in network-manager, it simply does not work? And this is known and understood upstream?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

As a temporary workaround, until this can be properly addressed upstream (and since we're so close to release), please consider using the script suggested in https://bugzilla.gnome.org/show_bug.cgi?id=349151#c38.

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote : Re: [Bug 280571] Re: NetworkManager does not auto-connect to VPNs marked "Connect Automatically"

On Wed, 2010-04-28 at 12:29 +0000, Mathieu Trudel wrote:
> As a temporary workaround, until this can be properly addressed upstream
> (and since we're so close to release), please consider using the script
> suggested in https://bugzilla.gnome.org/show_bug.cgi?id=349151#c38.

Or, given the bugginess of network-manager[1], I can just cast it aside
and configure /etc/network/interfaces and /etc/openvpn/*.

[1] For example, the OpenVPN connection editor wants a key file, a
certificate file and a CA certificate file and it has a file chooser to
select each one, and I do, but by the time it saves those to gconf, they
are completely different names in the same directory. I can't imagine
for the life of me how that got through even the most basic of QA.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Brian,

I understand your frustration, but we do need your help in identifying such issues, which often vary greatly between users and expectations :)

Have you filed a bug regarding this specific issue you're describing, or did you look for one that was already filed? It would be very helpful if you could either search quickly and add information to a bug that describes *exactly* the issue you're experiencing, or file a new bug so that we can focus on just that issue and/or mark it as duplicate if we later find a master bug. If you have a bug number, please post it here or email me directly with it so we can follow up.

Thanks!

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

On Wed, 2010-04-28 at 13:26 +0000, Mathieu Trudel wrote:
> Brian,

Hi Mathieu,

> Have you filed a bug regarding this specific issue you're describing,

Nope. I do file bugs but I have not filed this one (yet). TBH, I get
tired of filing bugs only to see problems persist across multiple
releases of Ubuntu Linux. Frequently bugs don't even get acknowledged
(or they get ignored after it becomes clear that it's not a 5 second
fix) and 6-12 months later the first acknowledgement is "hey, the new
release is coming out, is this bug still present in that release?",
which among other things presumes I am willing to upgrade to a
pre-release.

> or
> did you look for one that was already filed?

Again, nope (net yet). TBH, about this particular issue, I don't see
the point. It's clear that NM is quite buggy, that such a basic issue
exists in it. And even if I did find a bug filed about it already, what
would that solve for me? It wouldn't fix the issue I have in Lucid
currently and even if it did, and if there was a fix, through the whole
complicated process it takes to get an update into Ubuntu now, it would
likely not show up for months. I can't wait months. It's just easier
to push a buggy piece of software aside (when you can) and carry on with
things they way they were before the buggy software showed up, like
using /etc/network/interfaces and /etc/openvpn/*.

> It would be very helpful if
> you could either search quickly

I am sorry, but I really don't have the time. I already spend way too
much of my life reading, following and helping with other bugs in so
many other pieces of software that I don't have time to add yet another
one -- one for which I can work-around quite easily.

I'm sorry to be so unhelpful on this, but while it's an annoyance, it
has an easy work-around and I can spend my time working on other things
that don't have such easy work-arounds, or with even spend some time my
family, etc.

Again, sorry to be so unhelpful, but I am already stretched way too
thin.

Changed in network-manager:
importance: Unknown → Wishlist
Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

On Thu, 2010-09-16 at 02:46 +0000, Bug Watch Updater wrote:
> ** Changed in: network-manager
> Importance: Unknown => Wishlist

Look, I realize that there is some (likely completely fruitless -- will
changing a bunch of labels actually result in any of the thousands of
bugs filed being fixed? i doubt it) automated task of categorizing all
bugs from Unknown to something else, however this one needs another
look.

The title of this bug is 'NetworkManager does not auto-connect to VPNs
marked "Connect Automatically"'

How do you define a report that something does not do what it says it's
supposed to be doing as a "wishlist"? If something is described to do
something and it doesn't do it it's a bug, not a "wishlist".

Revision history for this message
elijah (elijah) wrote :

On 09/16/2010 01:14 PM, Brian J. Murrell wrote:

> How do you define a report that something does not do what it says it's
> supposed to be doing as a "wishlist"?

I could not agree more. Current network manager support for VPN is
really half-baked. Considering the increased use of VPNs, this is really
a problem for linux adoption.

-elijah

Revision history for this message
Robert Buhren (weelkin) wrote :

Maybe the next update of network-manager remove the "Connect Automatically" checkbox and change the status of this bug back to "wishlist" :)

Hope this gets fixed someday but i guess since this bug is open since 2008, it will not be fixed soon...

regards
welkin

Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

Just wanting to confirm the problem. I checked and unchecked the option several times, and already spend considerable time trying, before I came here to see that this is known since Oct 2008.

Having checkboxes in the GUI that do simply not work *IS* annoying, and it *WILL* harm Ubuntu's reputation.

Revision history for this message
Felix (apoapo) wrote :

Harm reputation is the most correct way to describe it!
Such small showstoppers have to be fixed. Its about the overall feeling using an OS.
And this bug is not a new one..

Reported by Biji on 2008-10-09

There are even programs like vpnautoconnect on SF that try to fix this. So this "bug" has not as low priority than it is treated here...

Revision history for this message
Felix (apoapo) wrote :

Btw as workaround:

Put this script (for me worked the 1. not modified script):

http://ubuntuforums.org/showthread.php?t=1316314

Into this folder:

/etc/NetworkManager/dispatcher.d/

Revision history for this message
centx (centx) wrote :

Just wanted to share the application "vpnautoconnect" as apo mentioned above.

http://sourceforge.net/projects/vpnautoconnect/

Maybe someone could incorporate the ideas from here into NM's autoconnect or something. I've had this problem for years, and now it seems, that with this rather clunky program, it finally works.

Changed in debian:
status: Unknown → New
Revision history for this message
Dmitry Savin (envelsavinds) wrote :

Still reproduced. It is not a 'wishlist' because there's a checkbox 'auto reconnect' that actually doesn't work.

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote : Re: [Bug 280571] Re: NetworkManager does not auto-connect to VPNs marked "Connect Automatically"

On 11-06-23 01:25 PM, Envel wrote:
> Still reproduced. It is not a 'wishlist' because there's a checkbox
> 'auto reconnect' that actually doesn't work.

It actually still is a wishlist item. Just like the zillion other bugs
I "wish" would get fixed. :-)

Revision history for this message
Bob The Builder (koendevoegt2002) wrote :

+1 Bug needs fixing...

Revision history for this message
James Shackleford (tshack) wrote :

+1

Bug needs fixing or checkbox needs to be removed.

Revision history for this message
bebugz (bebugz) wrote :

It hits the reputation, I'm installing that to newbies from Windows realm and they told - "Okay this is really great OS, we'll stay here, but... it was so easy to autoconnect to internet from Win, why it is not the case here?"

Revision history for this message
Felix (apoapo) wrote :

I always wonder if there is any department in the ubuntu team which is dedicated to the "reputation". There are quite a lot of bugs out there that hurt newbies.

This one is easy to fix, even fixed actually as we see in my previous post and the "vpnautoconnect" programm available somewhere. But no one patches the network manager or whatever to do this the easy way for newbies actually. (Wwho added the option to the GUI?? Why ist it still there when there is no code behind it?!)

(Same goes for the nvidia driver for old nvdidia cards. The full release cycle of Natty was without support for my gf's gfx card. How can i tell her that Ubuntu rocks, when flash, video, even desktop laggs?! )

As you said, it hits the reputation. Sometimes i wish i was a skilled programmer. I would surely dedicate my free time to bugs like this one.

Please do not take this as a flame but as my anxiety concerning the welfare of ubuntu.

Revision history for this message
Felix (apoapo) wrote :

Johannes Storm wrote a very tiny script. Is anyone able to prepare the patch here? I don't know where to start in the sources. NM is much to complicated for me to start helping with patches :(

For the meantime, his script for /etc/NetworkManager/dispatcher.d/:

#! /bin/bash

REQUIRED_CONNECTION_NAME="<Connection1>"
VPN_CONNECTION_NAME="<VpnConnection1>"

activ_con=$(nmcli con status | grep "${REQUIRED_CONNECTION_NAME}")
activ_vpn=$(nmcli con status | grep "${VPN_CONNECTION_NAME}")
if [ "${activ_con}" -a ! "${activ_vpn}" ];
then
    nmcli con up id "${VPN_CONNECTION_NAME}"
fi

Revision history for this message
Billie Thompson (billiecodes) wrote :

Still broken 3 years later. Could we at least get the checkbox removed?

Revision history for this message
Martin Maiwald (mm-maiwald) wrote :

Hi,

I've not been able to help myself running Ubuntu 11.10, I'm a Noob, though...

I've tried to compile the vpnautoconnect solution from sourceforge but even though in- and reinstalling all recquired packages I could not get it to configure because it does not find pcap.h
The python script somehow does nothing for me even though I gave it full rights.

If anybody has had the same problem with pcap.h and has solved it please let me know.

Regards

Revision history for this message
Domen Kožar (ielectric+) wrote :

Following script works with NM 0.9, goals:

    * if VPN connection is not disconnected by user himself, reconnect (configurable max_attempts)
    * on new active network connection, activate VPN

https://gist.github.com/1547663

Revision history for this message
Adam Bruce (brucey-99-deactivatedaccount) wrote :

This is still not fixed for 12.04, 4 years this has been open.

Surely within 4 years someone could either fix the bug or at least remove the 'connect automatically' checkbox?

Revision history for this message
Adam Bruce (brucey-99-deactivatedaccount) wrote :

Hugo created a bug report here: http://bugzilla.gnome.org/show_bug.cgi?id=562670

Which I can see has been reported as a dup of: https://bugzilla.gnome.org/show_bug.cgi?id=349151 (which this bug is now assigned to), however, this bug is titled ' [enh] automatically reconnect VPN if dropped ' which is not the same as the orginal bug, therefore I don't think it's a duplicate.

We are talking about auto connecting at startup, not reconnecting when the line drops.

If think we're waiting for the wrong bug to be fixed, maybe that's why it has taken so long?

Also at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589533 (which this bug is assigned to), Michael Biebl says

"Currently, VPN connection can not be autostarted. So I guess this option should
be greyed out."

... so maybe it can't be fixed?

I'm a novice at ubuntu development so I hope someone more experience can take another look at this

Thanks,

Adam

Revision history for this message
Felix (apoapo) wrote :

Necessary Code is already provided some posts before. I think no related programmer is watching this bug. Ubuntu needs a quality assurance team imo.

100 papercuts could be a project to fix this bug.

Revision history for this message
Christian Stöveken (excogitation) wrote :

@Adam Bruce:
The way I see it - there is no someone should. If no one steps up to the open tasks then that's how it is
and that's how it works with cooperative projects.

It still sucks - yes - and the policy of expiring bugs someone took the time and effort to report is
also demotivating in my opinion - but then again that's how it is done at the moment.

Revision history for this message
Colan Schwartz (colan) wrote :

To get this moving, it wouldn't hurt to start a bounty for this over at http://www.fossfactory.org/ or http://www.cofundos.org/ .

Revision history for this message
Andreas Wesik (ezel) wrote :

Still a BUG (not wishlist).

On Windows I could leave my computer on over nights running torrents over VPN. If it failed it would reconnect as soon as it could.

If I leave Ubuntu to do this task I will wake up in the morning and it might have uploaded/downloaded 100kb of data during that whole night. Windows got Ubuntu beat by a mile in VPN-handling. How sad.. .

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

I didn't think Windows had support for VPN at all. Last time I checked I thought you needed some third party VPN client from e.g. Cisco.

You could try another client in Ubuntu as well, like kvpn. It could have more options for reconnection.

Revision history for this message
Ansus (neptunia) wrote :

Windows has PPTP VPN support starting from Windows 95.

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

PPTP has security issues:

http://en.wikipedia.org/wiki/Point-to-Point_Tunneling_Protocol#Security

and is primarily used for Windows out of box compatibility. Cisco VPNs is not supported in other modes: http://superuser.com/questions/50613/can-windows-7-built-in-vpn-replace-cisco-vpn

Thomas Hood (jdthood)
tags: added: precise
Revision history for this message
Adam Bruce (brucey-99-deactivatedaccount) wrote :

Could someone start by un-assigning this from gnome-bugs #349151, as this is definately not the same bug. And remove the Wishlist tag as this is not a wishlist item.

debbugs #589533 is the correct bug so I'm going to post over there and see if we can get some feedback on this.

Adam

Changed in network-manager:
importance: Wishlist → Undecided
status: Confirmed → New
Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

Done (no special permission needed for that). Could you please report this bug upstream, where it must be fixed: https://bugzilla.gnome.org/enter_bug.cgi

affects: debian → network-manager (Debian)
Revision history for this message
Adam Bruce (brucey-99-deactivatedaccount) wrote :

This bug is being worked on at https://bugzilla.gnome.org/show_bug.cgi?id=560471 so I've linked this report to that one

Changed in network-manager:
importance: Undecided → Unknown
status: New → Unknown
Revision history for this message
Adam Bruce (brucey-99-deactivatedaccount) wrote :

Should 'network-manager (Debian)' and 'network-manager (Ubuntu)' be assigned to that gnome bug report as well? As that is where it will be fixed?

I'm quite new to launchpad and reporting bugs, but I'm learning!

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

Nope, it must be done by the Ubuntu and Debian package maintainers by importing a new upstream release after it has been fixed or by backporting the needed patches, so it is fine how it is now.

Changed in network-manager:
importance: Unknown → Wishlist
status: Unknown → Confirmed
Revision history for this message
Stephen Morrish (stephen-morrish) wrote :

I can report that this "bug" is still present in 12.10 Beta. Not sure if "bug" is the right "open sore" might be better. Can't believe this has been open since 2008! Reading the comments has raised a smile at the very least,I feel your pain...

Revision history for this message
Ansus (neptunia) wrote :

It is easier to switch to openSUSE where you can set up VPN via Yast and it will be up in every session automatically, even in console session and different desktops.

Revision history for this message
James Cuzella (trinitronx) wrote :

Confirmed still in network-manager-vpnc 0.9.4.0-0ubuntu1 on Ubuntu 12.04.1 LTS (Precise Pangolin).

Would be really nice if connect automatically checkbox would actually work! I think it's about time someone who knows about this piece, and where to look in order to fix it took it into consideration again ^_^

tags: added: quantal
Revision history for this message
Adam Bruce (brucey-99-deactivatedaccount) wrote :

I tried to get this sorted out over at Gnome.

Basically the short answer is 'Connect Automatically' does not work which is why this is marked as 'wishlist'.

I'll see if we can get the checkbox removed which is the main issue now

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

I guess we quite easily could have done a patch to remove the autoconnect box until it is working.

Revision history for this message
Adam Bruce (brucey-99-deactivatedaccount) wrote :

Well the guy at Gnome seems a little hostile to be honest. He said he'd prefer if it was fixed, but I don't see that happening anytime soon as this has been a bug since 2008 and I doubt it will be fixed for Quantal.

If we want it sorted for Quantal, I guess we should just patch it ourselves and remove the checkbox

Revision history for this message
Strange Fox (kero-05h) wrote :

This really shouldn't be downgraded to wishlist.

Auto-connecting to a VPN is a standard and I dare-say critical feature for many VPN users.

If upstream isn't willing to fix the issue, then the community should take it up. I mean...my god, this bug has been around since the Hardy area. That's 9 release cycles ago.

Changed in network-manager:
importance: Wishlist → Undecided
status: Confirmed → New
Revision history for this message
Nick Leverton (nick-leverton) wrote :

Still broken in Quantal (12.10).

This is not a wishlist, this is a feature supposedly offered by the software - the VPN tab has a "Connect automatically" checkbox and it does not work.

Revision history for this message
Nick Leverton (nick-leverton) wrote :

Actually I apologise for being snarky yesterday. I've read the full upstream bug now and whilst it is a complex set of needs to make VPNs work in all use cases (mine being relatively simple), it looks like NM with this check box is up to its usual tricks of claiming features that just don't work in even the simplest use case.

This being so, I agree - patch the option out until upstream gets around to fixing it, if ever.

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

Someone has messed up the bug link. This bug _has_ actually been fixed upstream and you should expect a fix in the next version of Ubuntu.

Changed in network-manager:
importance: Undecided → Unknown
status: New → Unknown
Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

You also might be talking about bug #344455.

description: updated
Revision history for this message
Domen Kožar (ielectric+) wrote :

What is the actual bug link_

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

The upstream bug report is found at: https://bugzilla.gnome.org/show_bug.cgi?id=560471

The fix is in a single commit, so it should be possible to backport to Precise LTS.

Revision history for this message
Ansus (neptunia) wrote :

In the future I suggest people to report bugs directly to Red Hat. Otherwise you may wait for a fix indefinitely cause Canonical has no developers upstream.

Revision history for this message
Strange Fox (kero-05h) wrote :

So how do we begin the SRU process?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Ansus; it doesn't mean we can't send patches. I can't possibly see every comment of every bug, there's just too many.

This can't be shipped as SRU; it depends on rather intrusive changes to NM and would furthermore need changes to nm-applet (including new strings that would have to be translated) to be useful in any way. It's actually many commits (at least two) with a pretty high chance of introducing regressions.

It's now shipping in ubuntu raring (what will be 13.04) though, so I'm closing this as Fix Released.

Changed in network-manager (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

@Ansus, the bug is reported and fixed upstream: https://bugzilla.gnome.org/show_bug.cgi?id=560471. If you can reproduce a bug in Fedora, of course you can report it there too and maybe be more likely it is fixed upstream, but reporting it in the upstream bug tracker should be sufficient.

Changed in network-manager (Debian):
status: New → Fix Released
Changed in network-manager:
importance: Unknown → Wishlist
status: Unknown → Fix Released
Revision history for this message
iGadget (igadget) wrote :

So I understand this bug has been fixed upstream over 5 months ago. Now how long will it take for this fix to trickle down into Precise? Anything I can do to speed it up?

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

My best solution is either to wait for the next LTS in some months or use a backport (I'm not sure there is one now that contains the fix).

Revision history for this message
Minosone (menno-pleijster) wrote :

Please advice: I'm having a bug in Ubuntu Trusty Tahr 14.04 LTS that is very much related to this bug, but it might not be quite the same. So I can either file a new bug report or reopen this one.

The issue I'm having is that although the VPN auto-connects for connections that are marked as such. It only does so when connecting to the particular connection manually. e.g. I select the wireless network in the network-manager.

It however does not auto-connect when wireless is enabled or if the network comes into range. It connects and authenticates fine with the wireless network, but then fails to connect the vpn. It returns the following error in syslog:

<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.

Should I reopen this bug or file a new one?

Revision history for this message
Stephan Springer (geryon) wrote :

It is always better to file a new bug if in doubt.

Revision history for this message
Minosone (menno-pleijster) wrote :

I have filed bug #1323594.

affects: network-manager (Ubuntu) → network-manager-openvpn (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.