In this age of online surveillance and cybercrime, taking steps to protect your privacy and security online has never been more important. And with more and more devices connecting to the internet and being of interest to both surveillance officers and hackers, using a VPN to secure your internet connection and protect the activity of all your connected appliances is becoming increasingly standard practice.
Teaching the next generation of internet users and developers about the importance of online privacy and security, and how a VPN can help in that, is therefore absolutely essential. And this is why the installation of a VPN on a Raspberry Pi devices is a core skill and something every Raspberry Pi user should be learning.
But before we get into the details of how to install a VPN on Raspberry Pi devices, let’s cover off a few basic points to make sure everyone is up to speed.
→ Jump right to the guide if you’re in a hurry
What is a VPN?
VPN is an acronym which stands for Virtual Private Network. A VPN is an increasingly common and popular piece of software which helps users to protect their online data from unwanted snooping and the threat of hackers, and also render themselves anonymous whilst online.
When connecting to the internet through a VPN, all of your online traffic is diverted down a secure tunnel to an external server. This tunnel encrypts all of your data meaning that everything you do online is encoded and hidden from prying eyes.
This data passes through the VPNs server before it reaches the online site or service you are connecting to. In passing through this server, the data is tagged with the IP Address of that server rather than yours as a user. An IP Address is the piece of data which is used to link individual users with their online activity.
If your data passes through a VPN server, this means that the sites you visit cannot trace your online activity back to you directly, but only to the server you are using. Likewise, your ISP can see that you are connecting to the VPN server, but cannot see where your data is going from there.
In this way, VPN users are rendered anonymous online. This can help with simple things like getting around online censorship or geo-blocked content, but also stops ISPs being able to track and sell your online activity, and the sites you visit from using your online activity for advertising or data-selling purposes.
In an age of growing government surveillance and persistent attacks on online privacy, VPNs are growing in popularity.
A VPN can be downloaded and used on an individual device, such as a computer, smartphone, or tablet. But it can also be used with a router. If you are using a VPN-enabled router, this means that any device that attaches to that router’s Wi-Fi signal is protected by the VPN.
This is especially helpful in this age of the Internet of Things as many connected appliances are not equipped with, or indeed capable of supporting, a VPN connection on their own.
What is a Raspberry Pi:
The Raspberry Pi is a wonder creation from the UK which is intended to help with the teaching of computer science in schools and colleges, as well as in the developing world.
It is essentially a single board computer which features a Broadcom system on a chip (SoC), including an ARM compatible central processing unit (CPU) and an on-chip graphics processing unit (GPU, a VideoCore IV).
The operating systems and computer memory are stored on an SD or micro-SD card, and most devices are equipped with USB slots, HDMI connectors and video and audio output sockets. But additional hardware, such as a keyboard, mouse, or case, has to be purchased either separately, or as part of an official or unofficial bundle.
They are developed and manufactured by the Raspberry Pi Foundation and have enjoyed huge success. They were initially intended for markets in developing countries, but have proved popular all over the world. In November 2016, the Raspberry Pi Foundation claimed to have sold more than 11 million units making it the biggest selling UK-made computer.
With prices starting from just £32.99 (around $43) for the latest model, the Raspberry Pi 3 Model B SBC, and a basic Raspberry Pi Zero development board available for just $5, and the desire and need for computing skills ever increasing, it is little wonder they have proved so popular.
Using a VPN on your Raspberry Pi:
Like any other device, it is a good idea to use a VPN when connecting to the internet using your Raspberry Pi computer. But whereas most computers will allow users to download a VPN from a ready-to-use VPN provider, the nature of a Raspberry Pi means it is not quite so simple on this device.
Many of the big-name VPN providers, such as NordVPN, PureVPN, and Private Internet Access can be installed onto Raspberry Pi computers, but a basic degree of coding knowledge is needed to do it. If you are using a Raspberry Pi device, this is a skill you are likely to either have, or be learning, so that shouldn’t be too much of a problem.
The basic premise of installing each of these VPNs is broadly the same, but it is, of course, advisable to inquire with customer support about the specific recommendations of each VPN provider.
In this article, I am going to outline the process recommended by NordVPN using the OpenVPN protocol.
I have chosen this process for three reasons:
1. Firstly, NordVPN is one of the best VPN providers on the market today and Raspberry Pi users will not go far wrong if they choose them as their provider.
2. Secondly, the process recommended by NordVPN for installing and using their service on a Raspberry Pi is one of the simplest ones around and mirrors the process others use as well.
3. Thirdly, whilst it is possible to install VPNs on Raspberry Pi devices using different VPN protocols, OpenVPN is a secure and robust VPN protocol, and the one best suited for devices such as the Raspberry Pi.
How to install a VPN onto your Raspberry Pi device
To install NordVPN onto your Raspberry Pi you will simply need to follow these steps
- Switch on your Raspberry Pi terminal.
- Type in sudo apt-get update to get the latest update to your Raspberry Pi package list.
- Type in sudo apt-get install openvpn. This should install OpenVPN onto the device.
- Once OpenVPN has been installed, you need to navigate to OpenVPN directory. You can do this by typing in: cd /etc/openvpn/
- You will then need to download the NordVPN .ovpn configuration files. You can do this by typing in: sudo wget https://nordvpn.com/api/files/zip
- Once those have downloaded, you will need to unzip the zip file. You can do this by typing in: sudo unzip zip
- Once the file is unzipped, you need to connect to the NordVPN service. To do this you need to type in sudo openvpn file_name (the example given by NordVPn is: sudo openvpn de75.nordvpn.com.udp1194.ovpn)
- Once connected, OpenVPN will ask for your NordVPN account details. If you haven’t already, you will now need to sign up with NordVPN on their website. Once you have done this, enter your NordVPN username and password.
- Once that is done, you will be connected to the NordVPN server and all of your online activity will be both secure and private.
- If you want to disconnect from the NordVPN server, you can just press Ctrl+C on the keyboard. But if you want to disconnect while using a different terminal window, you will need to enter the command sudo killall openvpn
For those familiar with the workings of a Raspberry Pi, this process should be a pretty straightforward one. Even those who are coming at this for the first time shouldn’t encounter too many problems.
NordVPN runs a limited time offer (we have no idea how long it’s going to stay on) that gives our readers a huge 72% discount on the monthly price if you signup for the two year plan. It’s a bit hidden on their site, but you can get it with this link.
If you are an enthusiast for the Raspberry Pi, the likelihood is that you can already boast a degree of knowledge and understanding about computing and therefore appreciate the importance of online security and privacy.
Using a VPN whilst connecting to the internet is every bit as important when using a Raspberry Pi as it is with other such devices. It should be a default reaction to ensure that your online data remains both secure and private.
For the Raspberry Pi, OpenVPN remains the best VPN protocol to opt for. It is secure and flexible, but also relatively simple to install, as the guidelines for setting up NordVPN clearly show above.
But whichever VPN provider you opt for, and whichever protocol you choose, using a VPN with your Raspberry Pi is, in this day and age, an absolute necessity.