Setting Up OpenVPN on Linux

Posted on: 2019-01-08

There are lots of ways to do this - but this is more a reminder for myself of the steps to take. I've been using NordVPN and you can download a configuration file to connect to a VPN server. Many VPN providers provide apps or installers to set up the VPN. Given the choice I prefer to set up the VPN without having to use a 3rd parties installer or app.

I've been using OpenVPN over TCP/IP as the protocol of choice. And the config file I download from NordVPN for this has a .tcp.ovpn extension.

We need to make sure we have both the underlying OpenVPN software, and the user interface installed to do this use

% sudo apt install openvpn
% sudo apt install network-manager-openvpn

You can now use the config file to set up the connection. Go to Network Connections (typically the wifi signal symbol) and then Configure Network Connections. Click 'Add Connection' ((often just a + sign next to a list of connections) scroll down through the list of options and at the end there should be under 'Other' 'Import VPN Connection...'. From the file selector that appears select the .ovpn that you previously downloaded.

Now all that is in principal needed is for you to set the username and password. Click Ok to save everything. To use the VPN,you must first be connected to the internet. Next click on 'Network Connections' and your new OpenVPN connection should now be in the list. Click on that and you will hopefully get a vpn connection. If nothing appears to happen it probably didn't work - you can verify from NordVPN page or from a page showing your your systems IP address - it should have changed.

To trouble shoot you can use from a terminal...

% sudo tail -f /var/log/syslog

Then try and make VPN connection and see what appears in the log.

I'm setting up a Pinebook, and the syslog has lots of junk in it appearing regularly like...

localhost /usr/sbin/irqbalance: GUESSING AARCH64 CLASS FOR

Which makes the syslog hard to read. To get rid of it I did ..

% sudo vi /etc/systemd/journald.conf

Then changed the lines