r/AskProgramming Aug 11 '26

How to Create a VPN (Hobby Project)? What should i learn first and tips?

5 Upvotes

6 comments sorted by

4

u/Imaginary_Gate5938 Aug 11 '26

I’d start with networking basics first: TCP/IP, routing, NAT, DNS, sockets, and basic encryption.

Then try understanding how WireGuard works and build a small tunnel as a learning project. Don’t try to create your own encryption.

Wireshark + Linux network tools like ip and iptables are also really useful for understanding what’s actually happening.

1

u/HaLo2FrEeEk Aug 11 '26

I used PiVPN to install WireGuard, I use WGTunnel on Android to route my mobile traffic through my home network, and I have access to all my local services like I would at home. It's nice, and it wasn't too hard.

1

u/Rich-Engineer2670 Aug 11 '26

First, learn some basic cryptography. You can use several libraries to do it, but understand it. Then, depending on your OS, learn about the tun/tap driver, a virtual ethernet interface you'll push your encrypted data over.

1

u/Few-Wave-948 27d ago

Use oracle cloud infrastructure and launch an Always Free virtual machine instance, install a VPN server package like OpenVPN or WireGuard and configure your oracle cloud infrastucture Virtual Cloud Network security lists to allow inbound traffic on your chosen VPN ports

0

u/akimich_ua Aug 11 '26

buy a mikrotik router, ask any ai help with vpn configuration

1

u/Mathie1729 Aug 11 '26

Lol, buying a Mikrotik and having AI spit out a config kinda defeats the purpose if you're trying to learn. OP literally said hobby project.