IPsec
also: IP Security, ESP, AH, IKE
IPsec is a suite of protocols that encrypts and authenticates IP packets, providing secure communication at the network layer for end-to-end protection of data traveling across IP networks.
IPsec (Internet Protocol Security) operates at Layer 3 (the network layer) to secure IP traffic by encrypting payload data and verifying packet authenticity. It works transparently to applications and can protect all traffic between hosts, subnets, or gateways without requiring changes to application code.
IPsec consists of two main protocols: ESP (Encapsulating Security Payload) for encryption and integrity, and AH (Authentication Header) for authentication only. It also uses IKE (Internet Key Exchange) to negotiate and manage encryption keys between peers.
Common Linux use cases include site-to-site VPNs (connecting entire networks), remote access VPNs (individual users), and securing traffic between data centers. For example, you might configure IPsec on a Linux gateway to encrypt all traffic flowing to a remote office, protecting it at the packet level regardless of whether individual applications support encryption.