0Pricing
Cyber Security Academy · Lesson

How VPNs Work

Encrypt traffic in tunnels.

How VPNs Work is a free Cyber Security Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cyber Security Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

What Is a VPN

A VPN (Virtual Private Network) creates a secure, encrypted connection over an untrusted network like the internet.

It lets remote users safely reach private resources as if they were on the local network.

The Tunnel Concept

A VPN builds a tunnel between two points.

Your data travels inside this protected tunnel, hidden from anyone watching the public network in between.

Encryption Protects Data

Inside the tunnel, traffic is encrypted.

Even if someone intercepts the packets, they see only scrambled data they cannot read without the key.

Encapsulation

VPNs use encapsulation: wrapping your original packet inside a new packet.

The outer packet carries it across the internet; the inner packet is revealed only at the other end of the tunnel.

Authentication

Before a tunnel forms, both sides prove their identity.

  • Passwords or certificates
  • Pre-shared keys
  • Multi-factor authentication

This stops strangers from connecting.

Confidentiality, Integrity, Authenticity

A good VPN provides three guarantees.

  • Confidentiality - data stays private
  • Integrity - data is not altered
  • Authenticity - the other end is who it claims

Remote Access VPN

A remote access VPN connects an individual user's device to a corporate network.

This is how employees work safely from home or while traveling.

Site-to-Site VPN

A site-to-site VPN links two whole networks, such as a head office and a branch.

Users at each site reach the other transparently, without running VPN software on every device.

VPN Clients and Gateways

A remote VPN has two ends.

  • A client app on the user's device
  • A gateway (concentrator) at the network edge

They negotiate keys and maintain the tunnel.

Public Wi-Fi Protection

On open Wi-Fi, others may snoop on your traffic.

A VPN encrypts everything you send, protecting logins and data even on an untrusted hotspot.

What a VPN Does Not Do

A VPN secures the connection, but it is not complete protection.

It does not stop malware, phishing, or attacks against the destination itself. It is one layer among many.

Quick Check

Test your understanding of how VPNs work.

Recap

VPNs work by:

  • Building an encrypted, encapsulated tunnel
  • Authenticating both ends
  • Providing confidentiality, integrity, and authenticity

Remote-access and site-to-site VPNs secure connections but are only one defensive layer.

Frequently asked questions

Is the “How VPNs Work” lesson free?

Yes — the full text of “How VPNs Work” is free to read here on the web, and the Cyber Security Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cyber Security Academy course, upgrade to CoddyKit PRO.

What will I learn in “How VPNs Work”?

Encrypt traffic in tunnels. You practise Cyber Security Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cyber Security Academy?

No prior experience is required. Cyber Security Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “How VPNs Work” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cyber Security Academy lesson?

Yes. Every Cyber Security Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. How VPNs Work
  2. VPN Protocols
  3. Split vs Full Tunnel
  4. Zero Trust Remote Access
← Back to Cyber Security Academy