How many IPsec modes are there?
IPsec (Internet Protocol Security) primarily operates in two modes: Transport mode and Tunnel mode.
Transport mode: Encrypts only the payload of each packet, leaving the header untouched. This mode is typically used for end-to-end communication between two systems.
Tunnel mode: Encrypts both the payload and the header of each IP packet, which is then encapsulated into a new IP packet with a new header. Tunnel mode is often used for network-to-network communications (e.g., between two gateways) or between a remote client and a gateway.
Reference
'Security Architecture for the Internet Protocol,' RFC 4301.
'IPsec Modes of Operation,' by Internet Engineering Task Force (IETF).