A Virtual Private Network (aka. VPN) is a method to add security and privacy to pretty much any network. OpenVPN is an SSL-based VPN that has gained popularity lately especially with all the news about major corporations tracking user information. If you are browsing the web using a VPN then anything that is tracking your IP location would be tracking the VPN server location instead of your location. Check out this handy website IPLeak and see if it can find out where you are.
ProtonVPN is an OpenVPN that is run out of Switzerland and is built for privacy and security. It claims to never log user activity at all so therefore it cannot share those logs with any third parties. It is also integrated with the TOR anonymous network if you really need anonymity or access to Onion sites.
In this article, we will go through how to set up a connection to ProtonVPN running on a Linux system. ProtonVPN also has clients for MacOS, Windows, Android, and iOS.
- ProtonVPN account (I would suggest the basic plan as the free plan really slows down your network speeds)
ProtonVPN CLI Install
ProtonVPN has a CLI tool that makes it easier to set up a VPN connection on a Linux system. For other OS's it has a GUI tool but naturally, it has to be a CLI tool for Linux. Open up your favorite terminal emulator and use the following commands depending on your distro.
// ArchLinux / Manjaro sudo pacman -S openvpn sudo pacman -S dialog // Fedora sudo yum install openvpn sudo yum install dialog // Solus sudo eopkg install openvpn sudo eopkg install dialog // Debian sudo apt-get install openvpn sudo apt-get install dialog
Now that the needed packages are installed using the following
wget command to download the CLI from GitHub
sudo wget -O protonvpn-cli.sh https://raw.githubusercontent.com/ProtonVPN/protonvpn-cli/master/protonvpn-cli.sh
After that finishes downloading change the permissions to allow the script to be executed and then run the install command as follows
sudo chmod +x protonvpn-cli.sh sudo ./protonvpn-cli.sh --install
And now the CLI tools should be installed and we are ready to connect to a VPN server.
Setup VPN Connection
Head on over to the settings page here and copy down the OpenVPN Username and Password. After getting the credentials go back to your terminal and run the following initialize command and input the credentials you just copied.
sudo protonvpn-cli -init # NOTE: pvpn is a shorthand for protonvpn-cli
Fill out the rest of the prompts taking the default for most of them except for the ProtonVPN Plans prompt make sure you select whichever plan your account is set up for.
After that command is done then run the connect command below to connect to a server
sudo protonvpn-cli -connect
A list of countries will show up to select one that is close to you in order to have the least impact on your network speeds. On the next dialog, the
UDP protocol should be fine.
And if all went well that should do it and it should display your new IP address as seen by the rest of the internet!
(Optional) IPLeak Check
As mentioned in the article opening IPLeak is a useful website to see what information websites can gather from you as you browse the web. If your VPN is running now when you go to IPLeak it should show your location at whichever server you chose in the last section. There are many other things that can be done to add privacy and security to your browsing but a good VPN is a great first step.
In this article, we saw how to set up an OpenVPN system with ProtonVPN to secure our internet browsing and give back a little bit of privacy in this modern internet landscape full of big corporations tracking and selling your browsing information. If you have not already checked out my article: Setting Up A Pi-Hole I would recommend doing so if you want to continue adding security and privacy measures to your home network.