IPsec, IKE and WireGuard concepts
Separate negotiation from data protection
IPsec is a security architecture at the IP layer. A security policy decides which traffic is protected, discarded or allowed without IPsec. A security association (SA) holds parameters for protecting traffic in one direction. ESP can provide confidentiality, integrity and origin authentication according to the selected protection; use approved authenticated encryption for new designs. Anti-replay protection detects repeated authenticated packets when enabled. AH is a separate IPsec protocol that does not encrypt data.
IKEv2 and two ESP modes
IKEv2 authenticates peers and establishes an IKE SA for protected control exchanges; it negotiates Child SAs to protect data traffic and can renew keys. Traffic selectors define which traffic those Child SAs cover. In tunnel mode a new outer IP header carries the protected original IP packet; in transport mode ESP protects the next-layer content while retaining the original IP header (with placement details depending on IP version). Gateways often use tunnel mode; host-to-host connections can use transport mode. IKE is not the protocol that carries ordinary protected application packets.
GRE: [outer IP][GRE][inner IP packet]ESP tunnel:[outer IP][ESP header][protected inner IP + trailer][tag]ESP transport: [original IP][ESP header][protected transport + trailer][tag]Compare three approaches
WireGuard uses UDP and peer public keys with a handshake that derives short-lived session keys. Its allowed-IP mapping ties peer identity to permitted inner addresses and outbound peer selection; operating-system routes and firewall policy still matter. It does not negotiate IKE SAs. TLS-based remote-access products use TLS to protect sessions; some expose specific applications while others carry network traffic. Certificate or peer identity verification is essential. Product features, management and authentication flows differ.
Example: two different requirements
A branch office needs protected IP connectivity to a headquarters subnet; a gateway-to-gateway IPsec design or a managed WireGuard design could satisfy that requirement if both ends support it. A contractor needs only a single internal application; a scoped TLS-based application access product may fit better than whole-network access. Compare identity lifecycle, key revocation, interoperability, measured throughput and audit requirements before choosing. Never publish private keys or disable peer validation to make a connection work.
Practice: read the status evidence
A fictional IKE status reports an authenticated IKE SA but no Child SA. Identify which part has succeeded and which evidence is still missing. A WireGuard handshake timestamp is also insufficient to prove that a particular application works: check peer identity, authorized addresses, both routes and application policy.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
IPsec, IKE and WireGuard concepts — knowledge check
Apply VPN concepts to fictional offline scenarios.
What does IKEv2 negotiate for ordinary IPsec protected data?
What does ESP tunnel mode protect when encryption and integrity are selected?
Which identity mechanism is central to WireGuard peers?
An authenticated IKE SA exists but no Child SA does. What is missing?
A contractor needs one application only. Which is a reasonable scoped option?