Chapter 8: Problem 30
It is said that IPSEC may not work with Network Address Translation (NAT) (RFC 1631). However, whether IPSEC will work with NAT depends on which mode of IPSEC and NAT we use. Suppose we use true NAT, where only IP addresses are translated (without port translation). Will IPSEC and NAT work in each of the following cases? Explain why or why not. (a) IPSEC uses \(\mathrm{AH}\) transport mode. (b) IPSEC uses \(\mathrm{AH}\) tunnel mode. (c) IPSEC uses ESP transport mode. (d) IPSEC uses ESP tunnel mode. (e) What if we use PAT (Port Address Translation), also known as Network Address/Port Translation (NAPT) in NAT, where in addition to IP addresses, port numbers will be translated to share one IP address from outside the private networ?
Short Answer
Step by step solution
- Understand the Modes
- AH Transport Mode with NAT
- AH Tunnel Mode with NAT
- ESP Transport Mode with NAT
- ESP Tunnel Mode with NAT
- PAT Impact
Key Concepts
These are the key concepts you need to understand to accurately answer the question.
IPSEC Modes
- Transport Mode: In this mode, only the payload or data part of the IP packet is encrypted or authenticated. The original IP header remains unchanged. This is suitable for end-to-end communication between two devices.
- Tunnel Mode: Here, the entire original IP packet is encapsulated within a new IP packet with a new IP header. This is typically used for network-to-network communication, such as between two VPN gateways.
Network Address Translation (NAT)
- True NAT: Translates only IP addresses without altering port numbers. This is straightforward but can run into issues with protocols sensitive to IP changes.
- Port Address Translation (PAT) or Network Address/Port Translation (NAPT): Extends NAT by translating both IP addresses and port numbers. This is often used to allow multiple devices on a local network to share a single public IP address.
Integrity Check
- If data is altered during transit, the hash will not match, indicating potential tampering.
- The Authentication Header (AH) protocol within IPSEC provides this integrity check by including parts of the IP header in the hashing process. This can be problematic if NAT is employed and the IP header is altered.
- Encapsulating Security Payload (ESP) can optionally include a hash for integrity but doesn't normally include IP header data.
Authentication Header (AH)
- AH Transport Mode: The original IP header is included in the hash. If NAT modifies the IP header, the integrity check fails, causing incompatibility.
- AH Tunnel Mode: Encapsulates the original IP packet, leaving the outer IP header to be altered by NAT without affecting the inner header. This allows compatibility with NAT.
Encapsulating Security Payload (ESP)
- ESP Transport Mode: Encrypts only the data, leaving the IP header untouched. This means changes by NAT do not affect the encrypted data, allowing compatibility.
- ESP Tunnel Mode: Encapsulates and encrypts the entire original IP packet within a new IP header. NAT modifies the outer IP header, leaving the inner, encrypted packet intact. This also allows compatibility with NAT.