How to Troubleshoot IPSec VPN connectivity issues

This document is intended to help troubleshoot IPSec VPN connectivity issues. It is divided into two parts, one for each Phase of an IPSec VPN.

Phase 1:

> less mp-log ikemgr.log
> less mp-log ikemgr.log
> show vpn ike-sa gateway > test vpn ike-sa gateway > debug ike stat

Advanced CLI commands:

> debug ike global on debug > less mp-log ikemgr.log
> debug ike pcap on > view-pcap no-dns-lookup yes no-port-lookup yes debug-pcap ikemgr.pcap
> debug ike pcap off  > debug ike global off

Phase 2:

> show vpn ipsec-sa > show vpn ipsec-sa tunnel
> less mp-log ikemgr.log
> less mp-log ikemgr.log
> less mp-log ikemgr.log
> show vpn flow name > show vpn flow name | match bytes
> show vpn flow name | match bytes
> show vpn flow name | match bytes
> test routing fib-lookup virtual-router default ip -------------------------------------------------- runtime route lookup -------------------------------------------------- virtual-router:  default destination:     10.5.1.1 result:          interface tunnel.1 > show routing route > test vpn ipsec-sa tunnel
> debug ike global on debug > less mp-log ikemgr.log > debug ike pcap on > view-pcap no-dns-lookup yes no-port-lookup yes debug-pcap ikemgr.pcap > debug ike pcap off > debug ike global off

If tunnels are up but traffic is not passing through the tunnel:

Test Your IPSec VPN Troubleshooting Knowledge

1. When starting to troubleshoot IPSec VPN Phase 1 issues, what is a recommended initial step to rule out ISP-related problems, assuming the peer allows it?

2. If you suspect an incorrect preshared key or proposal mismatch during Phase 1, where can you primarily find relevant logs on a Palo Alto Networks firewall?

3. Which CLI command is used to turn on detailed (debug level) logging for IKE negotiations in Phase 1?

4. How can you determine if NAT Traversal (NAT-T) is being used in an IPSec VPN connection according to the document?

5. In Phase 2 troubleshooting, what is a key indicator that the firewalls are successfully negotiating the tunnels?

6. According to the provided text, when is configuring Proxy-IDs particularly important for ensuring a successful Phase 2 negotiation?

7. When using show vpn flow name | match bytes, what does it imply if encapsulation bytes are increasing but decapsulation bytes are constant?

8. If both IPSec VPN Phase 1 and Phase 2 appear to be up, but data traffic is not passing through the tunnel, what are the primary areas to investigate first?

9. Why might an upstream device performing Port and Address Translation (PAT) face issues with ESP packets, potentially dropping them?

10. Which CLI command is frequently referenced in the document for examining logs in ikemgr.log to diagnose various Phase 1 and Phase 2 issues like proposal or preshared key mismatches?