VPN set-up
Which distribution or family of distributions offer the best experience?
- Fedora and Linux mint havd native clients.
- Lets us launch and connect to it
- Stays connected between suspend and launch sessions
- We have to use openVPN client in Arch Linux
- We have to launch it manually everytime we start the computer or wake it up from sleep
- How does it work in Fedora?
ProtonVPN set-up on Fedora
https://protonvpn.com/support/official-linux-vpn-fedora
ProtonVPN set-up on Linux Mint
- Follow these instructions: https://protonvpn.com/support/official-linux-vpn-ubuntu
- And then, launch the desktop app.
- Login using the credentials for Proton VPN
ProtonVPN set-up on ArchLinux
Get the OpenVPN configuration file and credentials from your VPN provider
Before we start, you’ll need two things:
-
An OpenVPN configuration file
Sign in to account.protonvpn.com, go to Downloads → OpenVPN configuration files, and download an OpenVPN configuration file for Linux.
Learn how to download an OpenVPN configuration file from Proton VPN
-
Your OpenVPN username and password
While still signed in to account.protonvpn.com, go to Account → OpenVPN / IKEv2 username to view your OpenVPN username and password. Note that these are not your regular Proton Account username and password.
-
Login to ProtonVPN account, using the menu on the left side, go to
OpenVPN/IDEv2. -
Download a
Server configuration file(the.ovpnfile) to connect to a specific server in the country of your choice. -
e.g.
us-ny-166.protonvpn.udp.ovpn
How to use OpenVPN with NetworkManager
https://protonvpn.com/support/linux-openvpn/#NetworkManager
This is the recommended way to manually configure OpenVPN if your distribution supports NetworkManager(new window).
This guide was created using Ubuntu 22.04, but the instructions are very similar on any system that supports NetworkManager. If your desktop environment uses NetworkManager, there’s a good chance that it already supports OpenVPN. If it doesn’t, you can easily install OpenVPN support in NetworkManager:
On Debian and Ubuntu-based distributions, enter:
sudo apt-get install network-manager-openvpn-gnome On Fedora, enter:
sudo dnf -y install NetworkManager-openvpn NetworkManager-openvpn-gnome On Arch, enter:
sudo pacman -S networkmanager-openvpn Log out of your Linux session, then log in again for the changes to take effect.
Once NetworkManager supports OpenVPN, you can configure it. To do this:
-
Go to Settings → Network → VPN → +.
-
Select Import from file… and use your default file manager to Open the OpenVPN configuration file you downloaded earlier.
-
Go to Authentication and enter your OpenVPN Username and Password into the relevant fields. Click Add when you’re done
-
Back at Settings → Network → VPN, toggle the switch next to the OpenVPN connection you just set up to on. You can configure as many connections as you like.
You’re now connected to Proton VPN. To verify this, visit our free secure IP scanner(new window). Since this is a manual connection, you should also check DNS leaks.
To disconnect from Proton VPN, simply toggle the switch off.
How to manually configure OpenVPN CLI
https://protonvpn.com/support/linux-openvpn/
ProtonVPN offers normal configuration files for OpenVPN and Wireguard. It will just work, these protocols are well supported by the stock VPN clients shipped with most distributions or desktop environments. Do not install the third party VPN application, there is no reason to, your system already ships with superiour implementations of everything.
-
Install OpenVPN
On Debian and Ubuntu-based distributions, enter:
sudo apt install openvpn On Fedora, enter:
sudo dnf install openvpn On Arch, enter:
sudo pacman -S openvpn
Check if openvpn is installed.
openvpn --version
- Install openresolv
You need openresolv (an open-source implementation of resolvconf(new window)) to properly configure DNS and prevent DNS leaks.
Learn more about DNS and DNS leaks
On Debian and Ubuntu-based distributions, enter:
sudo apt install openresolv
On Fedora, enter:
sudo dnf install openresolv
On Arch, enter:
sudo pacman -S openresolv
- Download the following DNS update script
Again, this is needed to ensure that DNS is configured correctly. Wget is pre-installed on most Linux distros. Run:
sudo wget “https://raw.githubusercontent.com/ProtonVPN/scripts/master/update-resolv-conf.sh” -O “/etc/openvpn/update-resolv-conf” Followed by:
sudo chmod +x “/etc/openvpn/update-resolv-conf”
- Change the directory to where you downloaded your OpenVPN configuration file
At the location of your .ovpn file, run the command or put this in a .sh file and run it.
sudo /usr/bin/openvpn us-ny-166.protonvpn.udp.ovpn
Troubleshooting:
Sometimes, when you run this, you may see errors like this:
Options error: --up script fails with '/etc/openvpn/update-resolv-conf': No such file or directory (errno=2)
Options error: Please correct this error.
Use --help for more information.
Resolving the error:
If you don’t need the update-resolv-conf script or prefer to manage DNS manually, you can remove or comment out the lines related to up and down scripts in your .ovpn configuration file. Look for lines similar to these and either remove them or add a # at the beginning:
# up /etc/openvpn/update-resolv-conf
# down /etc/openvpn/update-resolv-conf
Provide OpenVPN / IKEv2 Username from the ProtonVPN Account page. Press Ctrl+c to close the VPN connection.
You should see a message saying Initialization Sequence Completed. This means you’re successfully connected to Proton VPN. You can verify this by visiting our free secure IP scanner(new window). Since this is a manual connection, you should also check for DNS leaks.
To disconnect from the VPN server, simply close the terminal window.
Testing
Websites that displays the information that the browser can collect from the computer: This shows what info the browser can send to other parties with/without our consent.