ProtonVPN is a VPN service provider based in Switzerland. In this article, I’m going to show you how to use ProtonVPN on desktop Linux, including Debian, Ubuntu, Linux Mint, Elementary OS, Fedora, CentOS, Arch Linux, and OpenSUSE.

Note: If you are a power user, you may want to run your own VPN server.

How To Install and Use ProtonVPN on Desktop Linux Desktop Linux VPN

Why You Need to Use VPN on Your Computer and Mobile Devices

For those who don’t know, VPN stands for Virtual Private Network, which sets up a secure, encrypted “tunnel” between your device and the VPN server. Common use cases of VPN include:

  • Encrypt your online traffic, protect your web browsing history from ISP spying.
  • Unblock region-restricted content (Netflix, Hulu, etc), if your country isn’t supported by the streaming services, or you are traveling abroad.
  • Bypass online censorship and access websites that are blocked in your country or area, such as Google, YouTube, Facebook.
  • Prevent ISP from injecting ads on the web pages you browse.
  • Encrypt your web traffic when using public Wi-Fi, such as in airport lounge, coffee shop, or hotel. Prevent hackers in the same Wi-Fi network from intercepting your Internet traffic and stealing your email address, passwords, and credit card numbers.
  • Hide your IP and identity when you are downloading files with BitTorrent client.
  • Gamers can use a VPN to find the best route to reduce gaming lag.
  • Many online booking services like Kayak are known to offer different prices to different countries. When you are booking flights or hotels online, you can use VPN to switch your IP address in order to find the best deal.
  • Sometimes a web resource isn’t blocked in your area, but you still can’t access it. That’s because there is a cache layer in-between, and the cache is outdated. You can use a VPN to bypass the cache.

Please be aware that using VPN is not a silver bullet solution to protect your online privacy and security. For those who are paranoid, you should use the Tor Browser on Tails Linux. However, I think most folks don’t need to go to that extra length and it’s not convenient for daily use.

ProtonVPN Features

  • Full-disk encryption is deployed on all ProtonVPN servers.
  • All client apps are open-source.
  • Tor over VPN. You can route all your traffic through the Tor network and access Onion sites.
  • Supports Bitcoin payment.
  • Supports secure IKEv2/IPSec and OpenVPN protocols. The weak PPTP and L2TP/IPSec protocols are disabled.
  • DNS leak protection and IPv6 leak protection.
  • Graphical VPN client available for Android, iOS, Mac OS X, and Windows.
  • Multiple Logins. You can use ProtonVPN to browse anonymously on multiple devices at the same time.
  • ProtonVPN has over 1076 servers in 54 different countries, allowing you to switch servers at all times and as often as you like.
  • No logging policy. ProtonVPN doesn’t collect, log, or store any browsing activity, data, or IP addresses.
  • Torrenting is supported.
  • VPN kill switch. If the VPN connection drops, the computer defaults back to the original public IP. A VPN kill switch cuts your connection to the internet altogether when your VPN connection fails, so your web traffic is never exposed to hackers and snoopers.
  • And many more.

Go to ProtonVPN official website and sign up for a free account.

How to Install ProtonVPN on Desktop Linux

ProtonVPN supports IKEv2/IPSec and OpenVPN protocols. We will use OpenVPN on desktop Linux, since it’s very secure and easy to set up.

After signing up, we need to install the ProtonVPN for Linux client.

Debian/Ubuntu/Linux/Mint

sudo apt install -y openvpn dialog python3-pip python3-setuptools

sudo pip3 install protonvpn-cli

Fedora/CentOS/RHEL

sudo dnf install -y openvpn dialog python3-pip python3-setuptools

sudo pip3 install protonvpn-cli

Arch Linux/Manjaro

sudo pacman -S openvpn dialog python-pip python-setuptools

sudo pip3 install protonvpn-cli

OpenSUSE

sudo zypper in -y openvpn dialog python3-pip python3-setuptools

sudo pip3 install protonvpn-cli

How to Use ProtonVPN Client on Linux

