Bug 1380904 - Import .OVPN File using NetworkManger
Summary: Import .OVPN File using NetworkManger
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager-openvpn
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-01 10:37 UTC by Mohammed Tayeh
Modified: 2017-02-14 16:11 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-14 00:37:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
import ovpn using Gnome NetworkManger (13.99 KB, image/png)
2016-10-01 10:37 UTC, Mohammed Tayeh
no flags Details

Description Mohammed Tayeh 2016-10-01 10:37:43 UTC
Created attachment 1206499 [details]
import ovpn using Gnome NetworkManger

Description of problem:
Gnome NetworkManger failed to import 'ovpn' file
i think NetworkManager-openvpn does not support the openvpn parameters "reneg-sec". 
when i import using gnome network i get massage like attachment.
when import using nmcli command i got error like this 
  Error: failed to import 'VPN.ovpn': configuration error: invalid 1th argument to 'reneg-sec' where number expected (line 34).


Version-Release number of selected component (if applicable):
installed component:
   openvpn-2.3.12-1.fc24.x86_64
   NetworkManager-openvpn-1:1.2.4-2.fc24.x86_64
   NetworkManager-openvpn-gnome-1:1.2.4-2.fc24.x86_64

How reproducible:
you can test using this ovpn file 
https://mega.nz/#!xdFxjIaZ!rzgTXESdfR1q6Ji28WBegDot3hCBwYQJFxNpSHXhFpw


Expected results:
connect to open VPN server

Comment 1 Thomas Haller 2016-10-01 13:45:07 UTC
the config has:

reneg-sec 2592000

which is 30 days.


That was not allowed during import. Fixed now upstream: https://git.gnome.org/browse/network-manager-openvpn/commit/?id=5f115c5af505cbe67845459249b52da5b2276c65


as workaround, just edit the file to have a smaller time value. If you really need such a large time setting, then configure it after importing the file.

Comment 2 Mohammed Tayeh 2016-10-01 22:38:13 UTC
(In reply to Thomas Haller from comment #1)
> the config has:
> 
> reneg-sec 2592000
> 
> which is 30 days.
> 
> 
> That was not allowed during import. Fixed now upstream:
> https://git.gnome.org/browse/network-manager-openvpn/commit/
> ?id=5f115c5af505cbe67845459249b52da5b2276c65
> 
> 
> as workaround, just edit the file to have a smaller time value. If you
> really need such a large time setting, then configure it after importing the
> file.

thank you 
that is work fine
just i am editing reneg-sec

thank you, and have a nice day

Comment 3 Markus Koch 2016-10-21 11:38:01 UTC
Hi,
I am adding a comment here. I cannot import an OpenVPN file into Networkmanager

# openvpn config.ovpn 

works perfect, but importing will fail completely.
I removed tabs in the file and it will be imported, but the certifcates are chosen wrong which cannot be changed via the gui 

Versions affected F23: 

NetworkManager-openvpn-1:1.0.8-2.fc23.x86_64
NetworkManager-openvpn-1:1.0.6-3.fc23.x86_64 

Has worked already in an older release

Cheers
 Markus

Comment 4 Thomas Haller 2016-10-21 13:14:46 UTC
(In reply to Markus Koch from comment #3)
> Hi,
> I am adding a comment here. I cannot import an OpenVPN file into
> Networkmanager
> 
> # openvpn config.ovpn 
> 
> works perfect, but importing will fail completely.
> I removed tabs in the file and it will be imported, but the certifcates are
> chosen wrong which cannot be changed via the gui 
> 
> Versions affected F23: 
> 
> NetworkManager-openvpn-1:1.0.8-2.fc23.x86_64
> NetworkManager-openvpn-1:1.0.6-3.fc23.x86_64 

fc23 is not affected by this bug, because the particular issue about regen-sec was introduced last. It is still present in f24, but not in f25.


Whatever you see, it's a different bug. Also, your description is not very clear. Note that f23 is rather old, we probably will not do another update there.

When "import" fails -- that is, the process of taking an .ovpn file and creating a NetworkManager connection profile from it -- that can generally be worked around by just manually creating the NetworkManager connection profile. For example using nm-connection-editor or nmcli.

It's not clear why you are unable to change the certificate in the GUI.


Anyway, it's a different bug, let's keep the issues separate.

Comment 5 B H 2017-02-14 00:01:08 UTC
Same here.  FC25, importing VPN using .ovpn file in NM fails without error.  I can get versions tonight.

Comment 6 Thomas Haller 2017-02-14 00:37:25 UTC
(In reply to B H from comment #5)
> Same here.  FC25, importing VPN using .ovpn file in NM fails without error. 
> I can get versions tonight.

whatever you see, it's certainly not this bug.




At this point, fedora 24 will not be rebased to a newer version, and the fix https://git.gnome.org/browse/network-manager-openvpn/commit/?id=5f115c5af505cbe67845459249b52da5b2276c65 doesn't seem important enough to be backported.
The reason is that it only affects import, and you can workaround it by editing the file before import, or just click the same configuration from scratch (without using import).


The issue is fixed on Fedora 25, which currently ships 1.2.6 release or newer (which has the patch).


I am closing this as NEXTRELEASE.

Comment 7 B H 2017-02-14 01:24:39 UTC
Thanks Thomas Although Im not sure where the F24 reference came from.  I did typo my OP.. I am using Fedora 25 (F25), and I am having an actual issue with NetworkManager.

Comment 8 B H 2017-02-14 04:09:45 UTC
So what happens now? Do need to open a new issue?

Comment 9 Thomas Haller 2017-02-14 08:42:27 UTC
(In reply to B H from comment #7)
> Thanks Thomas Although Im not sure where the F24 reference came from.  I did
> typo my OP.. I am using Fedora 25 (F25), and I am having an actual issue
> with NetworkManager.

Issues are tracked via separate bugs. Whatever issue you have, it is not the same as this bug because this particular issue is not present on F25. I suggest to open a new bug, or comment on an existing unresolved bug (which is about the *same* issue as yours). If in doubt, open a new bug.

When reporting a bug it's important to describe the issue in detail, including the package versions involved. If there is a failure during import, it is helpful to attach the ovpn file that causes the issue (after editing private data out!)

Comment 10 B H 2017-02-14 16:11:30 UTC
Gotcha, Ill submit another with as much info as I can garner.  Thanks


Note You need to log in before you can comment on or make changes to this bug.