How to Install a VPN on Raspberry Pi – Setup a VPN on Raspberry Pi

0
1302
install a vpn on raspberry pi

If you’ve installed Kodi on a Raspberry Pi, you’re likely going to be thinking about how to take the next step: installing a VPN. Here’s where you’re probably scratching your head a little bit. As the Raspberry Pi doesn’t use a traditional operating system, your typical VPN won’t work out of the box. However, the Kodi community is fairly creative, so there are a few ways to install a VPN on Raspberry Pi. Barring that, you will have a few alternatives that you might want to consider if you believe the process is a bit too complicated for your skill level.

If you’re just getting started with this device, read our guide on How to Install Kodi on Raspberry Pi.

Before We Proceed

The Raspberry Pi is one of the best devices to use for streaming movies and TV through Kodi. However, on occasion, Raspberry Pi owners who use Kodi operating systems like OpenELEC have received copyright infringement notifications from their ISPs. This is not a common, but it does happen in several different countries. To avoid this scenario, most users will turn to a virtual private network (VPN) to protect their identity. We’ve researched a handful of services, and find that IPVanish offers the best experience.

IPVanish focuses specifically on user anonymity and securing personal information. The company maintains a no-logs policy and includes advanced data leak protection in case your IP address leaks for any reason. You’ll also find that IPVanish supports a large number of servers with unlimited bandwidth, making streaming movies and TV much easier, even while connected to the VPN.

kodi security

How to Install a VPN on Raspberry Pi

As we mentioned earlier, this is not exactly a cake-walk of a process. We don’t want to give our readers any false impression that it’s a simple download and install. In our article on how to install Kodi on a Raspberry Pi, we discuss how Kodi operating systems work. The Raspberry Pi’s Kodi operating systems use a design principle called “Just Enough Operating System” or JeOS. What this entails is crafting the operating system for the device with as limited functionality as possible. It trims the fat to keep the OS from having to rely on more powerful hardware, but it does no favors for anyone that’s used to the simple plug-n-play approach to software. That includes VPN software.

Below, we’ll discuss how to install IPVanish on your Raspberry Pi as our example VPN service. We’ll cover the three most popular Kodi operating systems: OpenELEC, LibreELEC, and OSMC. This process should work with other VPN services, however. While we’ve tried to simplify the explanation as much as possible, if you find that these come off as too technical, we’ve offered up a few potential alternatives at the end that might be a better option for you.

Install a VPN on OpenELEC or LibreELEC

install kodi on raspberry pi

Thankfully, the VPN installation process for these two Kodi operating systems is the same. OpenELEC and LibreELEC are mostly the same, with only some minor differences that primarily relate to release and management philosophy.

Step 1: Create your VPN account

The first step is to create your VPN account. You’ll need this information almost immediately, so make sure to have it handy. If you don’t already have an account, you can create one with IPVanish or any other VPN service. Most VPN services offer a few days free to try the service out before making a commitment.

Step 2: Install VPN Manager

The next step requires a VPN Manager for OpenELEC as well as a USB flash drive. Do the following:

  • Plug your USB flash drive into your computer
  • Click here to download the Zomboided repository
  • Locate where you saved the file on your computer and move it over to your USB flash drive

Step 3: Install VPN Manager on Raspberry Pi

  • Unplug your USB flash drive from your computer.
  • Insert your USB flash drive into your Raspberry Pi
  • Make sure your Raspberry Pi is connected to the internet (either wifi or ethernet)
  • Navigate to Programs and then Addons

openelec vpn

  • Select Get more
  • At the top of the list, select the ellipses,  “…”

openelec vpn how to install a vpn on openelec

  • Now on the All repositories menu, select the ellipses, “…” at the top again
  • On the next screen, select Install from zip

openelec vpn

  • On the next screen, choose the USB flash drive

openelec vpn

  • Select the file repository.zomboided.plugins-x.x.x.zip (the “x” can be any number). The repository will install

openelec vpn

  • Return to the Addons page and select Install from repository
  • Select Zomboided Add-on Repository

openelec vpn

  • Click on VPN Manager for OpenVPN and select Install

openelec vpn

Step 4: Set Up OpenVPN for IPVanish

  • Go back to the Kodi home screen
  • Select Programs and then open VPN Manager for OpenVPN
  • Click on Addon Settings

openelec vpn

  • Follow the Setup Wizard
  • Select IPVanish (or another VPN service you are using) from the VPN Provider menu
  • Enter your IPvanish username and password
  • Click on the VPN Connections tab

