Interview Prep/Networking/NAT, Firewalls & VPN

Compare IPsec, OpenVPN and WireGuard.

IntermediateConceptNAT, Firewalls & VPN
Answer

IPsec is the industry standard for site-to-site (IKEv2 negotiation, ESP encapsulation), supported by every router and cloud VPN gateway but complex to configure. OpenVPN uses TLS over UDP or TCP, flexible and firewall friendly but user-space and slower. WireGuard is a tiny, kernel-level, UDP-only protocol with modern crypto and simple config of public keys and allowed IPs.

[Interface]
PrivateKey = <key>
Address = 10.100.0.2/32
[Peer]
PublicKey = <peer-key>
Endpoint = vpn.example.com:51820
AllowedIPs = 10.0.0.0/16
All Networking questions Roadmap: Networking for DevOps

More on NAT, Firewalls & VPN