Bug 483120
Summary: | [enh] add 'connect automatically' for VPNs | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | eric | ||||||
Component: | NetworkManager | Assignee: | Lubomir Rintel <lkundrak> | ||||||
Status: | ASSIGNED --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | low | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | rawhide | CC: | afonsobordado, alick9188, bugzilla.redhat.com, cervajs, clancy.kieran+redhat, dcbw, ddosia, fredrik, kagesenshi.87, mcepl, michael.monreal, rh, rkhan, samuel-rhbugs, tom, wtogami | ||||||
Target Milestone: | --- | Keywords: | FutureFeature, Triaged | ||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Enhancement | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | Type: | --- | |||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
eric
2009-01-29 18:54:59 UTC
Still true with soon-to-be Fedora 11 and packages: vpnc-0.5.3-3.fc11.x86_64 NetworkManager-devel-0.7.1-4.git20090414.fc11.x86_64 NetworkManager-glib-0.7.1-4.git20090414.fc11.x86_64 NetworkManager-0.7.1-4.git20090414.fc11.x86_64 NetworkManager-gnome-0.7.1-4.git20090414.fc11.x86_64 NetworkManager-vpnc-0.7.0.99-1.fc11.x86_64 This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle. Changing version to '11'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping *** Bug 509773 has been marked as a duplicate of this bug. *** *** Bug 517800 has been marked as a duplicate of this bug. *** I do not think that bug 517800 is a dupe of this one. Can you re-open that one? (In reply to comment #5) > I do not think that bug 517800 is a dupe of this one. Can you re-open that one? It's a dupe because the fix for this bug will also include the fix for bug 517800. Is there any update on this? I still have this problem in version 12. (In reply to comment #7) > I still have this problem in version 12. Same for F13 btw This message is a reminder that Fedora 12 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 12. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '12'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 12's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 12 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping Still the same in F14. Please update version number accordingly. Same problem in Fedora 15. Does not connect automatically although 'Automatically start connecting next time' is selected. Works if session is logged out/logged in, but does not work if reboot the OS as described above initially. any hints or workarounds? same issue on FC 15 Created attachment 519128 [details] Script to automatically connect to a VPN I have the following workaround in place. It should be flexible enough to cover what you want I think: Place the script at /etc/NetworkManager/dispatcher.d/99-autovpn and make sure it is executable. Make sure NetworkManager is set to NOT automatically start the VPN (since this is what the script does for you instead). Basically, every time a network connection goes up or down, the script is run, and it matches connections against a triple of data (interface, NM network name, up or down). In my case, it is set to wait until interface wlan0 connects to "My wireless network", and then starts the VPN named MYVPN. This also works around bug 517800. 1) Change wlan0 to the interface you want to wait for - this could also be eth0. 2) Change "My wireless network" to the name of the network you want to wait for (the name is specified in the NetworkManager configuration). You can just put * (without quotes) if you want to connect regardless of which network you go to. 3) Change "MYVPN" to the name of your VPN connection as specified in NetworkManager. Obviously, you can make more than one case statement if you want more flexibility. Each time the script is run, the triple is logged to syslog (/var/log/messages), so you can see what interfaces and network names do or do not trigger the VPN connection. The script is actually general enough to do quite a few things with it. I have another script like this that detects when I connect to my university wireless network and automatically submits my user/pass to their "web login" page. there is one more problem, when vpn connection closes during network glitch, it will not restore, despite of the option "connect automaticly". as another workaround i put in 99-autovpn such line: ... case $2 in vpn-down) nmcli con up uuid $MYVPNUID ;; esac ... little bit ugly, but it works ty i have the same problem. "connect automatically" doesnt work fedora 16 32-bit, openvpn NetworkManager-0.9.7.0-2.git20121004.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/NetworkManager-0.9.7.0-2.git20121004.fc18 NetworkManager-0.9.7.0-3.git20121004.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/NetworkManager-0.9.7.0-3.git20121004.fc18 Package NetworkManager-0.9.7.0-3.git20121004.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing NetworkManager-0.9.7.0-3.git20121004.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-15525/NetworkManager-0.9.7.0-3.git20121004.fc18 then log in and leave karma (feedback). Do we really have VPN autoconnect? I thought we currently had only binding VPNs to connections. NetworkManager-0.9.7.0-4.git20121004.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/NetworkManager-0.9.7.0-4.git20121004.fc18 Yeah, currently we can just bind VPN to connections, which could serve as a means of auto-connecting. However, "Connect automatically" checkbox and VPN reconnection when base connection is disrupted still need to be implemented. Back to ASSIGNED. this feature have been missing for quite a while on gnome3 networkmanager .. any news of it coming back ? You can use "systemctl enable openvpn@myconnection" to have it start automatically. However, openvpn has dns issues so I start (and restart) it manually anyway. erm .. aint systemctl command is for connections configured using config file instead of networkmanager? .. older networkmanager used to have a way to bind vpn tp connections which will auto-connect vpn when i'm connected to a particular network, but this feature have been missing in newer networkmanager, been waiting for several fedora releases for it to come back, but now on F21, its still missing. FWIW, I'm no longer seeing this problem now that I'm running KDE. Must be something GNOME specific. yes, its is gnome specific Yes, the systemctl option is a workaround, not a solution. You can still bind a vpn to a network, but you have to install and use nm-connection-editor. You will have to run it from the command line as well, since it doesn't show up in the gnome-shell activities view. Not sure if my problem fits under this issue, if it doesn't I'll file a separate bug report. By using the util "nm-connection-editor" the tickbox "Automatically connect to VPN using this connection" exists, and works if I manually connect to the selected Wifi. However, my network is marked with "Connect Automatically" in NetworkManager and upon a reboot Network manager fails to connect to my wifi if the setting "Automatically connect to VPN using this connection", and I must connect manually to the WiFi network that should auto-connect. Not a huge issue, but still annoying. Versions: NetworkManager-0.9.10.1-1.4.20150115git.fc21.x86_64 NetworkManager-openvpn-gnome-0.9.9.0-3.git20140128.fc21.x86_64 NetworkManager-pptp-0.9.8.2-6.fc21.x86_64 NetworkManager-adsl-0.9.10.1-1.4.20150115git.fc21.x86_64 NetworkManager-wwan-0.9.10.1-1.4.20150115git.fc21.x86_64 NetworkManager-bluetooth-0.9.10.1-1.4.20150115git.fc21.x86_64 NetworkManager-glib-0.9.10.1-1.4.20150115git.fc21.x86_64 NetworkManager-pptp-gnome-0.9.8.2-6.fc21.x86_64 NetworkManager-openconnect-0.9.8.6-2.fc21.x86_64 NetworkManager-vpnc-0.9.9.0-6.git20140428.fc21.x86_64 NetworkManager-vpnc-gnome-0.9.9.0-6.git20140428.fc21.x86_64 NetworkManager-wifi-0.9.10.1-1.4.20150115git.fc21.x86_64 NetworkManager-openvpn-0.9.9.0-3.git20140128.fc21.x86_64 NetworkManager-l2tp-0.9.8.7-3.fc21.x86_64 NetworkManager-config-connectivity-fedora-0.9.10.1-1.4.20150115git.fc21.x86_64 nm-connection-editor-0.9.9.0-15.git20140424.fc21.x86_64 Yeah, I suspect this is a slightly different problem but I'm also seeing that on F20. Update: found my particular issue with the wifi not connecting upon boot, by unticking the setting "Make available to other users" both on WiFi and on the VPN configuration, the issue disappears and both WiFi and VPN connects upon login. This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. Created attachment 1093445 [details]
Networkmanager autoconnect openvpn log
Hi, I have an update regarding this issue in Fedora 23 (the same behaviour was seen in fedora 22). The issue is in my case that Networkmanager tries to connect a number of times when I login after a reboot, and after maybe 3-5 times, it bails out due to unsuccessful connection attempts. When I manually connect to my wifi, openvpn autoconnects just fine. The same issues is experienced when returning from sleep, and a cold boot. For more information on the issue, see the attached log above: Networkmanager autoconnect openvpn log (journalctl -b --unit=NetworkManager) The following settings is configured for my WiFi in nm-connection-manager: "Automatically connect to this network when it is available" "All users may connect to this network" "Automatically connect to VPN when using this connection": VPN NetworkManager and openvpn packages installed: NetworkManager-wwan-1.0.6-8.fc23.x86_64 NetworkManager-1.0.6-8.fc23.x86_64 NetworkManager-openconnect-1.0.2-2.fc23.x86_64 NetworkManager-team-1.0.6-8.fc23.x86_64 NetworkManager-bluetooth-1.0.6-8.fc23.x86_64 NetworkManager-vpnc-gnome-1.0.6-3.fc23.x86_64 NetworkManager-libnm-1.0.6-8.fc23.x86_64 NetworkManager-openvpn-1.0.6-3.fc23.x86_64 NetworkManager-wifi-1.0.6-8.fc23.x86_64 NetworkManager-vpnc-1.0.6-3.fc23.x86_64 NetworkManager-openvpn-gnome-1.0.6-3.fc23.x86_64 NetworkManager-l2tp-0.9.8.7-4.fc23.x86_64 NetworkManager-pptp-1.1.0-2.20150428git695d4f2.fc23.x86_64 NetworkManager-config-connectivity-fedora-1.0.6-8.fc23.x86_64 NetworkManager-glib-1.0.6-8.fc23.x86_64 NetworkManager-adsl-1.0.6-8.fc23.x86_64 NetworkManager-pptp-gnome-1.1.0-2.20150428git695d4f2.fc23.x86_64 [root@hell tmp]# rpm -qa | grep openvpn NetworkManager-openvpn-1.0.6-3.fc23.x86_64 NetworkManager-openvpn-gnome-1.0.6-3.fc23.x86_64 openvpn-2.3.8-1.fc23.x86_64 (In reply to Fredrik from comment #34) > Hi, > I have an update regarding this issue in Fedora 23 (the same behaviour was > seen in fedora 22). > > The issue is in my case that Networkmanager tries to connect a number of > times when I login after a reboot, and after maybe 3-5 times, it bails out > due to unsuccessful connection attempts. > When I manually connect to my wifi, openvpn autoconnects just fine. > The issue is not specific to VPN/Wifi or a specific type of connection. There are missing secrets. The connections profiles that should be started on boot cannot depend on user agents providing secrets, because such secret agents are not available yet. So if, for example, you have a Wi-Fi connection and you store a password in a keyring, the connection can't be activated until you log in and an agent may provide NetworkManager with the password from the keyring. Nov 12 20:37:42 hell NetworkManager[936]: <error> [1447357062.570348] [vpn-manager/nm-vpn-connection.c:1980] get_secrets_cb(): Failed to request VPN secrets #3: (4) No agents were available for this request. (In reply to Jirka Klimes from comment #35) > > The issue is not specific to VPN/Wifi or a specific type of connection. > There are missing secrets. The connections profiles that should be started > on boot cannot depend on user agents providing secrets, because such secret > agents are not available yet. So if, for example, you have a Wi-Fi > connection and you store a password in a keyring, the connection can't be > activated until you log in and an agent may provide NetworkManager with the > password from the keyring. > > Nov 12 20:37:42 hell NetworkManager[936]: <error> [1447357062.570348] > [vpn-manager/nm-vpn-connection.c:1980] get_secrets_cb(): Failed to request > VPN secrets #3: (4) No agents were available for this request. Well in that case shouldn't the keyring and therefore the secrets be available after a successful login? The issues are occurring post-login, and the nm-applet icon is flickering during the connection attempts until it stalls. After the stalling and a manual connection to the wifi is attempted, the connection is established successfully - both to the wifi and the VPN. So the issue seems to be a communication issue between the keyring and NetworkManager then? |