4

I'm trying to install an openvpn connection on my Ubuntu 18.04 laptop.

From my openvpn provider I got a username/password and a zip containing three files:

myvpn.openvpn
myvpn.p12
myvpn.key

The myvpn.openvpn file looks like this (just replaced the ip address by stars):

dev tun
persist-tun
persist-key
cipher AES-256-CBC
auth SHA1
tls-client
client
resolv-retry infinite
remote ***.***.***.*2 1194 udp
verify-x509-name "MyVPN" name
auth-user-pass
pkcs12 myvpn.p12
tls-auth myvpn.key 1
remote-cert-tls server
redirect-gateway def1

I tried connecting from the command line, which works perfectly fine using

sudo openvpn --config myvpn.ovpn

But since I need to connect to this vpn all the time I want to be able to do it using the GUI. So I'm trying to follow this guide on askubuntu, but it doesn't behave like in the screenshots. When I try to add a new vpn connection in the gui and select the option to "Import from file" and select the .openvpn file it automatically sets things up like this (UI is in Dutch, but I guess most of it should be understandable for English speakers):

enter image description here

The first thing that I noticed is that it selects the .p12 file for the CA-Cert, the User Cert and the User Private Key. Next to that it asks for a username and password (which I have), but also for a "Password User Key" (the last input field) of which I have no clue what it is. I tried various combinations, but I always get the same error (also translated from Dutch):

Activation of network connection failed

I guess the variation which comes closest to the command line option is this one:

enter image description here

But that gives the same error.

Then there's also the button "Advanced..". Opening that scared the shit out of me. I simply have no idea where to begin in there.

Does anybody know how I can get this working somehow? Why is the command line option working perfectly, but is the UI so hard to get going? All tips are welcome!

  • Inspect the .ovpn file for sections labeled key, crt, ca, etc. You may have to cut this file up into sections and point the gui to them. (I've had to do this) Didn't post as answer because no clue what the p12 file is. – Organic Marble Jun 14 '18 at 12:04
  • @OrganicMarble - I added the contents of the myvpn.openvpn file to my question. To me it doesn't give any new info. Does it give you any hints? – kramer65 Jun 14 '18 at 14:12
  • Thanks. From that, it looks like the GUI option that you posted in your first image ( in English, Password with Certificates (TLS)) is the right choice. Just a guess, will it allow you to set User Private Key to "none", since I don't see one? – Organic Marble Jun 14 '18 at 14:19
  • @OrganicMarble - No I can't set "User Private Key" to none. When I click it, it automatically opens a file picker. And when I use it like that and try to connect, it asks for the "User Key Password". I have to give something, so when I simply give the regular vpn password I gave before, it tries to connect, which takes longer than usual. But in the end that also fails with the same error. Any other ideas? – kramer65 Jun 14 '18 at 18:58
  • @OrganicMarble - I was just thinking I can maybe list an issue with the developers of this network utility. The only thing I found was this though: tracker.debian.org/pkg/network-manager-openvpn . On that page I can't find any place to list an issue (also not on their gitlab page). Any ideas how I could contact them? – kramer65 Jun 14 '18 at 19:02
1

Turns out I had ipv6 enabled, and because it wasn't configured correctly on my laptop the whole thing broke down. After disabling ipv6 in the ipv6 tab it works like a charm.

So as a tip for future users banging their head like I did; disable ipv6 when in doubt.

Regardless, I wish you all a beautiful day!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.