Comprehensive Troubleshooting Guide for IPsec Tunnel Issues
10043
Created On 04/11/25 20:49 PM - Last Modified 05/16/25 16:42 PM
Objective
-
Ensure the successful establishment of the IPsec tunnel
-
Maintain tunnel stability and uptime
-
Verify bidirectional traffic flow through the tunnel
Environment
- NGFW
- IPsec tunnel
Procedure
- Initial Checks
- Verify the IPsec Tunnel Configuration: Ensure that the IKE Gateway, IPsec Tunnel, and the corresponding security policies and routes are correctly configured on both ends.
- Confirm that Phase 1 (IKE SA) is established. Use the CLI command:
> show vpn ike-sa
- Confirm that Phase 2 (IPsec SA) is established. Use the CLI command:
> show vpn ipsec-sa
- Check Peer IP Reachability: Use the ping or traceroute to validate connectivity between the two Gateways' IPs of the IPsec tunnel.
- Common Issues and Root Causes
- Tunnel Fails to Establish (Tunnel Down)
- Incorrect or mismatching of pre-shared (PFS) Key. Refer to Pre-shared Key Mismatch.
- Mismatched IKE or IPsec parameters (encryption, authentication, DH group, lifetime).
- Incorrect local/peer identification.
- Firewall blocking IKE or ESP traffic. Verify that firewalls on the path allow IPSec traffic (UDP port 500 for IKE, UDP port 4500 for NAT-T, and ESP protocol number 50).
- Interface binding or routing issues.
- NAT-T not enabled when required: If your IPsec tunnel is configured between two PAN-FW and there's a NAT device in between, make sure to enable NAT Traversal (NAT-T) on both sides of the tunnel, then check IPSec VPN Tunnel with NAT Traversal. If your IPsec tunnel is configured between PAN-FW and Cisco ASA and there's a NAT device in between, then make sure to enable NAT-T, but also that the Cisco ASA has the NAT-T port 4500/udp open.
- Tunnel Established, But No Traffic Passes
- Incorrect or missing proxy-ID configuration.
- Incorrect security policies (missing or too restrictive).
- Incorrect routing entries (static or dynamic).
- Replay protection dropping packets. Check if the zone protection profile is applied to the zone of the outer interface of the tunnel of both firewalls under Network > Zone , and if that is the case, if the packet-based attack protection with Strict IP Address is checked for that zone profile under Network > Network Profiles > Zone Protection. In that case, test disabling that check and committing that change to see if that fixes the problem.
- MTU mismatch or fragmentation issues. MTU (Maximum Transmission Unit) issues can cause packet fragmentation problems. Adjust the MTU size if needed.
- NAT-T issues.
- Session not being created. Use the CLI command:
> show session all
- Traffic Flows in Only One Direction
- Asymmetric routing.
- Missing return route or reverse security policy.
- Firewall or upstream device dropping return packets.
- Incomplete session setup.
- NAT devices modify only one direction of traffic.
- Tunnel Fails to Establish (Tunnel Down)
- CLI Commands, Logs, & Packet Capture
- Troubleshooting Site-to-Site VPN using CLI.
- IPsec tunnel logs can be found in IKE manager logs. Use the CLI:
less mp-log ikemgr.log
or the system log. Use the UI Monitor > Logs >System or the CLI:
show log system direction equal backward
- Perform a packet capture: To capture traffic for IPsec VPN negotiation and NAT Traversal, you can collect packet captures specifically for UDP port 500 (used by IKE) and UDP port 4500 (used by NAT-T), as well as ESP protocol (50). Set filters using UI or CLI commands:
debug dataplane packet-diag set filter match source <Gateway Local IP> destination <Gateway Peer IP> destination-port 500 protocol 17 debug dataplane packet-diag set filter match source <Gateway Peer IP> destination <Gateway Local IP> destination-port 500 protocol 17 debug dataplane packet-diag set filter match source <Gateway Local IP> destination <Gateway Peer IP> protocol 50 debug dataplane packet-diag set filter match source <Gateway Peer IP> destination <Gateway Local IP> protocol 50
Replace 500 with 4500 when NAT-T is enabled.
Refer to the Packet Capture document to complete the rest of the settings and perform the packet capture.
-
For more information about how to troubleshoot an IPsec tunnel, refer to:
-
-
How to troubleshoot IPSec VPN Tunnel Down for IKEv2 IPSec tunnel.
-
IKEv1 VPN error logs - Troubleshooting for IKEv1 IPSec tunnel.
-
How to Troubleshoot IPSec VPN connectivity issues for general IPSec tunnel troubleshooting.
- How to troubleshoot traffic flowing in only one direction through IPsec tunnel.
-