This is the first of a series of posts on how I set up a Raspberry Pi 2 Model B running OSMC to operate as an OpenVPN server.
I found a number of tutorials on setting up OpenVPN on the Pi running Raspian but there are some subtle differences if you are using OSMC.
Update: This tutorial also works with Raspian installed as your PI operating system. I currently have a PI running as a web cam (MotionEye) and OpenVPN server which I set up using these instructions (there’s a couple of places where a path may be different so I will update this tutorial at some point to identify the differences but they should be fairly obvious to most).
Setting up your Pi as an OpenVPN server allows you to securely connect to your home network with your phone/tablet/laptop when you are out and about. This means you can access the internet from your device as if you were at home i.e. with the same level of security and the same location (useful if you are abroad so you can access content which may be restricted to your home country).
This is NOT about setting up your Pi as a VPN client connecting to an external VPN server provider.
To run an VPN server you need a static public IP address. If you don’t already have one (as I didn’t) then you need to set up a Dynamic DNS domain name. I created a free Dynamic DNS domain on ChangeIP.com.
The following instructions are specific to my environment and the choices I made e.g using ChangeIP.com. It’s not a definitive, fits-all tutorial, just an explanation of the way I did it.
Note, this is not a quick process; it will probably take you 2-3 hours if all goes smoothly … one operation in step 3 alone can take up to 1 hour to complete (you don’t have to watch it complete so plan for a break).
Be patient. The key is to type the commands accurately; be careful to get the spaces right. Don’t be tempted to cut and paste commands from the web page into the terminal window as some characters may not be as they appear. Step 3 is the longest and most error prone stage; it may help to print the page so you can tick off commands as you proceed and make notes (I found it a help when doing my initial set up with the tutorial I used). Good luck!
- How to set up your own Raspberry Pi powered VPN (BBC)
- Raspberry Pi Home Server: Part 11, OpenVPN
- Installing Openvpn In Osmc
- OpenVPN on Debian 8 (Jessie)
- Saving Iptables Firewall Rules Permanently
If you have found this useful then I’m glad to be of help. If you have found it REALLY useful you can send me 1 US Dollar by clicking the Donate button!