Tunneling and Encryption Protocols
Meet IPsec, SSL/TLS, and how they secure remote links.
Tunneling and Encryption Protocols is a free Network+ Academy lesson on CoddyKit — lesson 3 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 Network+ Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Protocols Behind the Tunnel
A VPN tunnel is built by specific protocols that define how traffic is encapsulated, encrypted, and authenticated. Different protocols suit different needs, balancing security, speed, and compatibility.
The two giants of VPN technology are IPsec and SSL/TLS. Understanding their roles helps you recognize how nearly every VPN you meet is actually built.
IPsec Overview
IPsec (Internet Protocol Security) is a suite of protocols that secures traffic at the network layer (Layer 3). It can encrypt and authenticate every packet between two endpoints, and is the backbone of most site-to-site VPNs.
Because it works at Layer 3, IPsec protects all traffic transparently, regardless of the application sending it, which makes it ideal for connecting whole networks.
IPsec Components
IPsec uses several pieces:
- AH (Authentication Header): provides integrity and authentication but no encryption.
- ESP (Encapsulating Security Payload): provides encryption plus integrity, the part most used.
- IKE (Internet Key Exchange): negotiates keys and sets up the secure association.
ESP with IKE is the common combination that delivers full confidentiality and integrity.
Transport vs Tunnel Mode
IPsec runs in two modes. Transport mode encrypts only the packet payload, leaving the original IP header, used for host-to-host links. Tunnel mode encrypts the entire original packet and wraps it in a new one.
Tunnel mode is what site-to-site VPNs use, since it hides the internal addressing and protects the complete original packet between the two gateways.
SSL/TLS VPNs
SSL/TLS (Secure Sockets Layer / Transport Layer Security) VPNs secure traffic at a higher layer and often work right inside a web browser or a lightweight client. TLS is the same protocol that secures HTTPS websites.
SSL VPNs are popular for client remote access because they are easy to deploy, work through firewalls and NAT readily, and may need no special software beyond a browser.
IPsec vs SSL/TLS
The two excel at different jobs:
- IPsec: great for site-to-site and full-network access, but can struggle with NAT and firewalls and needs more configuration.
- SSL/TLS: great for client access to specific apps, browser-friendly, firewall-friendly.
Many organizations use IPsec between offices and SSL/TLS for remote users.
Modern VPN Protocols
Newer protocols improve on the classics. WireGuard is a modern, fast, lightweight protocol with a small codebase that is easier to audit and very efficient.
OpenVPN is a flexible, widely used open-source option built on TLS. IKEv2/IPsec is favored on mobile devices because it reconnects quickly when the network changes, such as switching from Wi-Fi to cellular.
Legacy Protocols to Avoid
Some older VPN protocols are now insecure and should not be used. PPTP (Point-to-Point Tunneling Protocol) has known weaknesses and broken encryption. Plain L2TP (Layer 2 Tunneling Protocol) has no encryption on its own and must be paired with IPsec.
Recognizing outdated protocols matters: using them gives a false sense of security while leaving traffic exposed.
Keys and Cryptography
All these protocols rely on cryptography. They use symmetric encryption (one shared key) for bulk data because it is fast, and asymmetric encryption (key pairs) plus key-exchange algorithms to safely agree on that shared key.
Strong, modern ciphers and proper key exchange are what make a tunnel truly secure; weak or outdated cryptography undermines even a well-designed VPN.
A Tunnel Config Glimpse
VPN configuration centers on the endpoints, keys, and allowed traffic. This simplified snippet shows the kind of settings a WireGuard peer uses.
[Peer]
PublicKey = <remote-public-key>
Endpoint = vpn.example.com:51820
AllowedIPs = 10.0.0.0/24Bringing It Together
IPsec secures traffic at Layer 3 using ESP and IKE, with tunnel mode for site-to-site links. SSL/TLS VPNs secure client access and are browser- and firewall-friendly. Modern options like WireGuard, OpenVPN, and IKEv2 improve speed and mobility, while legacy PPTP should be avoided.
Quick Check
Test your VPN protocol knowledge.
Recap
IPsec secures traffic at the network layer with AH, ESP, and IKE, using tunnel mode for site-to-site VPNs. SSL/TLS VPNs suit browser-based client access. Modern protocols include WireGuard, OpenVPN, and IKEv2, while insecure legacy options like PPTP should be retired.
Frequently asked questions
Is the “Tunneling and Encryption Protocols” lesson free?
Yes — the full text of “Tunneling and Encryption Protocols” is free to read here on the web, and the Network+ 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 Network+ Academy course, upgrade to CoddyKit PRO.
What will I learn in “Tunneling and Encryption Protocols”?
Meet IPsec, SSL/TLS, and how they secure remote links. You practise Network+ 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 Network+ Academy?
No prior experience is required. Network+ Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Tunneling and Encryption 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 Network+ Academy lesson?
Yes. Every Network+ 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
- What a VPN Tunnel Provides
- Site-to-Site vs Client VPNs
- Tunneling and Encryption Protocols
- Secure Remote Access Methods