Support Center / Setup and use / How to manually configure OpenVPN for Proton VPN in Linux

How to manually configure OpenVPN for Proton VPN in Linux

Proton VPN offers both an official Linux app with graphical user interface and an official Linux CLI. We strongly recommend using one of these tools in Linux.

Get the official Linux app

It is also possible to manually configure OpenVPN for Proton VPN in Linux. In this article, we explain how.

You can set-up a VPN for Linux by using the openvpn package using the appropriate config files for Proton VPN servers. The example manual Linux VPN setup guide below shows how to configure a connection on Ubuntu 16.04LTS.

Note: To address frequent DNS leaks on Linux, we’ve updated this guide with new Linux specific config files and new instructions to connect via CLI (see option B below)

We strongly recommend downloading the official Proton VPN Linux app, which offers advanced features and makes it easy to connect on Linux machines. 

How to manually setup OpenVPN for Linux

1. Install the necessary packages:

Install the OpenVPN package by opening a terminal (press Ctrl + Alt + T) and entering:

sudo apt-get install openvpn

Note: if you do not have administrator privileges on your machine, please contact your system administrator and ask them to perform the installation for you.

Install the network-manager-openvpn-gnome package, for easier use and compatibility with the Ubuntu Network Manager GUI, by entering:

sudo apt-get install network-manager-openvpn-gnome

And pressing Y and then Enter to confirm the installation.

Also, ensure that the resolvconf is installed:

sudo apt install resolvconf

2. Get the Proton VPN config files: 

  • Download the desired configuration files.
  • Log into your Proton VPN dashboard at account.protonvpn.com. If you don’t yet have an account, sign up for a Free plan for Linux.
  • Select Downloads on in the left navigation bar.
  • Find the OpenVPN configuration files section and chose:

Platform: Linux, Protocol: UDP (recommended. TCP uses port 443. Use it if you experience slow VPN speeds or your VPN connection is dropped)

  • Click the download icons for the server you wish to download.
  • If you selected “Download All configurations”, extract the zip file to your desired location.

 

3. Find your OpenVPN credentials

For increased security, Proton VPN is set-up with two separate credentials to authenticate a connection.

Learn more about how two pairs of credentials increase the security of Proton VPN.

Log in to the Proton VPN dashboard and click on Account tab. Here you will see your two type of credentials.

The credentials Proton VPN Login are used in our apps.  OpenVPN / IKEv2 Username is used on manual connections. So please configure the OpenVPN credentials to your preference as you will need to use them to establish a Linux VPN connection. Note: to use our NetShield DNS filtering feature, append the suffix +f1 to your username to block malware, or +f2  to block malware, ads, and trackers (for example 123456789+f2).

How to use Proton VPN with manual setup

Using NetworkManager

Attention: At this point, there is a known issue with DNS Leaks on distributions up to Ubuntu 16.04LTS (and its dependencies and parents). If you find that you too are affected by DNS leaks, we recommend you to use Option B below.

1. Add a new connection

Click on your connection symbol, in the system menu on the top right and select Edit connections…

Click Add to create a new connection. Select Import a saved VPN configuration… in the drop-down menu and click Create…

Import the config file of the server you want to connect to, by navigating to the location where you downloaded the configuration file or extracted the Proton VPN_config.zip and selecting the desired file.

The files are named with a two-letter abbreviation of the destination country and a number to show which server in that country. For example: de-01 is the first server in Germany; ca-04 is the fourth server in Canada. You can check the Proton VPN servers page and find the abbreviations there. Files with two country abbreviations are secure core servers, for example: is-us-01 is the secure core connection over Iceland to the USA. Learn more about our Secure Core feature.

Enter the OpenVPN credentials from step 3 in the User Name‘ and Password fields of the new window and click Save.

For Ubuntu 14.04 LTS: there is an issue specific to 14.04 where importing the configuration that does not read all settings automatically. If you are experiencing issues with the auto-import feature with the network manager, please drop us a line at this link for further instructions.

2. Establish the Linux VPN connection

Click on the Networks icon in your task bar. Select VPN Connections, click the entry of your newly added config, and it will automatically connect to your chosen Proton VPN server.

You will see a popup confirming the VPN connection has been established and a lock  next to your Network icon. Congratulations, you’ve just successfully connected to Proton VPN!

3  Add more connections (optional)

To add another connection (no limit), ,simply repeat step 1 with a different configuration file.

Using Terminal

Note: if you do not have administrator privileges on your machine, please contact your system administrator and ask them to perform the connection for you

Please ensure that the resolv-conf script is properly downloaded on your device by using the following commands:

sudo wget "https://raw.githubusercontent.com/ProtonVPN/scripts/master/update-resolv-conf.sh" -O "/etc/openvpn/update-resolv-conf"

sudo chmod +x "/etc/openvpn/update-resolv-conf"

Open a terminal (press Ctrl+Alt+T) and navigate to the folder where you unzipped the config files using  cd <path> .  In our example, they are located in ~/Downloads so we enter:

cd ~/Downloads

If you find it hard to navigate using CD command line, you can open the folder that the file is located in using any file manager and right click Open in terminal

Enter the following to initialize a new connection:

sudo openvpn <config.ovpn>

Where <config.ovpn> is the config file name of the server you want to connect to, e.g. de-03.protonvpn.com.udp1194.ovpn for Germany #3 server. Enter your PC’s administrator password to execute (openvpn will modify your network adapters and needs root privileges)

You will then be prompted for your OpenVPN credentials (see above).

You have finished the Linux VPN setup and successfully connected to the Proton VPN servers once you see Initialization Sequence Completed

Keep this Terminal window open to stay connected to Proton VPN. If you close it, the VPN connection will disconnect.

Click here to ensure that the connection is successfully established and there are no leaks.

To disconnect your Linux VPN connection, press Ctrl+C and/or close the Terminal window.

Additional Resources

Download Linux config files via the Dashboard

Related articles

How to use Proton VPN on Linux

Secure
your internet

Get Proton VPN
Get Proton VPN

For customer support inquiries, please submit the following form for the fastest response:
Support Form

For all other inquiries:
contact@protonvpn.com


-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: OpenPGP.js v4.10.10
Comment: https://openpgpjs.org

xsBNBFiYeeIBCACpwuYcTsACyjQaqY3tOUonokamGZf3VDuLvcA9nQnu4vlB
n1RFFUJa5Pmf2yZ9EjJFSldTl5lreE3tFf53CcZ9wKa1R6aMnN/0VqURJho0
ZTqevQlCvuJ9kKHkDck3Em0/1WWnhDJgabp+fOa5HAHoAvcNy5gVPuexTT/N
wp6QcfB7w+qFhf73s0bcSn5RC+FAYlQxZVFhFtA7/7LthBVatDJrYLYP9XJd
zOZqz9AX0XZwKal25RcVeGHkNKgloo0bTgro4D88MR7saqXFHTRhy3+Wss7c
uqrh0uIkVmqtadoK/rAbqOyFXQ2DlvSMVrEMLUvwlZbC0taqcKDfNA+FABEB
AAHNLWNvbnRhY3RAcHJvdG9udnBuLmNvbSA8Y29udGFjdEBwcm90b252cG4u
Y29tPsLAfwQQAQgAKQUCWJh54wYLCQcIAwIJEN4dfnhhw11TBBUIAgoDFgIB
AhkBAhsDAh4BAAoJEN4dfnhhw11T6PwIAKgIHTUaEcCFQ5WfmwGpdhRgFe7H
gnHR8UOFPrRKnbCOQgTVPGwCFt8UVFhEgbmtroTh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