How VPNs Work

Beginner
6 min read· Technology

A VPN (Virtual Private Network) creates an encrypted tunnel between your device and a VPN server. All your internet traffic is routed through this server — websites see the VPN server's IP address instead of yours, and your ISP sees only encrypted traffic to the VPN server rather than the sites you visit. This provides privacy from your ISP, IP address masking from websites, and security on public WiFi.

Think of a VPN like a private postal courier

Normally, when you send a letter (internet request), the postal service (your ISP) sees the address on the envelope — where you're sending it and who sent it. With a VPN, you give all your letters to a private courier in a sealed box. The courier sends the letters on your behalf — the recipient sees the courier's return address, not yours. The postal service only sees sealed boxes going to the courier. Neither your ISP nor the destination knows the full picture.

Step by Step

1 / 7

Key Concepts

Tunnelling

The technique of encapsulating one network protocol inside another. VPNs wrap your packets inside encrypted outer packets addressed to the VPN server, hiding the real destination from ISPs and network observers.

VPN Protocol

The technical standard that defines how VPN tunnels are established and maintained. Key protocols: WireGuard (fast, modern, 2019), OpenVPN (open-source, reliable), IKEv2/IPSec (fast reconnection on mobile), L2TP/IPSec (older, slower). Avoid PPTP — it's broken.

Kill Switch

A VPN feature that cuts all internet traffic if the VPN connection drops unexpectedly. Without it, your real IP could briefly be exposed before you notice the disconnection. Essential for users whose privacy requirements are critical.

DNS Leak

A misconfiguration where DNS queries (domain name lookups) are sent to your ISP's DNS server instead of through the VPN tunnel. Even though traffic is encrypted, your ISP can see every domain you visit from DNS queries. Good VPNs route DNS through their own servers.

No-Logs Policy

A VPN provider's commitment not to store records of your activity — which sites you visited, when, or what data was transferred. Important because the VPN server does see your decrypted traffic. Look for providers that have been independently audited for their no-logs claims.

Split Tunnelling

A VPN feature allowing you to route some traffic through the VPN and other traffic directly. For example: route banking apps through VPN but stream local content directly for better speed. Gives granular control over which apps use the encrypted tunnel.

IP Leak

When your real IP address is exposed despite using a VPN, typically through WebRTC in browsers (a browser API that reveals local IPs for peer-to-peer communication) or a briefly disconnected VPN. Can be checked with VPN leak test tools.

Key Facts

  • The global VPN market was worth over $45 billion in 2024 and is growing rapidly, driven by remote work, streaming, and privacy concerns.
  • India saw a 671% surge in VPN usage in 2022 after CERT-In mandated VPN providers to store user logs — leading many providers to remove Indian servers entirely.
  • WireGuard, released in 2019, has only ~4,000 lines of code versus OpenVPN's ~70,000 — making it far easier to audit for security vulnerabilities.
  • China's "Great Firewall" blocks most commercial VPN protocols through deep packet inspection (DPI) — detecting VPN traffic patterns and blocking connections.
  • Corporate VPNs were the primary remote work infrastructure before cloud services became dominant — allowing employees to securely access internal company networks.
  • A VPN does NOT make you anonymous. VPN providers can see your traffic, your browser fingerprint still identifies you, and you leave cookies and login sessions that identify you on websites.

Real-World Applications

Remote Work Security

Corporate VPNs let employees securely access internal company systems, databases, and tools from home or travel. The VPN ensures all communication is encrypted and authenticates that the user is authorised to access company resources.

Public WiFi Protection

On hotel, airport, or café WiFi, all unencrypted traffic is visible to the network operator and potential attackers. A VPN encrypts all traffic so even if the WiFi is compromised, your data is secure.

Bypassing Geo-restrictions

Streaming services (Netflix, Disney+, BBC iPlayer) have different content libraries per country due to licensing. A VPN with servers in the target country lets you access that region's content library.

ISP Throttling Prevention

Some ISPs throttle (slow down) certain types of traffic — streaming, torrents, gaming. Since ISPs cannot see what type of traffic is in the VPN tunnel, they cannot selectively slow it. VPNs can help bypass ISP-level throttling.

Circumventing Censorship

In countries that block certain websites or services, a VPN can route traffic through a server in an uncensored country. This is widely used in regions with internet censorship — though adversarial governments invest in detecting and blocking VPN traffic.

Frequently Asked Questions

Does a VPN make you completely anonymous?

No. A VPN hides your IP and encrypts traffic from your ISP, but: (1) the VPN provider can see your traffic, (2) websites can still identify you via browser fingerprinting, cookies, and logins, (3) your DNS queries may leak if the VPN is misconfigured. For strong anonymity, Tor (onion routing) provides much stronger anonymity, but is much slower.

Will a VPN slow down my internet?

Yes, somewhat. Encryption adds CPU processing, and routing through an extra server adds latency. With a good VPN protocol (WireGuard) and a nearby server, the slowdown is typically 5-15%. On mobile networks or slower connections, the impact is more noticeable. For most browsing and streaming it's negligible; for competitive online gaming it may matter.

Is using a VPN illegal in India?

Using a VPN is legal in India for individuals. However, in 2022, CERT-In mandated that VPN providers operating in India must collect and store user logs for 5 years, which prompted several major providers (ExpressVPN, NordVPN, Surfshark) to remove physical servers from India while still offering Indian IP addresses through virtual servers.

What's the difference between a VPN and a proxy?

A proxy routes specific application traffic (usually HTTP) through an intermediary, but typically without encryption. A VPN routes ALL traffic at the OS level through an encrypted tunnel. VPNs are stronger: they cover all apps, provide encryption, and authenticate the tunnel. Proxies are faster and useful for simple IP-changing tasks but offer weaker privacy guarantees.

Related Topics