Log into your ProtonVPN account with the following command.

sudo protonvpn init

How To Install and Use ProtonVPN on Desktop Linux Desktop Linux VPN

You can find the VPN username and password at https://account.protonvpn.com/account.

How To Install and Use ProtonVPN on Desktop Linux Desktop Linux VPN

Then you need to choose your ProtonVPN plan and choose UDP or TCP as the transport layer protocol. I recommend using UDP first, if there’s a problem in establishing VPN connection, then try the TCP protocol.

How To Install and Use ProtonVPN on Desktop Linux Desktop Linux VPN

Note that the ProtonVPN Linux client doesn’t support IPv6. It’s recommended to disable IPv6 on your Linux device to prevent IPv6 address leak. Edit the /etc/sysctl.conf with a command-line text editor like Nano.

sudo nano /etc/sysctl.conf

Add the following lines at the bottom of this file. (In Nano text editor, you can press Ctrl W, then Ctrl V to jump to the bottom of a file.)

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

How To Install and Use ProtonVPN on Desktop Linux Desktop Linux VPN

Save and close the file. (To save a file in Nano text editor, press Ctrl O, then press Enter to confirm. To exit, press Ctrl X.)

Then apply the changes.

sudo sysctl -p

Now you can establish VPN conenction to ProtonVPN server.

sudo protonvpn connect

It will ask you to choose a country. Free users have 3 countries to choose from.

How To Install and Use ProtonVPN on Desktop Linux Desktop Linux VPN

Next, choose a server in that country.

How To Install and Use ProtonVPN on Desktop Linux Desktop Linux VPN

And choose TCP or UDP as the transport layer protocol. I recommend using UDP first, if there’s a problem in establishing VPN connection, then try the TCP protocol.

How To Install and Use ProtonVPN on Desktop Linux Desktop Linux VPN

After a few seconds, the VPN connection should be established.

How To Install and Use ProtonVPN on Desktop Linux Desktop Linux VPN

IPv6, DNS, and WebRTC Leak Test

Now go to ipleak.net. If everything is working correctly, you should see

  • Your computer has got a new IP address, so the Internet can’t see your original public IP address.
  • No IPv6 address in the test result, which means your IPv6 address is also hidden from the Internet.
  • No IP address in the WebRTC detection section.
  • No IP address in the DNS address section.

How To Install and Use ProtonVPN on Desktop Linux Desktop Linux VPN

If your ISP’s DNS server shows up on the test results, then you have a DNS leak, which means your ISP’s DNS server is translating domain names to IP addresses for you. Although your connection is encrypted by VPN, your ISP knows which websites you are visiting.

Speed Test

ProtonVPN is pretty fast even with a free tier account. My computer can play 4K videos on YouTube at 67522 Kbps, which translates to 65 Mbit/s. You can see the YouTube connection speed by right-clicking the video and select Stats for nerds.

How To Install and Use ProtonVPN on Desktop Linux Desktop Linux VPN

How to Disconnect ProtonVPN

sudo protonvpn disconnect

ProtonVPN Auto-Start

You may want ProtonVPN to automatically start at system boot time. This can be achieved by creating a systemd service unit. Use the Nano command-line text editor to create the 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 a file in Nano text 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

sudo su -

And initialize a user configuration file.

protonvpn init

Enter your ProtonVPN username and password, choose your ProtonVPN plan, and default protocol just like before. Once that’s done, you can disconnect the current VPN connection.

sudo protonvpn disconnect

Now try to start ProtonVPN with systemd.

sudo systemctl start protonvpn

And enable auto-start at boot time with:

sudo systemctl enable protonvpn

Go to ipleak.net.and check if it works. If there’s a problem, you can run the following command to check the log and debug the problem.

sudo journalctl -eu protonvpn

Conclusion

I hope this post helped you use ProtonVPN on Linux. If you have problems when using ProtonVPN, please don’t hesitate to put your question in the comments section below. As always, if you found this post useful, then subscribe to our free newsletter.

Rate this tutorial

[Total: 4 Average: 5]