Raspberry PI is a wonderful device: so simple, yet so powerful and useful. As a regular VPN user, you will probably want to set up a VPN connection on your Rasp as well. The process is not trivial, but it can be done without much hassle. Learn how to set up a Raspberry PI VPN.
What is Raspberry PI?
As you probably know, the Raspberry Pi is a tiny computer that was built to promote the teaching of basic computer science in schools and developing countries. Since its launch in 2015, it becomes very popular (more than 12M units sold so far) due to its cost (between $5 and $35), its simplicity and versatility. Raspberry Pi is now the preferred tool for hobbyists, students, and even hackers.
What can you do with a Raspberry Pi?
Well, you may use it in any project that involves a small computational unit. You may even use it as a desktop PC.
Are you new to Raspberry PI? Here are two articles that may give you an idea what to do next: MakeUseOf – Raspberry Pi Projects for Beginners and LifeHacker – Top 10 Raspberry PI Projects for Beginners.
What is RaspberryPI VPN and why would you need one?
If you are using your Raspberry PI as a desktop computer, then you may need VPNs (Virtual Private Networks) to: secure your Internet connection, protect yourself from hackers or unblock restricted websites.
As expected, due to hardware and software restrictions, you may NOT use Raspberry PI VPN in the same way you use VPN on a regular desktop or laptop.
How to configure the VPN on Raspberry Pi?
This article covers the way you set up a VPN connection on a RaspberryPI, not the way you install a VPN server on your Raspberry PI device. If you are interested in using your device as a VPN server here are some useful article:
- How to install a PPTP VPN server on a Raspberry Pi
- How to set up an L2TP/IPsec VPN with SoftEther VPN on a Raspberry Pi
This tutorial will show you how you can set up a VPN secure connection from your Raspberry PI using OpenVPN, assuming that you run Raspbian O/S on it. Before you begin, you need to get an OpenVPN config file from your VPN provider (if you don’t have a subscription yet, take a look at the bottom of the article).
STEP 1. Get your current package list updated:
sudo apt-get update
STEP 2. Install the OpenVPN package:
sudo apt-get install openvpn
STEP 3. Download the OpenVPN config files and then copy them to the pi (via scp or FTP), then unzip them into /etc/openvpn
sudo mv ####_linux.tar.gz /etc/openvpn
sudo tar -xf ####_linux.tar.gz
STEP 4. Make the script executable
sudo chmod +x /etc/openvpn/update-resolv-conf
STEP 5. Use the following command to get connected (replace config file – ovpn file – with one of the VPN server you want to connect to). Depending on the config files, you may be asked for the credentials (username/password).
sudo openvpn –daemon –cd /etc/openvpn –config openvpn_config_file.ovpn
STEP 6. To disconnect run:
killall -9 openvpn
Raspberry PI VPN providers
To set up a Raspberry PI VPN connection, you need an active subscription to a VPN service (if you don’t have a VPN server of your own). Most of the top VPN providers offer access to OpenVPN server configs that you may use with the above set of instructions. Some of them also expose batch files that can be quickly executed. Take a look below at the recommended VPN services to be used on your RaspberryPI and their RaspberryPI VPN tutorials.
|VPN Provider||Raspberry PI Tutorial||Price|
|HideMyAss||Linux CLI OpenVPN Client||from $11.52/month|
|ibVPN||OpenVPN configuration for Raspberry PI / Configure the VPN for OpenELEC running on Raspberry Pi||from $4.95/month|
|NordVPN||OpenVPN on Raspberry PI||from $10.95/month|
|IPVanish||Set up IPVanish on Raspberry PI 3||from $10/month|
|PureVPN||Setup PureVPN on Raspberry Pi (PPTP)||from $9.95/month|
After you set up the VPN, don’t forget to check your visible IP address on XMyIP or other IP locator website.
To sum up, you may set up a VPN connection on your Raspberry PI without much hassle. You may go either with OpenVPN step-by-step setup or use the follow the tutorials of the above-listed VPN providers. Enjoy!
Did you set up your Rasberry PI VPN? What do you use it for? Let us know your thoughts in the comments below.