Roll Your Own VPN with Raspberry Pi
If you want the maximum possible privacy protection when you’re online, having your own VPN server is the ideal solution. While building one may be outside the technical abilities—and ambition—of a lot of users, there are good reasons to consider doing so if you enjoy technical projects.
You won’t have to worry about logging policies, of course, since you’ll be running your own VPN. You can also use it anywhere and be secure in the knowledge that your data is encrypted.
Using Raspberry Pi to build your own VPN is technically demanding, but here are the basics of using the OpenVPN protocol.
What You’ll Need
You’ll need three things to get started. You’ll need a Cat5e cable to go between your router and your Raspberry Pi module. You’ll also need a Raspberry Pi Model B. This device comes with the accessories you’ll want, including a case and a power source. The final piece of equipment you’ll need is an SD card with a minim of 8GB storage.
Install NOOBS on the SD card.
You’ll want to make sure that all of the software on your components is up to date. You’ll next need to generate keys for your Raspberry Pi. You can do this using the Easy_RSA package that comes with OpenVPN.
When you generate your OpenVPN keys, you’ll sign them yourself rather than using a third party to take care of it. Of course, this eliminates a cost right off the bat. There are specific directions for this process at the link referenced above, as well as a great deal of instruction for some of the following steps.
Once you have your certificate signed and ready to go, you’ll have to set up the Raspberry Pi as a server on your network. This will require that you use the command line and the process is complex, so be aware that this may take some time to complete.
You’ll have to generate configuration files for your client devices so they can find your VPN server when you’re not on your home network. This can be done with scripting, automating the process and saving a lot of time.
Once you have your clients and your servers set up, you should be able to connect to your own VPN server from anywhere. You’ll have complete control over it, of course, and that means a lot in terms of privacy protection.
Be sure you’re using the current version of OpenVPN, which has been patched to fix the Heartbleed vulnerability. Provided you do this, you should be safe from any attacks that exploit the Heartbleed security problem. If you’re not sure whether or not you’re vulnerable, you can find a script to test your server here.