VPN tunneling is the technique of wrapping your internet traffic in an encrypted envelope ("tunnel") between your device and a VPN server. The outside network sees only the encrypted envelope, not its contents.
The metaphor
Imagine your normal internet traffic as postcards — anyone along the route can read them. A VPN tunnel is like putting those postcards inside sealed armored envelopes before they leave your house. To anyone watching the network, only the armored envelopes are visible. The contents are sealed and routed to a specific destination (the VPN server) before being unwrapped and sent on to their real destinations.
The metaphor of a "tunnel" captures the idea that the original traffic is hidden during transit. There's no physical tunnel, but the encrypted wrapping makes the traffic effectively invisible to anyone outside the tunnel.
How it actually works
Three things happen when you connect to a VPN:
- Your device negotiates session keys with the VPN server using a key-exchange protocol (Diffie-Hellman or equivalent).
- Every packet leaving your device is wrapped in an outer layer that's encrypted using those session keys and addressed to the VPN server.
- The VPN server receives the wrapped packet, decrypts it, and forwards the inner packet to wherever it was originally destined.
The protocols that implement this (WireGuard, OpenVPN, IKEv2/IPsec) differ in their cryptography and packet formats, but the core concept is the same.
What it protects, what it doesn't
Protects:
- The contents of your traffic from observers on your local network and ISP.
- The destinations of your traffic from same observers.
- Your real IP address from the websites you visit.
Doesn't protect:
- What happens at the tunnel's exit (the VPN provider sees your destinations).
- What happens at the endpoints (your device, the destination server).
- Application-layer identification (logged-in accounts, cookies, fingerprints).
Tunneling protocols
The major protocols in use today:
- WireGuard — modern, fast, simple.
- OpenVPN — older, more configurable, slower.
- IKEv2/IPsec — Microsoft + Cisco joint design, common on iOS.