HomeRaspberry PiThe hassle free Raspberry Pi VPN - piVPN server

The hassle free Raspberry Pi VPN – piVPN server

Configuring an openVPN can be a difficult task. Not when you have piVPN to help you!

Setting up your own VPN server sounds complicated and time-consuming. It was at first, especially when you are trying to do this from China and half of the internet related to VPN is not available. Fortunately, with hassle-free Raspberry Pi VPN – piVPN you can get it up and running in a moment. The process is easy enough but I will walk you through to make sure you do it right. If you wonder what kind of performance you should expect from the Raspberry Pi Zero check this article out.

Hassle free Raspberry Pi VPN VPN – piVPN server on Raspberry Pi Zero

The process is very simple, as the installer as very easy to follow steps with little variations. Before you start, head to www.no-ip.com and get a DNS. It’s easier than remembering your IP. If you wonder if you should splash out on the best Raspberry Pi board, read this article about VPN speeds across the boards. You will need it for the installation. You will also need:

  • A way to download a file from Raspberry Pi to PC or phone (I use Notepad++ FTP plugin or WINscp )
  • Open VPN app/software on your client device
  • 15 min of spare time to wait for the key generation

Check the server’s IP, you can do so by visiting Google and typing my IP, or type:

dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}'

in the console of your Raspberry Pi.  You will also need access to your router, as we will have to forward a port.  Before you start with all of this make sure your Raspberry Pi has a static IP assigned. Run:

ifconfig

to check what interface handles your internet connection and follow the steps from here to make it permanent.

You are ready to roll. Update your Raspberry PI and run:

curl -L https://install.pivpn.io | bash

This is not the safest way to get things done on the Raspberry Pi, but you can trust this installer. To navigate the menus use arrows/TAB to change the cursor position, SPACE to select an option and ENTER to continue. If you don’t have a static IP I found a fairly simple guide from noip.com that shows you how to update your IP every X minutes. The link is here.

piVPN installation

Take the time reading the info, as going back is not always possible. I will assume you have completed the static IP part already so we could move on.

You should see the current IP address listed. Check if this is the same one you have configured previously and confirm. You can change it at this point as well. Note the Gateway address. We will use it later. Unless you have multiple users you should see only one option. Use arrows and SPACE to select the correct user.

Because it is a VPN server we want to make sure we don’t have to attend it. It’s for the best if you leave the piVPN to apply the settings automatically.

UDP vs TPC -extra security over speed – UDP, as suggested it the better option.

Use a different than the default, port number. Ie 1501 and make a note of this. Confirm the chosen port. Now key encryption. 2048-bit will take about 20 min,  and it’s the standard security. For your safety pick the 2048-bit encryption and go get a brew, or watch another video from my playlist.

Once the encryption is done, it’s time to fill in the DNS (or IP address) you can use the default one but I strongly recommend the DNS.

Time to provide the server with custom DNS – we are going to use our router’s IP: 192.168.1.1 (The Gateway you have noted before).

The system is ready for the reboot. You will be able to add the users.

Use piVPN -h for help file and run

pivpn -a

to add a new user. You will be asked to add a password as well.

Everything is done on the server side. Time to download the openvpn config file to a client.

You can do this by using FTP client of the Notepad++:

Save it somewhere and open the openVPN client of your choice. For the PC open up the OpenVPN and import the profile, the same goes for the android app.  Once you have done this, you are ready to go. 

Your VPN should be up and running now. It may not protect your privacy while you are home, but will deal with IP related bans when you are visiting places. As you can see, creating your own Raspberry Pi VPN server is easy, and hassle-free!

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

M5Paper

Programable, ESP32 based awesome dev platform with 4.7 e-ink display by M5Stack

More HATs

client-image
client-image

Argon One M.2

Enclose Raspberry Pi 4 inside this great case with custom I/O, cooling and GPIO and M.2 SSD support

More cases on

client-image
client-image

Best Raspberry Pi Projects

How to use Raspberry PI as WOL (wake on lan) server

0
While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

Slow Internet Warning

0
From time to time my Internet grinds to a stop. Since Raspberry Pi 4 comes with a 1Gbps Ethernet, I decided to take advantage of it and create a reporting system in NodeRED that will monitor and report when the ISP is not keeping the contractual agreements. Works with Alexa, Google Home, Android and Windows 10.

How fast Raspberry Pi NAS is?

0
Let's see how fast Raspberry Pi NAS really is?

Argon18: Argon ONE SSD modification

0
Argon One case just got better - now you can boot it from USB without ruining the design thanks to Argon 18: Argon One SSD modification

HOW TO...

It took me 2 months to boot CM4 from NVMe

0
Complete beginners guide to Compute Module 4 boot from NVMe.

Raspberry Pi Zero 2 W vs other Zero boards

0
It's time to test the Raspberry Pi Zero 2 W against other Raspberry Pi boards from Zero series: power, WiFi, temperature and core performance

C/C++ and MicroPython SDK for Raspberry Pi Pico on Windows

0
A guide to SDK toolchain for Raspberry Pi Pico and C/C++ , Micropython on Windows.

A comprehensive guide to Grafana & InfluxDB

0
How to use Grafana and InfluxDB on Raspberry Pi for IoT sensors in home automation

How to boot Raspberry Pi 4 from USB

0
How to set up and boot Raspberry Pi 4 from USB drive - headless guide.