Packet.School
HomeLevelsSandboxFreeAbout
XP0
L5 · Advanced Topics
Level 5
6 lessons
  • 01Subnetting Basics
  • 02Subnet Calculation
  • 03What is NAT?
  • 04VPN
  • 05Terminal Commands
  • 06Final Quiz
Levels/L5 · Advanced Topics/Lesson 04
Lesson · 04

VPN

A VPN builds an encrypted, private tunnel over an untrusted network like the internet. The name is the definition: virtual (no physical line), private (encrypted), network (it connects two ends).

Duration
3min
Level
L5
Type
Lesson
Progress
4/ 6
code
[Your PC] ══════════════════════════ [Company network]
             Encrypted tunnel (VPN)
             across the internet

01What is a VPN used for?

1. Remote access

code
Home worker → VPN → company network

A computer at home reaches internal resources as if it were inside the office.

2. Site-to-site

code
Branch A → VPN tunnel → headquarters

Two offices talk as if a leased line ran between them.

3. Privacy

code
You → VPN server → internet

Sites you visit see the VPN server's IP, not yours.

4. Bypassing geo-restrictions

code
Home → US VPN → US catalog

Traffic appears to originate from another country.

02VPN protocols

ProtocolSecuritySpeedUse
WireGuardHighVery highNext generation, the modern pick
OpenVPNHighMediumMost common, battle-tested
IPSecHighMediumEnterprise site-to-site
L2TP/IPSecMediumLowLegacy systems
PPTPLowHighBroken — never use it!

03How does a VPN work?

1. Authentication

code
Client → username/password or certificate → VPN server

2. Tunnel setup

The original packet is encrypted and placed inside a new packet:

code
Original:
[IP Header][TCP][Data]
        ↓ encrypt and wrap
VPN packet:
[New IP][VPN Header][ encrypted(IP+TCP+Data) ]

Routers along the way only see the outer envelope; they can't read the contents. It's the Level 2 encapsulation idea — with encryption.

3. Data flow

code
Encrypted data → internet → VPN server → decrypted → onward to target

04VPN types

Remote AccessSite-to-Site
ConnectsOne user to a networkTwo networks to each other
Typical scenarioWorking from homeBetween branches
Common techSSL VPN, WireGuardIPSec

05Split tunneling

Full tunnel: all traffic goes through the VPN — secure, but slower and heavy on the server.

Split tunnel: only company traffic enters the VPN; YouTube goes direct — fast, but possibly against company policy.

06What a VPN does and doesn't give you

It provides:

  • Encryption — nobody on the path can read your data
  • Authentication — both ends of the tunnel are verified
  • IP masking — target sites don't see your real IP

It does not provide:

  • Anonymity — the VPN provider can see your traffic
  • Malware protection — viruses travel through encrypted tunnels just fine
  • Legal invisibility — the provider may be keeping logs

07Summary

  • VPN = an encrypted tunnel over an untrusted network
  • Remote access and site-to-site are the two big scenarios
  • Modern picks: WireGuard or OpenVPN; stay away from PPTP
  • It gives encryption, it does not promise anonymity
Previous
What is NAT?
Next
Terminal Commands
On this page
  • What is a VPN used for?
  • VPN protocols
  • How does a VPN work?
  • VPN types
  • Split tunneling
  • What a VPN does and doesn't give you
  • Summary
Packet.School

An open, interactive curriculum for computer networking.

v3.0 · MIT22 lessons live

Learn

  • Lessons
  • Sandbox
  • Levels
  • Free
  • About

Simulations

  • Packet Journey
  • DNS Lookup
  • DHCP Simulator
  • Subnet Calc
  • Network Builder
  • Terminal

Project

  • About
  • Changelog
  • GitHub
  • Contributing
  • Style guide

Newsletter

One short email when a new level ships. No tracking pixels.

© 2026 Packet.School — MIT licensedSupport with a coffeebuilt in the open