OpenVPN not Working in 17.04 via "Import a saved VPN configuration"

Bug #1677198 reported by Lonnie Lee Best
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
NetworkManager
New
Undecided
Unassigned
network-manager-openvpn (Ubuntu)
Confirmed
High
Unassigned

Bug Description

I can definitely confirm that Network Manager's OpenVPN is not working yet in Ubuntu 17.04.

I set up my configuration via import:
http://neartalk.com/ss/2017-03-29_001_633x332.png

On all earlier versions of Ubuntu, after importing the configuration, I'm able to connect to the VPN. However, in 17.04, connection attempts always give this error immediately:

"The VPN Connection disconnected because the VPN Service has stopped"

Clearly the VPN Service has NOT stopped. I've confirmed that this error is false by taking the exact same import-file and I imported it into an Ubuntu 16.04 computer and then the VPN connected without issue. Also, with this same import-file I've had no issues in Ubuntu 16.10.

So I've thoroughly confirmed that there is no issue with the VPN service. The issue is with the client in Ubuntu 17.04.

I cannot upgrade to 17.04 until this is fixed.

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: network-manager-openvpn-gnome 1.2.6-2ubuntu1
ProcVersionSignature: Ubuntu 4.10.0-14.16-generic 4.10.3
Uname: Linux 4.10.0-14-generic x86_64
ApportVersion: 2.20.4-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity:Unity7
Date: Wed Mar 29 05:25:14 2017
InstallationDate: Installed on 2017-01-30 (58 days ago)
InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
SourcePackage: network-manager-openvpn
UpgradeStatus: Upgraded to zesty on 2017-03-27 (2 days ago)

Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :
description: updated
Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

Can someone please confirm this? 17.04 is about to be released.

Revision history for this message
A. Martos (al3xarm) wrote :

Ubuntu (Gnome DE) 17.04, cannot use OpenVPN. Every time I try to connect, nothing, but once it’s deactivated I get back my internet access. I don’t know if it’s the same issue though…

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in network-manager-openvpn (Ubuntu):
status: New → Confirmed
description: updated
Revision history for this message
Marcin Wojcik (nsi-fusion) wrote :

Installed Ubuntu Mate 17.04 today. Tried also Ubuntu 17.04. OpenVPN created by importing *.ovpn file. Does not work with the same error reported by others. Did not try on 16.10 or 16.04LTS.

Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

Can we raise the importance of this confirmed bug?

Revision history for this message
pureblood (freeseek) wrote :

I confirm the issue. I cannot login through VPN anymore since I updated from 16.10 to 17.04. I will also add to that it is impossible now to configure the VPN connections. The "Configure VPN..." option in the menu is grayed out and cannot be selected anymore from the NetworkManager.

Revision history for this message
pureblood (freeseek) wrote :

Okay, nevermind, in my case it was enough to delete the VPN connections and then add them again with the "Edit Connection..." option in the nm-applet menu (somehow "VPN Connections -> Configure VPN..." is grayed out and cannot be called). Once created again, the VPN connection work just fine as they used to. Maybe mine is a completely different problem.

summary: - OpenVPN not Working in 17.04
+ OpenVPN not Working in 17.04 via "Import a saved VPN configuration"
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software by following the instructions at https://wiki.ubuntu.com/Bugs/Upstream/GNOME. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

Changed in network-manager-openvpn (Ubuntu):
importance: Undecided → High
Revision history for this message
Jan-Åke Larsson (jalar) wrote :

I understand this is an upstream bug. I'll just write this here anyway, will post bug upstream later if nobody beats me to it.

Affects me too. The imported config said aes-256-cbc. That was read in as BF-something-or-other. Blowfish, not AES. After setting that to AES-256-CBC, the thing connects.

After some time, the following happens:

