VPN: Tunnels and Encryption
A VPN (Virtual Private Network) builds an encrypted tunnel between two endpoints — over a public network like the internet.
How it works
Data is encrypted before sending and wrapped in a tunnel protocol. The remote endpoint decrypts and forwards it to the target network. Outsiders only see the tunnel, not the content.
Protocols
- WireGuard: modern, fast, minimal (kernel-integrated, ~4000 lines of code).
- OpenVPN: established, flexible, runs on UDP/TCP 443.
- IPsec: standard for site-to-site and mobile access (IKEv2).
Use cases
- Remote work: secure access to internal systems.
- Site-to-site: connect branch offices.
- Privacy: securing public Wi-Fi.
Pitfalls
A VPN is not anonymization per se — the VPN provider sees your traffic. Split tunneling routes only specific networks through the tunnel and saves bandwidth.
See also: Networking.