VPN Protocols
IPsec, WireGuard, OpenVPN.
VPN Protocols is a free Cyber Security Academy lesson on CoddyKit — lesson 2 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.
Why Protocols Matter
A VPN protocol defines how the tunnel is built, secured, and maintained.
Different protocols balance security, speed, and compatibility differently.
IPsec Overview
IPsec is a long-standing standard that secures traffic at the network layer.
It is widely used for site-to-site VPNs and is supported by most enterprise firewalls and routers.
IPsec Components
IPsec has key parts.
- IKE - negotiates keys and the secure channel
- ESP - encrypts and authenticates the data
- AH - provides integrity (used less often)
IPsec Modes
IPsec runs in two modes.
- Transport mode - protects the packet payload
- Tunnel mode - protects the whole packet, common for VPN gateways
OpenVPN
OpenVPN is a popular open-source protocol that runs over SSL/TLS.
It is flexible, well-audited, and can use common ports, helping it pass through restrictive firewalls.
OpenVPN over TCP or UDP
OpenVPN can run over UDP (faster) or TCP (more reliable through firewalls).
client config:
proto udp
remote vpn.example.com 1194
fallback: proto tcp on port 443WireGuard
WireGuard is a modern, lightweight protocol.
It has a very small codebase, uses up-to-date cryptography, and is known for being fast and simple to configure.
WireGuard Keys
WireGuard uses simple public/private key pairs for each peer.
peer config:
PublicKey = abc123...
AllowedIPs = 10.0.0.2/32
Endpoint = vpn.example.com:51820Older Protocols to Avoid
Some legacy protocols are now insecure.
- PPTP - broken encryption, avoid it
- L2TP alone - no encryption without IPsec
Prefer modern, well-vetted options.
Comparing Protocols
A rough comparison:
- WireGuard - fastest, simplest, modern
- OpenVPN - flexible, firewall-friendly, mature
- IPsec - standard for site-to-site, broad support
Choosing a Protocol
The right choice depends on your needs.
Use IPsec for gateway-to-gateway links, WireGuard for speed and simplicity, and OpenVPN when you must traverse strict networks. Always disable outdated protocols.
Quick Check
Test your knowledge of VPN protocols.
Recap
Key VPN protocols:
- IPsec (IKE/ESP) - standard for site-to-site
- OpenVPN - flexible, TLS-based
- WireGuard - modern, fast, simple
Avoid legacy protocols like PPTP.
Frequently asked questions
Is the “VPN Protocols” lesson free?
Yes — the full text of “VPN Protocols” 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 “VPN Protocols”?
IPsec, WireGuard, OpenVPN. 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 2 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “VPN Protocols” 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.