openelec vpn

  • Select First VPN connection. VPN Manager will now start connecting to the VPN server

openelec vpn

  • After a successful connection, you will see the full list of VPN servers available through your VPN service. Select your desired location

How to Install a VPN on OSMC

OSMC install kodi on raspberry pi

If you opted for OSMC as your Kodi operating system, you’ll be in for a bit of a headache trying to get a VPN working. Others have voiced their complaints with OSMC to get a VPN Manager-like add-on working on OSMC, but nothing of the sort exists as yet. Instead, you’ll need to follow a somewhat complicated process to get a VPN installed.

To make this work, you’ll need the following:

  • SSH enable on your Raspberry Pi
  • PuTTY installed on a Windows computer or SSH for your Mac/Linux
  • Your VPN provider credentials

Click here to download and install PuTTY

Step 1: Acquire your Raspberry PI IP address

The easiest way to do this is to check your router for connected devices. Depending on your router, how you determine connected devices will vary. If your router has a digital display that shows connected devices, check there. Alternatively, you can enter find out through your router’s home page by going to your browser and typing in 192.168.1.1 (or whichever IP address your router is using), entering your login credentials and pulling the information that way.

You may also find out the Raspberry Pi IP address directly from your Raspberry Pi. Type ifconfig in your terminal command screen, and check for the inet addr under either lo (for Ethernet connections) or wlan0 (for wifi connections).

Step 2: Install the VPN using PuTTY

  • Open PuTTY
  • At the top of the window, type in your Raspberry Pi IP address where it says Host Name
  • Make sure that SSH is selected under Connection type
  • Press Open at the bottom of the window
  • In the terminal window, type in your Pi’s username and password
  • After your receive the free software info, Install OpenVPN. Type in the following:

 

sudo apt-get update
apt-get install openvpn
cd /etc/openvpn
  • Next, download the IPVanish config files. Type in the following:
sudo wget https://www.ipvanish.com/software/configs/configs.zip
  • Unzip the configuration files by typing in the following:
sudo unzip config.zip
ls

Step 3: Connect to Your VPN

  • The last command should have opened a list of servers. To log in to a server, type in sudo openvpn followed by the server address, such as syd-a01.ipvanish.com syd-a02.ipvanish.com
  • You will then be asked for your VPN service credentials. Type these in to connect to the VPN server

Raspberry Pi VPN Alternatives

If your eyes are bugging out of your head at these VPN setup instructions (especially those of you who opted for OSMC), some alternatives might be worth exploring.

Install a VPN on Your Router

This is a viable option, and most VPN services provide instructions and software to download and install the VPN onto your router. In many cases, this might be a good option in general, as a VPN running through your router will cover all of your Internet-connected devices. If you do choose to go this route, you will need to have the right router for the job, however.

For IPVanish, you will need a router running either DD-WRT or TomatoUSB. At this point, you’ll want to treat your Raspberry Pi just like a Roku. When writing about installing a VPN on Roku, we discovered that it’s simply not possible to do so on that device, making the router option the only choice.

Our Roku VPN guide focuses on how to install a VPN on your router. Click here to read our detailed guide on the router VPN installation process.

Purchase a VPN-enabled Router

Some VPN services readily sell routers that are ready to go right out of the box. If you’re looking for the fastest route that will cover all of your streaming devices, we suggest this as a viable option. This is also a good alternative if you are already in the market for a new router. Keep in mind that routers do get old, and the technology and hardware behind them don’t keep up well. Additionally, older routers have a hard time supporting more devices, so updating an older router is a good idea.

FlashRouters sells several routers that are ready to go with different VPN software already installed. They sell routers ready to go with IPVanish software installed, as well as routers for a few other VPN services.

Change Your Kodi Operating System

This might just be the option for those who installed OSMC but don’t like the difficulties around installing a VPN for the service. OSMC is easier to install, but without a good VPN, you might not find as much use out of your Raspberry Pi. If you don’t want to go through the process of installing a VPN on your router or buying a router that already has your VPN software installed, this might be the cheapest, quickest method for you. In fact, wiping your Raspberry Pi of OSMC and installing OpenELEC or LibreELEC might be faster than trying to install a VPN on OSMC through the SSH terminal.

The OpenELEC and LibreELEC installation processes are a bit more complicated than what you’ll find with OSMC. However, the easy-to-use VPN Manager for OpenELEC, which also works on LibreELEC, might make that switch a more viable option for those of you who feel a bit intimidated by the OSMC VPN alternatives.