In this tutorial, I will be going through all the steps to setting up VyprVPN on the Raspberry Pi.
This tutorial is handy if you’re looking to connect your Pi to the VyprVPN service.
There are many reasons why you may want to set up a VPN on the Raspberry Pi. The most common is that you want an extra layer of security and anonymity to your network activities. These benefits are handy for a range of different Raspberry Pi projects.
Most of our projects have been tested for the latest version of Raspberry Pi OS. I recommend upgrading to the most recent for the best experience when following this tutorial.
If VyprVPN doesn’t take your fancy, then we do have other tutorials that cover services such as ExpressVPN or NordVPN.
You can find the tutorial right below if you have any issues then be sure to let us in the comments section at the bottom of this page.
Equipment
All the equipment that you need to set up this Raspberry Pi VyprVPN tutorial is listed right below.
Recommended
- Raspberry Pi ( Amazon )
- Micro SD Card ( Amazon )
- Ethernet Cable ( Amazon ) or Wi-Fi ( Amazon )
- Power Supply ( Amazon )
- VyprVPN Subscription ( vyprvpn )
Optional
Installing VyprVPN to the Raspberry Pi
VyprVPN isn’t much different to installing most VPN services on the Raspberry Pi as most make use of the OpenVPN software.
1. If you haven’t already, then you will need to sign up to VyprVPN.
2. Load the terminal on the Raspberry Pi or make use of SSH to remotely access it.
3. Update Raspberry Pi OS to the latest packages.
sudo apt update
sudo apt upgrade
4. Now, let’s install the OpenVPN package, you can do this by entering the following command.
sudo apt install openvpn
5. Change directory to the OpenVPN directory by entering the following.
cd /etc/openvpn/
6. We will now need to download the VyprVPN ovpn files using wget.
sudo wget -O vyprvpn.zip \
https://support.vyprvpn.com/hc/article_attachments/360052617332/Vypr_OpenVPN_20200320.zip
7. Next, we will now need to extract the files that we need.
sudo unzip -j vyprvpn.zip "GF_OpenVPN_20200320/OpenVPN256/*" -d "/etc/openvpn/"
We use some of the unzip commands arguments so that we are only extracting the files that we need.
8. To connect to VyprVPN simply use the following command.
sudo openvpn file_name
Replace file_name
with the location of where you wish to connect.
For example, If I wanted Canada for example, then I will use Canada.ovpn.
You can view all the locations by using the following ls command.
ls -l /etc/openvpn
Below is an example of connecting to Canada.
sudo openvpn /etc/openvpn/Canada.ovpn
9. It will now ask for your credentials, and you will need to enter them to be able to connect to VyprVPN.
Test your connection by going ipleak.net. You should have a different IP to your usual one.
10. If you need to disconnect, then you can easily use either CTRL + C or the following killall command.
sudo killall openvpn
Auto Start VyprVPN
Most of us love to reduce the amount of manual input required for when it comes to technology.
The following steps will show you how to set up VyprVPN to connect automatically on bootup.
1. Firstly, we will need to save both our username and password in a file.
sudo nano /etc/openvpn/auth.txt
2. In this file, add your chosen username and password for the service. Make sure the username and password are both on separate lines.
username
password
3. Save and exit by pressing CTRL + X, then Y and lastly ENTER.
4. Now we will need to copy the ovpn file, simplify its name at the same time.
sudo cp "/etc/openvpn/Australia - Sydney.ovpn" /etc/openvpn/aussyd.conf
5. Now let’s edit this new file.
sudo nano /etc/openvpn/aussyd.conf
6. We will only need to do a straightforward edit in this file.
Find
auth-user-pass
Replace with
auth-user-pass auth.txt
7. Finally, we need to setup OpenVPN to auto start using our ovpn file.
sudo nano /etc/default/openvpn
Find
#AUTOSTART="all"
Replace with
AUTOSTART="aussyd"
Replace aussyd
with the filename you set.
8. Save and exit.
9. Reboot the Raspberry Pi to test out our new configuration.
sudo reboot
10. Now test the VPN by going to ipleak.net or a similar website. The IP should be VyprVPNs and not your own.
Doing this step will confirm that we have successfully set up VyprVPN on the Raspberry Pi.
Preventing DNS Leaks
To ensure that your DNS isn’t leaking your location you will need to do a tweak on your Pi.
To fix this, we will simply force our DNS to run through Cloudflare’s public DNS rather than our internet service providers (ISP) DNS.
This process is pretty easy and won’t take long to do.
1. Firstly, load into the dhcpcd configuration file and update the following line.
Open
sudo nano /etc/dhcpcd.conf
Find
#static domain_name_servers=192.168.0.1
Replace with
static domain_name_servers=1.1.1.1
2. Save & exit the file.
3. Now reboot your Pi by entering the following command.
sudo reboot
4. Go to ipleak.net and check that your DNS is no longer leaking. If you’re still leaking. then you might want to look at this page on WebRTC requests for more information.
Troubleshooting
If you run into trouble while setting up Raspberry Pi VyprVPN then the troubleshooting tips might help you out.
- You’re able to start and stop your VPN by using the following command. Replacing stop with start will start the VPN backup. This command will only work if you have it set up for autostart.
sudo systemctl stop openvpn
- It’s important to be aware that we are storing credentials in plain text. This lack of security makes it essential that you keep your Pi secure against unauthorized access. Just changing the default password will heavily improve your security.
Conclusion
As I mentioned above, there is plenty of other projects that work great with a VPN. Something as simple as a Torrentbox will benefit. Just make sure your VPN provider allows torrenting as some will ban you for using up too much bandwidth.
Hopefully, by the end of this Raspberry Pi VyprVPN tutorial, you have everything set up and working as it should be. If you require further help, then I highly recommend that you leave a comment.
I keep getting this error I have remove the IP no.s
Thu May 28 14:44:53 2020 OpenSSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Thu May 28 14:44:53 2020 TLS_ERROR: BIO read tls_read_plaintext error
[SNIPPED]
Hi Ed,
It looks like the OVPN files we were linking to were out of date.
We have updated to the latest link provided by the VyprVPN team, try that and let us know if that fixes your issues.
Cheers,
Emmet
I was using raspberry pi with nordvpn, was very easy to set up. Never tried it with vypr though.