in ,

How to Make a Raspberry Pi VPN Server, Hacker News

How to Make a Raspberry Pi VPN Server, Hacker News


        

            

             

         

The Raspberry Pi has a ton of different uses. Since it’s small and energy-efficient, uses such as a network-attached storage (NAS) device,media server,game server,smart home hub, or any number of Internet of Things (IoT) projects run extremely well on the Raspberry Pi. Since the credit card-sized Raspberry Pi sports a tiny footprint and sips power, it’s ideal for an always-on device. And with superb internet connectivity, whether running on a wireless network or via a wired Ethernet port, the Pi is suitable forhandling network traffic. Learn how to build a Raspberry Pi VPN (virtual private network) server!

What is a VPN and Why Should You Use One?

Okand continue.

Next up, select a static IP address, then hit

Ok (*********************. Choose either wlan0 or eth0 for wireless or ethernet respectively. Highlight the option you wish to choose, press

spacebarto add an asterisk beside that choice, then hitOkwhen you’re ready.

Then, there’s a message asking if you’d like to use your current newtork settings as a static address. You can review your IP address. If you’re satisfied, pressYes) and continue.

PiVPN now confirms your IP address settings. Wait a bit, and you should now see a screen asking you to pick a local user to hold your OpenVPN configuration. ClickOk. Then, you should be able to select a user. On my Raspberry Pi, I had one option: Pi. Press the spacebar to select it and an asterisk will appear next to Pi. After that, hitOk.

You’ll be prompted to enable unattended-upgrades. SelectOkand continue. Next up you can either enable unattended-upgrades or not. Choose eitheryesor no. Once you’ve proceeded, apt-get will check for upgraded packages, as well as check if OpenVPN is installed. If it’s not installed, PiVPN proceeds to install it.

If PiVPN begins installing OpenVPN, you’ll see a notification about selecting an OpenVPN port. By default, that’s 1194 but you can change it. I left this unchanged. PressOk.

Confirm your OpenVPN port and hitYes. Select your preferred encryption strength: – bit (recommended,

****************************** – bit (test level), or (bit) paranoid level). I left this as the recommended 4096 – bit level. When you’re satisfied, hit (Ok

A screen lets you know that default values ​​for fields used in a security certificate will be reviewed. SelectOk, and review the different fields including country, state, city, and more. You can change these, or leave them as-is. I left them unaltered and pressedOk. Again, confirm that these fields are correct and pickYes.

OpenVPN will now create your encryption keys, so clickOk

. Wait for your encryption to generate keys. Depending on your level of encryption, this might take a bit of time. Go grab a cup of coffee or a pint, walk your dog, or fire up your favorite video game while you wait. Upon completion, OpenVPN prompts you if you’ve got a public DNS entry you’d like to use versus a public IP address. Select your preferred option, and continue.

Should you opt for a DNS entry, PiVPN asks you to give your public DNS name. Then, pick a DNS provider such as Google and OpenDNS. Enter that and pressOk. Alternatively, selecting IP address lets you enter your IP address.

Installation is complete, and you can runpivpn addwhich will create ovpn profiles. You’ll be prompted to reboot your Raspberry Pi so selectYes.

After restarting, go ahead and update again:

sudo apt-get update && apt-get upgrade

Then, configure your VPN client:

pivpn add

You’ll need to select a name for your client and specify a password that will be used for connecting to this VPN. After you set up your first OpenVPN client, there’s an .ovpn file for the newly-created client, and you need this to log in on a client device.

Install OpenVPN on the Raspberry Pi

Alternatively, you may prefer to simply install OpenVPN for the Raspberry Pi on a Linux distro such as Raspbian, Debian, Ubuntu, Linux Mint, or another OS.

Begin by performing an update:

sudo apt-get update && apt-get upgrade

Next, install OpenVPN:

sudo apt-get install openvpn unzip (*****************************

Check that your time zone information is correctly configured:

sudo dpkg-reconfigure tzdata (******************************

Select any add-on services, choose your country, region, and protocol, either UDP or TCP.

Make sure you’re running with root privileges:

sudo -i

****************

Now, OpenVPN should be properly installed on your Raspberry Pi.

OpenVPN Clients and More

In order to connect to your Raspberry Pi VPN server, you’ll need to run client software. For macOS, Tunnleblick

is a solid choice. On Windows, you can use OpenVPN

. And forAndroid

or iOS) mobile devices, OpenVPN Connect is a great option. Once you’ve got a client installed, you need to copy the client configuration .ovpn file to your device. Then, you can connect to your Pi VPN server.

Run OpenVPN on your Raspberry Pi – Final Thoughts

An OpenVPN Raspberry Pi server works extremely well. Small, energy-efficient, and with a simple OpenVPN installation, the Pi is a fantastic always-on VPN server option.

              (****************************************                                     

                

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings

Tell HN: Y Combinator Is Hosting a Work a Startup Expo in Los Angeles on March 7, Hacker News

Dealmaster: Apple's AirPods are back to their Black Friday price at Amazon, Ars Technica

Dealmaster: Apple's AirPods are back to their Black Friday price at Amazon, Ars Technica