ProtonVPN is a popular VPN service headquartered in Switzerland. Consider installing and running ProtonVPN on distributions such as Debian, Ubuntu, Linux Mint, Elementary OS, Fedora, CentOS, Arch Linux, and OpenSUSE.
NEW: ProtonVPN GUI app is available. Officially, only one Linux operating system is supported – Ubuntu 20.04. The download page provides a deb package for installing ProtonVPN. When using ProtonVPN with a GUI, the developers recommend uninstalling the installed version.
For those who don’t know, a VPN is a virtual private network that establishes a secure encrypted “tunnel” between your device and the VPN server.
How to Install ProtonVPN on Linux Distributions
ProtonVPN supports IKEv2/IPSec and OpenVPN protocols. We will describe the installation and launch of ProtonVPN when using the OpenVPN protocol since the use of this protocol is as simple as possible and, at the same time, meets the security canons.
The developers of ProtonVPN recommend using the CLI version of the application, i.e., the version without a graphical interface. Do not be afraid; its installation and further use are not complicated.
Let’s proceed to install ProtonVPN. Run the following commands, depending on the distribution you are using.
sudo apt install -y openvpn dialog python3-pip python3-setuptools sudo pip3 install protonvpn-cli
sudo dnf install -y openvpn dialog python3-pip python3-setuptools sudo pip3 install protonvpn-cli
sudo pacman -S openvpn dialog python-pip python-setuptools sudo pip3 install protonvpn-cli
sudo zypper in -y openvpn dialog python3-pip python3-setuptools sudo pip3 install protonvpn-cli
How to use the ProtonVPN client on Linux
We need to log in to the ProtonVPN client using the data available on the https://account.protonvpn.com/account page. We are interested in the OpenVPN username and password.
Enter the command:
sudo protonvpn init
Specify the OpenVPN username and password available at the link above.
The password entered will not be displayed, similar to the root password.
Then you need to specify your ProtonVPN tariff plan and select UDP or TCP as the transport layer protocol. I recommend using UDP first, and in case of problems, try TCP.
Note that the ProtonVPN Linux client does not support IPv6, so if you have IPv6, it is recommended that you disable IPv6 on your system to troubleshoot leaks. You can disable IPv6 by using the following instructions.
Disabling IPv6 on Linux:
sudo nano /etc/sysctl.conf
At the end of the configuration file, add the following values:
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 net.ipv6.conf.tun0.disable_ipv6 = 1
Save and close the file. To save the Nano text editor file, press Ctrl+O, then press Enter to confirm. To exit, press Ctrl+X.
Then apply the changes:
sudo sysctl -p
Launching a VPN Connection with ProtonVPN on Linux
ProtoVPN startup command:
sudo protonvpn connect
You will be asked to select a country. For users with the free ProtonVPN plan, three countries are available.
Then select a server.
Select TCP or UDP as the transport layer protocol. I recommend using UDP first. If there is a problem with establishing a VPN connection, try the TCP protocol.
After a few seconds, the VPN connection will be established.
DNS-leak test, DNS leak test
If your ISP’s DNS server appears in the test results, you have a DNS leak. In this case, even though your internet connection is encrypted with a VPN, your ISP still knows which websites you visit. In my case, shown in the screenshot above, there are no DNS leaks.
VPN Connection Speed Test
ProtonVPN offers pretty fast connection speeds even when using an account with a free data plan.
How to disable ProtonVPN
To disable the VPN connection, run the following command:
sudo protonvpn disconnect
How to Add ProtonVPN to Startup
You may want ProtonVPN to start automatically when you boot up your system. This can be achieved by creating a systemd service module. Use the Nano Command Line Editor to create the next file.
sudo nano /etc/systemd/system/protonvpn.service
Add the following lines to this file:
[Unit] Description=ProtonVPN Command-Line Client After=network-online.target [Service] Type=forking ExecStart=protonvpn c -f ExecStop=protonvpn disconnect Restart=always RestartSec=2 [Install] WantedBy=multi-user.target
Save and close the file. To save the file in the Nano editor, press Ctrl+O, then press Enter to confirm. To exit, press Ctrl+X.
Since this systemd service runs as root, you need to switch to the root user account with the following command:
sudo su -
And initialize the user configuration file:
Enter your OpenVPN username and password from your ProtonVPN account, choose a default plan and protocol, the same as we did before to connect. Once this is done, you can disable the current VPN connection:
sudo protonvpn disconnect
Now try running ProtonVPN using systemd:
sudo systemctl start protonvpn
And enable ProtonVPN to start automatically during system boot with the command:
sudo systemctl enable protonvpn
You can check the connectivity log by using the command:
sudo journalctl -eu protonvpn
I hope this article on How to Install ProtonVPN on Linux was helpful. If you’re having trouble using ProtonVPN, feel free to ask your question in the comments section just below.