key-direction not respected on OVPN import

Bug #1643282 reported by Mark Frost
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
network-manager-openvpn (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

When creating a VPN connection in Network Manager by importing an existing .ovpn file, the key-direction field is not respected.

I needed to manually go into Advanced->TLS Authentication and set the Key Direction to 1.

For example, my .ovpn file ends with the line:

key-direction 1

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: network-manager-openvpn 1.1.93-1ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-47.68-generic 4.4.24
Uname: Linux 4.4.0-47-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: Unity
Date: Sun Nov 20 09:06:20 2016
InstallationDate: Installed on 2016-06-30 (143 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: network-manager-openvpn
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Mark Frost (coneheed) wrote :
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
Revision history for this message
Giovanni Panozzo (giox069) wrote :

Same problem for me on Ubuntu 16.04. It seems that a workaround could be moving "key-direction 1" line before <tls-auth> line.

Revision history for this message
Bernd Konrad (derdummepunkt) wrote :

Ran into this exact issue today myself, 2 years later

openvpn .conf file contains the line
"key-direction 1"

after importing the config file, the key-direction in the vpn profile in the network manager is set to "none", resulting in timeouts when trying to establish the connection.

Took me a while to find that...

Revision history for this message
DeltaLima (Marcus) (dlm274) wrote :

Same problem here... Very annoiying - i had to research more hours to find that out ...
Any status from the package/project maintainer? Is that problam that hard to fix? I'm unfortunally not a programmer to do it on my own...

Is this bug also known for 17.10 or 18.04? Have not tried that out ...

73 best wishes

Revision history for this message
Peter Rosell (peter-rosell) wrote :

I can confirm that the workaround in comment #3 is working in Ubuntu 16.04.

Revision history for this message
Peter Rosell (peter-rosell) wrote :

It seems like this is fixed in a upstream version in the gnome package, https://github.com/GNOME/network-manager-openvpn/commit/28636684a268e280accaeb378f00f4a80e9e0377
I haven't tried it, but the commit comment is quite clear.

"import: fix parsing of key direction

The direction was ignored if the 'key-direction' statement appeared
after 'tls-auth' or 'secret'."

Revision history for this message
Giovanni Panozzo (giox069) wrote :

It seems to be fixed in ubuntu 18.04 too. I imported 4 profiles with "key-direction 1" and they all worked.

Revision history for this message
Sebastien Bacher (seb128) wrote :

The fix was added in 1.8.0 which is in bionic

Changed in network-manager-openvpn (Ubuntu):
importance: Undecided → Low
status: Confirmed → Fix Released
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.