| Description | This article describes how to troubleshoot the ESP packet loss and provides possible solutions for this issue. |
| Scope | FortiOS. |
| Solution |
To identify if the ESP packets are sent and received, a sniffer can be used. The commands below will capture the ESP packets:
If NAT traversal is not in use, ESP packets are filtered using protocol 50:
diagnose sniffer packet any "proto 50" 6 0 l
Or:
diagnose sniffer packet any "host x.x.x.x and esp" 6 0 l <----- Where x.x.x.x is the IP address of the remote peer.
If NAT traversal is in use, ESP will be over UDP port 4500:
diagnose sniffer packet any "host x.x.x.x and port 4500" 6 0 l
The Encryption/Decryption can be verified on the tunnel level with the command:
diagnose vpn tunnel list name <phase1-name>
name=Primary Tunnel ver=1 serial=2 10.10.1.1:0->10.10.1.2:0 tun_id=10.10.1.2 dst_mtu=1500 dpd-link=on remote_location=0.0.0.0 weight=1
NPU Offload: In case the drops are caused by the NPU, disable the offloading under phase 1.
config vpn ipsec phase1-interface
If the issue goes away after disabling offloading, esp padding might be the cause. To ensure ESP packets are not dropped due to excessive layer 2 padding, the following change should be performed:
config system npu
The offloading under phase 1 can be enabled again and the behaviour.
Firewall Policies: In cases, firewall policies are a requirement, such as when the tunnel is configured on a loopback, and FortiGate is not the initiator.
diagnose debug enable
ISP Check: Verify with ISPs that ESP packets are not being blocked on the WAN. NAT transversal can be used to change the port from 500 to 4500 even when NAT is not used. This will help in case packets in port 500 are dropped by the ISP.
config vpn ipsec phase1-interface
Related documents: |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.