Networking - VPN (Virtual Private Network)

What is a VPN?

A VPN (Virtual Private Network) creates a secure, encrypted connection (a “tunnel”) between your device and another network over the internet.

It makes your traffic private, secure, and appear as if it’s coming from another location.


Why VPN is Used

  1. Privacy – Hides your IP address and browsing activity from ISPs, hackers, or public Wi-Fi snoopers.

  2. Security – Encrypts data so even if someone intercepts it, they can’t read it.

  3. Remote Access – Lets employees securely connect to a company’s internal network from anywhere.

  4. Bypass Restrictions – Access region-blocked content or websites.


How a VPN Works

  1. You connect to a VPN server (run by your company or a VPN provider).

  2. A VPN tunnel is created using encryption protocols.

  3. Your data (websites, files, apps) travels securely through this tunnel.

  4. To the outside world, your traffic looks like it’s coming from the VPN server’s IP, not your real one.


Example

  • Without VPN:

    • Your laptop (192.168.1.10) → ISP → Website sees your public IP (say, 203.0.113.5).

  • With VPN:

    • Your laptop → Encrypted tunnel → VPN server (in another country, e.g., UK) → Website sees VPN server’s IP (say, 145.20.30.40).


Types of VPN

  1. Remote Access VPN

    • For individuals connecting to a private network from home/public Wi-Fi.

    • Example: Employee connecting to company resources.

  2. Site-to-Site VPN

    • Connects two networks securely over the internet.

    • Example: Company HQ network ↔ Branch office network.


VPN Protocols (How Tunnels are Built)

  • IPSec – Common for site-to-site, secure but complex.

  • SSL/TLS – Used by many modern remote-access VPNs.

  • L2TP/IPSec – Layer 2 tunneling, often combined with IPSec.

  • OpenVPN – Open-source, widely used, secure.

  • WireGuard – Newer, lightweight, faster protocol.


Benefits

  • Protects against eavesdropping.

  • Helps in remote working.

  • Can bypass censorship.

Limitations

  • Can slow down internet speed (encryption overhead).

  • VPN provider must be trusted (they could see your traffic if not a corporate VPN).

  • Some services block VPN IPs.


In short: A VPN is like sending mail inside a locked, unbreakable box.
Even if someone intercepts the box, they can’t open it without the key.