Core issue
These are a few of the common reasons why a VPN tunnel does not come up or fails to pass traffic on a PIX Firewall,Concentrator, ASA or router:
Resolution
In order to isolate and resolve these issues, review this checklist:
- Make sure crypto map is applied to the outside interface, the interface that faces the Internet.
- Match the access-lists with peers and make sure these do not overlap with the ACLs of any other tunnels that exist.
- Match the ISAKMP policies on peers. Both end devices must have similar ISAKMP policies.
If the show crypto isakmp sa command shows MM_KEY_EXCH in the output, refer to The user receives the ISAKMP (0:xxx): deleting SA reason gen_ipsec_isakmp_delete but doi isakmp state (I) MM_KEY_EXCH (peer x.x.x.x) input queue 0 message
- If the ISP has changed the IP address of the remote peer, refer to The VPN tunnel fails to come up on the PIX Firewall after the ISP changes the IP address for the remote device
- While you troubleshoot, it is always good practice to reapply crypto map on the outside interface and to clear older Security Associations with the use of the clear crypto sa command on the router and the clear isakmp sa command on the PIX Firewall. But, these commands bring down other tunnels and Security Associations are cleared for tunnels that exist.
- On the PIX Firewall, always create and bind separate access-lists to NAT 0 and crypto map. NAT 0 and crypto ACLs should be identical but with a different sequence number.
Make sure that interesting traffic should be DENIED first in order to correct the NAT bypass order on routers, and the PERMIT statement should come in last. For example:
Bad Configuration
ip access-list extended nonat
deny ip 192.168.15.0 0.0.0.255 10.1.2.0 0.0.0.255
permit ip 192.168.15.0 0.0.0.255 any
deny ip 192.168.15.0 0.0.0.255 192.168.16.0 0.0.0.255
Good Configuration
ip access-list extended nonat
deny ip 192.168.15.0 0.0.0.255 10.1.2.0 0.0.0.255
deny ip 192.168.15.0 0.0.0.255 192.168.16.0 0.0.0.255
permit ip 192.168.15.0 0.0.0.255 any
If PIX, ASA or Router is configured for LAN-to-LAN and VPN client access, make sure that dynamic crypto map comes in the last. For example, according to this configuration, LAN-to-LAN tunnel for peer 2.2.2.2 fails to come up, as PIX stops to look for actual peer once it hits dynamic crypto map according to sequence number. It is always a good idea to assign highest sequence number to dynamic maps, for example, 65535.
BAD configuration
crypto ipsec transform-set myset esp-3des esp-md5-hmac
crypto dynamic-map dynmap 30 set transform-set myset
crypto map newmap 20 ipsec-isakmp dynamic dynmap
crypto map newmap 30 ipsec-isakmp
crypto map newmap 30 match address 120
crypto map newmap 30 set peer 2.2.2.2
crypto map newmap 30 set transform-set myset
crypto map newmap interface outside
Good configuration
crypto ipsec transform-set myset esp-3des esp-md5-hmac
crypto dynamic-map dynmap 30 set transform-set myset
crypto map newmap 30 ipsec-isakmp
crypto map newmap 30 match address 120
crypto map newmap 30 set peer 2.2.2.2
crypto map newmap 30 set transform-set myset
crypto map newmap 65535 ipsec-isakmp dynamic dynmap
crypto map newmap interface outside
Refer to IP Security Troubleshooting - Understanding and Using debug Commands for more information and to resolve common VPN related issues that use debug commands.