Making My Own VPN with Pi 5

I recently got a Raspberry Pi 5 8GB and couldn’t figure out what to do with it. I was trying to think of something practical that my whole family could benefit from. And that’s when it hit me, I could make my own VPN! The process to me three days even though it definitely SHOULD NOT HAVE, but even though I’m an avid Linux user this was something new and tricky. In the end now I have my own VPN that I know is 100% private and I can connect to it from anywhere in the world to secure my traffic and access my home network securely. I also installed Pi-hole so I no longer have ads, trackers, malicious domains, telemetry data collection, phishing, or crypto jacking network wide. In my opinion, one of the best Pi projects you can do!

Which VPN did you choose? I set up WireGuard through PiVPN alongside PiHole - seems to be the de facto standard for Pi-related hosting from my readings but I’m fairly new to all this anyway

This is a great use for a Pi. I assume you’re running a cron job or small docker to monitor and update your dynamic public IP address with a DDNS provider?

A word of caution on the privacy aspect. Traffic routed from your VPN server to the Internet will always come from your home IP address and be visible to your ISP, unless you also route that traffic through a public VPN provider.

And there’s many other techniques used for identifying and tracking people on the Internet. If advertising, data brokerage, law enforcement and intelligence agencies across the world got together today to design the ideal mass surveillance platform the wouldn’t come up with something better than the Internet.

Gotta keep the projects rolling! Family calendar, FTP, Home Web Server, home Minecraft server, home photo storage. So many options just on the on the surface that you should be able to even get the Family involved.

For me the problem is port forwarding, I used to use tailscale but recently switched to twingate

Congrats! I went on this rabbit hole a couple of months ago. Was completely new to linux. Now I am hooked on networking. I even went as far as using the PI as a router with OpenWRT and have my router set as an Access Point. I eventually just got a Gl.Inet Flint 2 while I wait for Flint 3 and going to repurposes the Pi 5 8gb. Wanted to get the AI HAT+ for it to tinker and maybe get the new 16gb Pi 5 plus HAT +. I know that’s probably not cost effective but it’s fun working with the Pi.

Did rent a VPS and create your own VPN client? Or was that already what you meant when you said you created your own VPN?

Great question. Going this path myself.

I’ve got a pi 4, was and is a great project :slight_smile: omv6 (i need to upgrade), nas, jellyfin, portainer. Next stop pihole :slight_smile:

Tailscale + Pihole is the way to go.

They have very good documentation on their website

Thanks for this push. I started the vpn journey, then discovered my isp has put me behind cgnat. So pivpn was no go for me. Finally chatgpt helped me with tailscale and thats setup very well. All good. With cxexplorer i am able to explore my pi from android. Private web server on my pi is also available on Android.

Yep. Spin a docker of wg-easy and you’re set :slight_smile:

As a fun project (after I upgraded my Jellyfin server from a RPi 4B to a Zimaboard) I turned my RPi 4B into a travel router of sorts with RaspAP. Non-containerized; just RaspAP on top of Pi OS lite 64bit. A bit slower than my Beryl but works as advertised. Search out Everyday Tech’s video on that.

How did you do that? I’m a new Linux and RPI user

u/pepetipbot 200 pepe

Something I will note though is the fact that Pi-hole is a lil bit tricky. The setup is very easy but the potential problems. The problem stems from the fact that you’re relaying on strangers and their blocklists which sometimes block unnecessary domains or cause what’s known as false positives. This can actually completely break app/website functions so the initial first few days of running Pi-hole is a lot of white listing :joy:.

Congrats, you’ll be the only one using it. My family doesn’t care to use it.

I just use tailscale

Well done! I’m recently buy pi 5 too, and as project i’m thinking about exactly what you described.

I want to try install OpenVPN to discover my home network, where in home network I can setup security cameras, sensors, ebook library, online cinema and so on

How do you setup your VPN? You choose Full-tunnel, where ALL your traffic goes through your home network, or you choose another type where only things related to home network goes through your VPN?

I can see that it would be the first thing I will do once I get the board.

I recently set up a vpn access point with https://raspap.com. Flashed the SD card with a fresh install of the Lite OS and used the installer. Works like a charm. Now all of my devices, even the “dumb” ones can benefit from my VPN subscription.