How to use ProtonVPN on Linux

Share This:

ProtonVPN Linux

ProtonMail and ProtonVPN are quickly becoming a popular option among privacy advocates. ProtonVPN offers apps for Windows, MacOS, Android, and iOS. They offer varying tiers of Free, Basic, Plus and Visionary depending on your needs. In addition to the apps and the Linux CLI (Command Line Tool), they also support OpenVPN on any platform. While their Linux CLI Tool doesn’t have a GUI, it makes configuring OpenVPN quite easy.

You can find the ProtonVPN CLI on GitHub as well.

Install ProtonVPN on Arch Linux or Manjaro

To get started with ProtonVPN on Arch Linux or Manjaro, use these commands to install the necessary packages:

sudo pacman -S openvpn dialog python-pip python-setuptools
sudo pip3 install protonvpn-cli

Install ProtonVPN on Debian-based Linux Distros

To install the packages on Ubuntu, Kali, ParrotOS, Mint, or other Debian-based distros, use these commands:

sudo apt install -y openvpn dialog python3-pip python3-setuptools
sudo pip3 install protonvpn-cli

Install ProtonVPN on Fedora, CentOS, or RedHat RHEL

If you’re using Fedora, CentOS, RHEL, use these commands:

sudo dnf install -y openvpn dialog python3-pip python3-setuptools
sudo pip3 install protonvpn-cli

Install ProtonVPN on SUSE

If you’re using a SUSE distro, here are your zypper commands:

sudo zypper in -y openvpn dialog python3-pip python3-setuptools
sudo pip3 install protonvpn-cli

Install ProtonVPN from GitHub

If you prefer to install ProtonVPN from GitHub instead of pip3, you’ll need to use your package manager to install openvpn dialog python wget, then you’ll need to run:

sudo wget -O protonvpn-cli.sh https://raw.githubusercontent.com/ProtonVPN/protonvpn-cli/master/protonvpn-cli.sh

You’ll then need to make the script executable:

sudo chmod +x protonvpn-cli.sh

Install the client using this command, then proceed to the configuration steps below:

sudo ./protonvpn-cli.sh --install

Configure ProtonVPN on Linux

To get started, ProtonVPN provides an init script to perform the initial configurations. From the terminal, type:

sudo protonvpn init

ProtonVPN Linux CLI Init

You’ll be prompted to select your plan (Free, Basic, Plus, or Visionary) and your protocol (UDP or TCP). For VPN, UDP is usually recommended as the first option for speed, but if you have issues then you can always select TCP.

You’ll also be prompted for your username and password. ProtonVPN issues each user unique credentials for OpenVPN. You’ll need to log into your account at protonvpn.com and go to the Account menu, then look for OpenVPN / IKEv2 username

Connecting to ProtonVPN on Linux

You can find a full list of commands in the ProtonVPN support article. Depending on your needs, here are the most common ProtonVPN Connection Commands:

  • Connect to a specified server:
    protonvpn c [servername]
  • Connect to a random server:
    protonvpn c -r
  • Connect to the fastest server:
    protonvpn c -f
  • Connect to the fastest P2P server for torrent:
    protonvpn c --p2p
  • Connect to the fastest server in a specified country:
    protonvpn c --cc [countrycode]
  • Connect to the fastest Secure Core server:
    protonvpn c --sc

Depending on your distro, you may need to use sudo to issue the protonvpn commands.

Enable the ProtonVPN Kill Switch

The ProtonVPN CLI provides a kill switch which can be configured to block your internet access if the VPN connection is lost. This is recommended when you’re connected to an untrusted network or when using it for torrents. Start the ProtonVPN configuration script with:

protonvpn configure

then select 5 for Kill Switch and select either option 1 or 2. 1 will block access from your directly connected network and 2 will allow access from your directly connected network.

You’ll need to restart your VPN connection for the changes to take effect by running:

protonvpn reconnect

Update the ProtonVPN CLI in Linux

Since the ProtonVPN CLI isn’t install with your usual package manager, you’ll need to use pip3 to perform any updates. The good news is that the command is the same no matter which distro you’re using.

sudo pip3 install protonvpn-cli --upgrade

Share This:

 

Leave a Reply