A VPN (virtual private network) wraps everything your device sends in an encrypted tunnel to a server you choose, so the network in between sees scrambled data going to one place instead of your browsing.
It is useful on untrusted Wi-Fi and for reaching private networks from far away, but it moves trust rather than removing the need for it.
What the network can see without one
When you load a page, your request passes through several hands before it reaches the website: the Wi-Fi access point, whoever runs that network, your internet service provider (ISP) and the networks between them. Each of them handles your packets, so each of them can look at them.
HTTPS already encrypts the content of most web traffic, so on a modern site an onlooker can't read your messages or passwords. They can still see a lot:
- the IP addresses you connect to, and so which services you use;
- usually the website names too, from DNS lookups and the name your browser sends when it opens a secure connection;
- when you are online, and how much data you move;
- everything, in full, for any app or site that still uses plain HTTP.
On your home network that may be fine. On a café's or hotel's Wi-Fi, you don't know who runs it or who else is connected.
How the tunnel works
A VPN has two ends: a client on your device and a VPN server somewhere else. When the VPN is on, the client takes every packet your device is about to send, encrypts it, and puts it inside a new packet addressed to the VPN server. This is called encapsulation: the original packet, with its real destination, becomes the hidden payload of an outer packet.
The local network only ever sees the outer packets. They all go to the same address, the VPN server, and their contents are unreadable. The server unwraps each one, decrypts it and sends the original request on to the real destination. Replies take the same path in reverse.
Here is one request making that round trip from a café:
One request through a VPN tunnel from café Wi-Fi
Step 1 of 7: Your device encrypts the request and wraps it in a packet addressed to the VPN server.
Wondering how this was made? How we make these