THE US POSTAL SERVICE IS EXPERIENCING SIGNIFICANT DELAYS. WE SUGGEST UPS SHIPPING IF YOU ARE IN A HURRY. CLICK HERE FOR DETAILS.

How To Use Your Raspberry Pi as a VPN Router

November 23, 2020

How To Use Your Raspberry Pi as a VPN Router

Using a VPN (virtual private network) router can make your internet connection much more secure. We show you how to use your Raspberry Pi as a VPN router by outlining the steps to set it up for this purpose.

Initial OpenVPN Setup

We’ll start by installing OpenVPN, which is a free software that allows you to use a VPN with your network. To begin, go into your Raspberry Pi’s command line and type in sudo apt-get install openvpn. Input the letter Y and press the return key to continue. After this, you’ll need to restart your Pi with sudo reboot.

You’ll need to download the OpenVPN configuration files of your choice from a VPN service provider based on your preferred locations and unzip them, so they appear as accessible files. Here, we’ll use the VyperVPN provider as an example, though you aren’t limited to this choice. NordVPN is another provider you could use. To do this, enter cd/etc/openvpn in the command line to view the files that you have available. Next, type in sudo wget https://support.goldenfrog.com/hc/article_attachments/214728647/GF_OpenVPN_10142016.zip to download your files, and type in sudo unzip GF_OpenVPN_10142016.zip to unzip them. Write ls in the command line and enter it to see the list of .ovpn files that you can use.

Connecting To a Server

Before proceeding, you must have authorization for VyprVPN. Put in sudo nano /etc/openvpn/auth.txt. This will create a file where you will write your VyprVPN username and password on two separate lines, in that order. Press Ctrl+X to exit, and save by typing Y again.

Choose a configuration file and connect to that server with sudo openvpn --config on one line and “/etc/openvpn/GF_OpenVPN_10142016/OpenVPN256/[the file’s name].ovpn” --auth-user-pass /etc/openvpn/auth/txt on the next line. When you write the file’s name in this command, don’t include the brackets.

Automating the VPN Connection

Your Pi is now a working VPN router, but you’ll need to go in and configure it every time you turn it on. Automate this process, so it connects with VPN without your commands by typing sudo nano /etc/rc.local. This will take you to the rc.local file. Inside this file, find the code line that includes the word and number exit 0. You’ll need to enter in three lines directly over this one. The first line is sleep 5, the second is sudo openvpn --config, and the final and longest one is “/etc/openvpn/GF_OpenVPN_10142016/OpenVPN256/[the file’s name].ovpn” --auth-user-pass /etc/openvpn/auth/txt. Make sure, once again, that you have the correct file name in this third line without the brackets. Exit with Ctrl+X and save by entering the letter Y in the command line.

Get started making your own VPN router at home by getting a Raspberry Pi from Chicago Electronic Distributors today. We are a DIY electronics store that stocks Raspberry Pis, Pi kits, and Pi accessories to support all the projects you have in mind.




Leave a comment

Comments will be approved before showing up.


Also in News

Top Accessories for the Micro:Bit
Top Accessories for the Micro:Bit

January 12, 2021

The BBC micro:bit is a computer board that you can use for a plethora of electronics projects. These are a few of the top accessories you may utilize with it.

Continue Reading

Robotics: Raspberry Pi vs Arduino
Robotics: Raspberry Pi vs Arduino

December 15, 2020

You can use robotics for all kinds of components. Two products that can prove highly useful to you are the Raspberry Pi and Arduino, which we compare here.

Continue Reading

CED Shipping Guidelines for December 2020

December 09, 2020

Continue Reading