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.

Screenshot-3

Extract the zip file:

unzip VPNBook.com-OpenVPN-Euro1.zip

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:

Screenshot-4

Click Add, select OpenVPN from the drop-down list and click Create:

Screenshot-5

Choose a name for the VPN
Enter the gateway IP (check if changed):

cat vpnbook-euro1-tcp80.ovpn | grep remote
remote 176.126.237.217 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.

Screenshot-6

Click Advanced

Use custom gateway port 80
Use LZO compression
Use a TCP connection

Screenshot-7

Click OK
Go to IPv4 Settings and add additional DNS servers: 8.8.8.8

Screenshot-10

Click Save.
Go to network manager and select Free OpenVPN connection

Screenshot-8
Screenshot-9

That’s it! Your connection is now secured.

HowTo Setup OpenVPN on Ubuntu 15.04
Tagged on:     
  • kazmroz

    not “unzipped into” I pasted it into terminal.

    • Jesus Cova

      you have to go to the directory first to unzipped it, type: cd /home/”your_user_name”/Downloads

      and there unzipped it

  • Nisarg Panchal

    getting “invalid vpn secrets” message