OpenVPN installation

Thought I would post before I resort to plan B on setting up my VPN. I decided to follow the LMS tutorial rather than the one-click method but hit a road block. In the final steps of going to the Network Settings to locate the VPN it is no where to be found. I attempted to download the network manager from the discover store just in case I made an error in the terminal installation but when I attempt to launch from there I get the error message: “Cannot launch NetworkManager- openVPN client.” So when I check network settings no VPN. I’ve done some searches but I’m having difficulty pinpointing the actual problem. I have the server configuration file saved on my local machine but can’t seem to install the local client. My linux distro is kubuntu 20.04, KDE Plasma version 5.18.8. There is a plan B and C so if this hurdle isn’t worth jumping no worries.

Hey @dfdakota!
Your question came out under the Tutorials section, so I missed it and I apologize.
Network Manager comes already pre-installed with your Linux distro, so you do not need to download and install it again. Also, the Network Manager OpenVPN is an extension for the Network Manager itself.
Since you mentioned Discover, you must be running KDE.

The way to activate OpenVPN on KDE, you’ll need to go to your connections and create a new one. Then, you scroll all the way down and select the Import OpenVPN (or Import File), where you can select the .ovpn file you downloaded from your personal VPN server. Once you select it, then the VPN connection will become available as supplementary to your Internet connection.

Sorry I put my question in the wrong section. So I figured out how to import the config file in the network manager which appears to have added the connection to my settings, however when I go to connect I get a connection timed out error. I have done a bit of research and it looks like the general responses for this error type is that network manager doesn’t support the tls-crypt setting which is the default for the openVPN setting for the server set up. I found the config file and thought I could change this configurations but I’m dangerous but not too skilled yet. So it looks like I can circumvent the network manager and use terminal to launch the VPN but I couldn’t find a consistent direction for this method. So I thought I would just start over and re-install but before I do thought I would see if you have any better ideas. Some solutions mentioned issues with systemd but when I looked at the logs the tls-crypt error was listed on the server logs for each attempt I made to connect. Thank you again for all of your ideas and assistance.

1 Like

When I tested out Kubuntu found a problem that the TLS-Crypt Key was not copied over from the .ovpn file. Same problem when I install Pop OS with KDE. Maybe my solution will work for you. (I did not do the 1 click solution though…)

After importing your OpenVPN profile in Network Manager, find out where the profile is stored

  1. Open the VPN settings in Network Manager
  2. Under the Identity tab, click on one of the files listed
  3. When the list of file comes up, select one to copy the location (In my case it was /home/.local/share/networkmanagement/certificates/[my OpenVPN file name])

Save a copy of the OpenVPN file in the above directory

Rename the file to tls-crypt.key

Edit the the tls-crypt.key to keep only the tls-crypt section, then save

Go back to Network Manager, open the OpvnVPN settings

Go to Identity tab then click on the Advanced… button

Click on the TLS tab

Check the box for “Verify peer (Sever) certificate usage signature”

In the “Additional TLS authentication or encryption” section set
Mode as TLS-Crypt with Key File point to the tls-crypt.key you just saved.

Hope this will work for you!

2 Likes

This is some great work, @Ai! Bravo!

1 Like

Oh wow. This worked wonderfully. Thank you so much for the suggestion. I finally have a VPN and I learned so much from all the help on this forum. Thank you! Cross your fingers now I’m going to see if I can follow the tutorial and add a second computer :slight_smile: Have a wonderful day!

1 Like

VPN is now successfully set up on 2 computers thanks to you and Ai. Thank you!

2 Likes

@dfdakota, you are very welcome, so glad my solution works for you. I remember how surprised and happy I was when the VPN finally worked. And pretty soon it will be like nothing to set it up. :smiling_face_with_three_hearts:

Thank you for sharing the happy news with me!

2 Likes

@Ai I’m wondering if your solution would be a fix for my issue. I’m setting up openvpn on my own VPS. Everything has gone smoothly but I wasn’t able to install network-manager-openvpn. I run fedora 37. I uploaded the ovpn file into my network manager but it will not connect.

I never used Fedora (newbie-ish here). My solution worked because I noticed something is missing when loading the .ovpn file. If you can’t even get openvpn on your Network Manager then this will not help.

Search for Fedora 37 and how to set up openvpn client… sorry can’t be more help…