Your location: Your IP: Your status:ProtectedUnprotected · To the tests »

OpenVPN on Linux Terminal

Install OpenVPN Download Perfect Privacy OpenVPN configurations

Install OpenVPN if not already installed. This should be available in the repositories for your Linux distribution. For Debian based distributions like Ubuntu or Linux Mint enter

sudo apt-get install openvpn

Next change into the OpenVPN directory: cd /etc/openvpn/ and get the Perfect Privacy configuration with the following line.

curl -JLO

Unpack OpenVPN configurations archive OpenVPN configurations are unpacked

Now unzip the downloaded file. Use -j to to put the content directly into /etc/openvpn/.

sudo unzip -j

After the archive has extracted, there is one more optional step to do if you don’t want to enter your password for every new connection. To store your password, use a text editor of your choice to create the file password.txt in the /etc/openvpn/ directory. In this example we are using vim.

sudo vim password.txt

Create /etc/openvpn/password.txt

In the text file, enter your username and password, each in a single line, like shown on the screenshot to the left.

Edit configuration file of desired server

Now you will need to edit the server configuration file so it instructs OpenVPN to use the password.txt file for the credentials. The server configurations always have the extension .conf and are named after the Location. If you want to connect to, open Amsterdam.conf in your editor and in the line auth-user-pass add password.txt so the line reads like in the screenshot to the left.

Establishing the OpenVPN connection OpenVPN connection established

OpenVPN is now configured and you can start a connection with the following command:

sudo openvpn /etc/openvpn/Amsterdam.conf

If everything went correctly, it should say “Initialization Sequence Completed” at the end. You can terminate the connection by using CTRL-C. For productive usage you will probably want to run this in a screen so you can detach after the connection was established.

You can use our check IP site to verify that the OpenVPN connection was established and is working correctly:

wget -q -O -

This website uses cookies to analyze the traffic and to control our advertising. By using this site, you agree to the use of cookies. More information can be found in our privacy policy.