Octet

What is NAT exemption for a VPN, and what happens if you forget it?

Show the answer

Say this first

On IOS and most firewalls, outbound NAT happens before the packet is checked against the VPN policy. If LAN-to-LAN traffic is translated to the public address first, it no longer matches the crypto ACL or proxy ID and leaves unencrypted, where it is lost. NAT exemption is a rule that says traffic from my LAN to the remote LAN is not translated. Forget it on one side and you get a tunnel that is up with traffic flowing in one direction only.

Go deeper

IOS

Cisco IOS
ip access-list extended NAT-ACL
 10 deny   ip 10.1.0.0 0.0.0.255 10.2.0.0 0.0.0.255
 20 permit ip 10.1.0.0 0.0.0.255 any
ip nat inside source list NAT-ACL interface GigabitEthernet0/0/0 overload

The deny line must come before the permit. A standard ACL cannot do this because it cannot match on destination.

Why a VTI mostly avoids it

With a VTI, VPN traffic exits through Tunnel0. Tunnel0 is not an ip nat outside interface, so the PAT rule on Gi0/0/0 never applies to it.

The symptom

Routerencapsdecaps
Side with exemptionrising0
Side without exemption0rising

show ip nat translations on the broken side shows entries whose outside address is in the remote LAN.

Firewalls

On a Cisco ASA it is identity NAT, for example nat (inside,outside) source static LAN LAN destination static REMOTE REMOTE no-proxy-arp route-lookup. On zone-based firewalls with route-based tunnels, putting the tunnel interface in its own zone keeps the internet source NAT rule from matching.

Traps

  • Putting the deny line after the permit line. ACLs are read top down, so it never matches.
How did you do?Book 8.5 Example Systems