nm-openvpn[3577]: [integrity] Inactivity timeout (--ping-restart), restarting
nm-openvpn[3577]: SIGUSR1[soft,ping-restart] received, process restarting
nm-openvpn[3577]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
nm-openvpn[3577]: TCP/UDP: Preserving recently used remote address: [AF_INET]<ip address>:<port>
nm-openvpn[3577]: UDP link local: (not bound)
nm-openvpn[3577]: UDP link remote: [AF_INET]<ip address>:<port>
nm-openvpn[3577]: [integrity] Peer Connection Initiated with [AF_INET]<ip address>:<port>
nm-openvpn[3577]: Preserving previous TUN/TAP instance: tun0
nm-openvpn[3577]: /usr/lib/NetworkManager/nm-openvpn-service-openvpn-helper --debug 0 3573 --bus-name org.freedesktop.NetworkManager.openvpn.Connection_8 --tun -- tun0 1500 1558 <ip address> <mask> restart
nm-openvpn[3577]: WARNING: Failed running command (--up/--down): could not execute external program
nm-openvpn[3577]: Exiting due to fatal error
NetworkManager[667]: <error> [1496682880.1314] platform-linux: do-add-ip4-route[8: 0.0.0.0/0 50]: failure 101 (Nätverket kan inte nås)

It seems that nm-openvpn fails. Ideas on what to do?

Revision history for this message
Jan-Åke Larsson (jalar) wrote :

Okay, the GNOME bug seems to be https://bugzilla.gnome.org/show_bug.cgi?id=782584

That refers back to https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/1681295

The latter report contains a patch and patched packages that resolves the issue for me.

Revision history for this message
Jan-Åke Larsson (jalar) wrote :

No, still disconnects, but much longer intervals.

Revision history for this message
Jan-Åke Larsson (jalar) wrote :

Same failure as in #9

Revision history for this message
Jan-Åke Larsson (jalar) wrote :

I mean, same error as in #10

Revision history for this message
Jan-Åke Larsson (jalar) wrote :

After I fixed the certificate file access (making them world-readable) I have a stable OpenVPN connection.

Switching to network-manager-openvpn and network-manager-openvpn-gnome provided with zesty returns the system to a non-working state.

Switching to the patched packages at https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/1681295 gives a stable connection.

I have now chosen to pin the patched packages through

sudo apt-mark hold network-manager-openvpn
sudo apt-mark hold network-manager-openvpn-gnome

Revision history for this message
Mauro Gaspari (ilvipero) wrote :

Hello,
I had my share of issues with network-manager-openvpn, especially with profiles exported from pfsense appliances, as those tend to inline some configurations.
I remember I had issues with Ubuntu 17.04 and 16.04 but as I am testing now, it seems all profiles I have can be imported and used.

If you can share your configuration I might be able to help and run some tests. you can hide your certificate files and hostname.

Tested on Ubuntu 17.04 - no issue
network-manager-openvpn and network-manager-openvpn-gnome 1.2.6-2ubuntu1

Tested on Ubuntu 17.10 - no issue
network-manager-openvpn and network-manager-openvpn-gnome 1.2.6-2ubuntu1

Revision history for this message
Daniel Thee Roperto (roperto) wrote :

Hi,

I fixed mine removing deprecated items from the ovpn configuration file.

More specifically, my config had the "tls-remote" directive. After commenting it out, it works perfectly.

Cheers,

Daniel

Revision history for this message
Alex B. (4l3xb) wrote :

Hello,
I had a problem importing configuration files to create a VPN connection. Nothing would happen after clicking on "Import from file..".
After countless attempts (and only after turning my 2nd monitor on) I realized that the "Select file to import" window opens on the 2nd monitor and can't be moved to the main monitor.
After selecting the file to import and clicking "Open" on the 2nd monitor, the rest of the procedure to add a VPN worked fine and I was able to set a VPN connection.
I hope this helps.

PS: The same problem occurs with other applications.
    Ex. Trying to open a document in LibreOffice, the window to select the file opens on the 2nd
        monitor.

Revision history for this message
Alex B. (4l3xb) wrote :

I forgot to mention in my previous post (#18) that I use Ubuntu 17.10.

Cheers

Revision history for this message
Alex B. (4l3xb) wrote :

Hi again,

(follow-up to #18 & #19 posts)

I found out that "Display Mode" in Settings -> Devices -> Displays was set to "Join Displays".
Setting it to "Single Display" solves for me the issue of windows appearing on the 2nd monitor.

Revision history for this message
Jan-Åke Larsson (jalar) wrote :

Removing deprecated items from the ovpn configuration file does not help in my case. I still need the patched packages.

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

Other bug subscribers

Remote bug watches

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