<SOLVED> Cannot add working openVPN through network manager

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
User avatar
Znap!
Level 1
Level 1
Posts: 45
Joined: Wed Oct 30, 2013 3:57 pm

<SOLVED> Cannot add working openVPN through network manager

Postby Znap! » Tue Aug 29, 2017 3:39 pm

Howdy all!

This is the second time I've tried to connect to a VPN on this laptop - first time through a friend's server, this time through a paid VPN provider (ra4wvpn.com).

I've downloaded a bunch of config files, and have tried creating a new connection through Network Manager by going to NM > Edit > Add > Import a Saved VPN Configuration. When I do that and point to one of several .ovpn files, it only adds the gateway address, but does not add the certificate. Yet, I can see that the certificate info is in that same file. When I export the certificate into a ca.crt file, add that manually and then add my username and password, it still won't connect. From what I can tell, I can only extract the ca certificate from the config file, and not a key or user certificate (probably because it connects through a username and password).

I can see NM trying to connect = I see the moving circle, a lock, a moving circle, a lock, etc. but then after some time it just gives up and doesn't connect.

Am not sure why the settings aren't imported from the .ovpn config file or why I cannot add them manually either, so any help is welcome here. (:

Using LM 17.3 xfce. Have already upgraded openvpn.
Last edited by Znap! on Wed Aug 30, 2017 2:00 pm, edited 1 time in total.

User avatar
phd21
Level 14
Level 14
Posts: 5031
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Cannot add working openVPN through network manager

Postby phd21 » Tue Aug 29, 2017 4:51 pm

Hi "Znap!",

It would help to know more about your system setup. If you run "inxi -Fxzd" from the console terminal prompt, highlight the results, copy and paste them back here, that should provide enough information.

Linux Mint 18.x will automatically create (extract) the necessary certificate and key files from the ".ovpn" configuration file, but in Linux Mint 17.x you will have to create them yourself which is not hard to do (see links below). There may be other requirements from the VPN provider as well. It would help to have a sample of an ".ovpn" file.

How to Establish An OpenVPN Connection in Ubuntu (Linux Mint)
https://timwolverson.wordpress.com/2016/11/22/how-to-set-up-openvpn-linux-mint/

How to Establish An OpenVPN Connection in Ubuntu 14.04 (Linux Mint 17.x)
- note in Linux Mint 18.x, the certificate and key files are automatically generated, yeah!
http://ubuntuhandbook.org/index.php/2014/05/establish-openvpn-connection-ubuntu-1404/


Hope this helps ...
Phd21: Mint KDE 17.3 & 18.2, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,3gb Ram,160gb hdd, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

User avatar
Znap!
Level 1
Level 1
Posts: 45
Joined: Wed Oct 30, 2013 3:57 pm

Re: Cannot add working openVPN through network manager

Postby Znap! » Wed Aug 30, 2017 6:17 am

Hi phd21! Thanks for your quick response. I've read through a couple of threads and was struck by your very well written and informative posts on VPNs. Much appreciated for the help so far.

At work now, but when I get home I'll pastebin the inxi results to see if they're of any help.

Meanwhile, here's an example of the contents of one of the config files: https://pastebin.com/62DgLJJk.

Also, the VPN provider's support suggests to (ra4wvpn.com) manually import the certificate. After that didn't work, they suggest the following: "You need to set the key direction to 1 manually. I've seen this before on Ubuntu, but we changed the order of the configuration files and it worked after that. The key direction is probably the issue." The content of the config file does specifically say key direction 1 so it seems that's set to 1 already.

Will report back!

User avatar
phd21
Level 14
Level 14
Posts: 5031
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Cannot add working openVPN through network manager

Postby phd21 » Wed Aug 30, 2017 10:38 am

Hi "Znap!",

You are welcome...

According to the ".ovpn" file that you linked to, after importing a VPN server connection, you have to edit that new VPN connection to enter in your login information and "Connection Type", then click the advanced button option, click the TLS Settings tab, to specify "tls-auth" key file with a "key-direction 1" (Client1).

This is very similar to the way ProtonVPN is configured, so see the post below
<SOLVED> Network Manager Won't Connect to ProtonVPN
https://forums.linuxmint.com/viewtopic.php?f=90&t=248595&hilit=protonvpn

Hope this helps ...
Phd21: Mint KDE 17.3 & 18.2, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,3gb Ram,160gb hdd, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

User avatar
Znap!
Level 1
Level 1
Posts: 45
Joined: Wed Oct 30, 2013 3:57 pm

Re: Cannot add working openVPN through network manager

Postby Znap! » Wed Aug 30, 2017 1:59 pm

Thanks again. Setting the key direction to 1 manually in Network Manager did no do the trick, but extracting the tsl-auth and saving that as a key did. Hurrah!
:D

Much obliged, phd21. Wasn't as complicated as it seemed, but having to manually extract is a just a little cumbersome. Thanks!

User avatar
phd21
Level 14
Level 14
Posts: 5031
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Cannot add working openVPN through network manager

Postby phd21 » Wed Aug 30, 2017 3:02 pm

Hi "Znap!",

You are welcome...

Glad you have it working now...

I have seen a lot of various VPN provider's VPN configuration files (.ovpn), and the only thing I thought was a little different is that the "tls-auth" key section was before the "ca" certificate section.
Phd21: Mint KDE 17.3 & 18.2, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,3gb Ram,160gb hdd, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde


Return to “Other networking topics”