Using a VPN is a great way to protect your privacy and security while using (for example) an unsecured wireless connection. VPN basically works like this: When you connect to a VPN, you usually launch a VPN client on your computer (or click a link on a dedicated website), log in with your credentials, and your computer exchanges trusted keys with a far away server. Once both computers have verified each other as authentic, all of your internet communication is encrypted and secured from eavesdropping.
There are a lot of paid VPN providers but we’ll take a look on how to install and use the free OpenVPN service with Ubuntu 15.04.
First, you need to install the openvpn plugin for network-manager and restart it:
sudo apt-get install network-manager-openvpn network-manager-openvpn-gnome
sudo service network-manager restart
Go to VPNBOOK and click on OpenVPN tab. Download the certificate bundle zip file for EURO 1 and write down the username and password.
Extract the zip file:
Create the user cert, ca cert and private key:
[sourcecode language=”plain”]sed ‘1,/<cert>/d;/<\/cert>/,$d’ vpnbook-euro1-tcp80.ovpn > cert.crt
sed ‘1,/<key>/d;/<\/key>/,$d’ vpnbook-euro1-tcp80.ovpn > key.key
sed ‘1,/<ca>/d;/<\/ca>/,$d’ vpnbook-euro1-tcp80.ovpn > ca.crt[/sourcecode]
Go to network manager and configure VPN:
Click Add, select OpenVPN from the drop-down list and click Create:
Choose a name for the VPN
Enter the gateway IP (check if changed):
cat vpnbook-euro1-tcp80.ovpn | grep remote
remote 188.8.131.52 80
Select as Type: Password with Certificates (TLS)
Enter username and password from the vpnbook website (beginning of this guide)
Browse for the three files created earlier
Leave Private key password blank.
Use custom gateway port 80
Use LZO compression
Use a TCP connection
Go to IPv4 Settings and add additional DNS servers: 184.108.40.206
Go to network manager and select Free OpenVPN connection
That’s it! Your connection is now secured.