Hide Forgot
Description of problem: Openvpn appears to work only as root. If I invoke openvpn with a file from the command line using "sudo", openvpn works. If I try to invoke it using the kde network connections after setting up the vpn by importing the vpn file, and try to invoke it from the network connections panel icon, openvpn times out. Version-Release number of selected component (if applicable): openvpn-2.3.13-1.fc24.x86_64 How reproducible: Try to invoke openvpn as a regular user. I'm using the kde spin of fedora 24. Steps to Reproduce: 1. As root, modify /usr/lib/systemd/system/openvpn@.service to add lines for an environment variable (shown with arrows): ... --> Environment=OPENSSL_ENABLE_MD5_VERIFY=1 ExecStart=/usr/sbin/openvpn --daemon --writepid \ /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf --> ExecStartPost=/etc/openvpn/post-start-openvpn.sh ... 2. As root, copy the above file to /etc/systemd/system/openvpn 3. Download an openvpn file (e.g. Stockholm.ovpn) from Private Tunnel account. 4. Select networks in system tray 5. Select "configure network connections" icon (the wrench at top right) 6. Select the "Add button" 7. Select "Import VPN" 8. Find and select the .ovpn file At this point, there is an entry in the list of connections, which allows all users to connect to VPN. However, if one clicks on "connect" it sits and spins until a timeout message appears. Actual results: connection times out Expected results: connection succeeds Additional info: If I use the command line and execute the following, it works: sudo openvpn <path to>/Stockholm.ovpn If I did not do the first two items in "Steps to Reproduce", the connection failed with a fatal error rather than simply timing out.
I haven't used KDE in a very very long time (several years, around Fedora 18, iirc) - so this reply might be very misleading. But what you describe, isn't that NetworkManager stuff? If so, ensure you have the NetworkManager-openvpn plug-in installed, and then things should work quite well. It shouldn't be needed to mess around with systemd unit files in this case if you let NetworkManager be in charge. I'm primarily using GNOME 3, and start OpenVPN connections on a daily basis via the NetworkManager integration there. No special tweaks needed.
The plugin was installed when I upgraded to Fedora 24 some time ago: $ sudo dnf install NetworkManager-openvpn Last metadata expiration check: 2:23:47 ago on Thu Nov 17 07:40:15 2016. Package NetworkManager-openvpn-1:1.2.4-2.fc24.x86_64 is already installed, skipping. Dependencies resolved. Nothing to do. Complete! Sorry, that doesn't seem to be the problem. I'll install Gnome 3, login using Gnome, and try again....
To get gnome, I did: sudo dnf install gnome* NetworkManager*gnome. Then I tried both Gnome Classic and Gnome. In both cases, the results were the same: On the command line, sudo openvpn SanJose.ovpn succeeded. When I tried to add that file using Network Management, it balked at the section "extra-certs", and would not accept the file. When I removed that section, it added the SanJose vpn profile, and all looked good. However, it timed out, just like it did in KDE.
What does the log files say? This begins to really smell like NetworkManager issue, but on the other hand it is not unexpected that it won't work if the "extra-certs" isn't added to the configuration NetworkManager will use. The NetworkManager-openvpn plug-in will parse the configuration file, to build up a new command line on-the-fly when starting a VPN profile. So NetworkManager will not directly use the configuration file you've imported (hence the word "import").
Created attachment 1221666 [details] /var/log/messages after creating OpenVPN item
Created attachment 1221667 [details] /var/log/messages after failure to connect using network icon
Created attachment 1221668 [details] /var/log/messages after command-line attempt succeeded
This seems to be to be a NetworkManager-openvpn issue. OpenVPN is started as expected, but as --extra-certs is not applied it will interfere with getting a connection with the server; hence the timeout. In my opinion, NetworkManager-openvpn needs to be updated to provide --extra-certs as well as the other options. And my argument why, is that the configuration file does work fine when being started via the command line.
This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. 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 EOL if it remains open with a Fedora 'version' of '24'. 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. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 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, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. 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.
Bug still exists in Fedora 25.
This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. 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 EOL if it remains open with a Fedora 'version' of '25'. 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. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 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, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. 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.
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.