Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

NAT Traversal

Direct answer

NAT traversal (NAT-T) detects NAT between IPsec peers and wraps ESP in UDP port 4500, because NAT devices cannot translate raw ESP packets. Keepalives hold the NAT mapping open.

When to use this

Use this when IPsec peers sit behind NAT.

First 30 seconds

1. NAT-T encapsulates ESP in UDP 4500 when NAT is detected.

2. Automatic in IKEv2.

3. Keepalives keep NAT mappings.

4. Allow UDP 4500 through firewalls.

5. MTU overhead.

Operational verification

ESP → UDP 4500 encapsulation → through NAT

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common problems
  • UDP 4500 blocked while UDP 500 is allowed.
  • NAT device timing out the UDP mapping between keepalives.
  • Firewall inspecting IPsec passthrough and breaking NAT-T.
  • Remote access clients behind carrier-grade NAT needing IKEv2 with MOBIKE.
Platform / version applicability
Network security
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformNetwork security
Scope / prerequisiteUse this when IPsec peers sit behind NAT.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Checks Verify boundary
  • Both peers must allow UDP 4500 as well as UDP 500.
  • show crypto isakmp sa detail shows nat-t / N when NAT is detected.
  • Keepalives (crypto isakmp nat keepalive 20) keep NAT mappings alive.
  • ESP (protocol 50) will not be seen on the wire when NAT-T is active — all traffic is UDP 4500.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • NAT-T wraps ESP in UDP 4500.
  • Keepalives keep NAT mappings open.
  • Firewalls must allow UDP 4500.
Key checks
  • tcpdump -ni <if> udp port 4500 — NAT-T traffic
  • show crypto ikev2 sa detailed | include NAT — NAT detected
  • Firewall rules for UDP 500/4500 — allowed
ReferenceWhy it matters1 section · depth on demand

How it works

1. IKE starts on UDP 500; both peers send NAT-D payloads with hashes of their addresses and ports.

2. If the hashes do not match, NAT is present and IKE moves to UDP 4500.

3. ESP packets are wrapped in UDP 4500 so NAT/PAT can translate them.

4. NAT keepalives (default every 20 s on IOS) keep the NAT mapping open.

Firewalls on the path must allow UDP 500 and 4500.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docNetwork security current

Authoritative/upstream documentation reviewed for bounded claims in IPsec → NAT Traversal. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc4301 · confidence 94%
Confirmation

Confirm action

Continue?