- Newest
- Most votes
- Most comments
Three additions:
-
The FortiGate logging its own DPD failure doesn't prove loss in both directions. Loss in one direction is enough. If packets from AWS to the FortiGate are lost, AWS gets no reply to its R_U_THERE, and the FortiGate gets no reply to its own because the reply from AWS is lost on the same path. The capture on the FortiGate WAN interface shows which direction is affected.
-
For the FortiGate side, Fortinet's troubleshooting article covers the IKE debug and sniffer commands and has a section on flapping tunnels: https://community.fortinet.com/t5/FortiGate/Troubleshooting-Tip-Troubleshooting-IPsec-site-to-site-tunnel/ta-p/195672
-
If the FortiGate isn't behind a NAT device, Fortinet recommends disabling NAT traversal (FortiOS 6.2 cookbook): https://docs.fortinet.com/document/fortigate/6.2.0/cookbook/31670/ikev2-ipsec-site-to-site-vpn-to-an-aws-vpn-gateway
Related AWS articles:
Yes. Packet loss on the path between the FortiGate and the AWS endpoint can cause these DPD failures, even when every IKE and IPsec setting matches. A setting mismatch would stop the tunnel from coming back. Your tunnel renegotiates straight away, so your settings are consistent with the evidence.
Site-to-Site VPN sends a DPD R_U_THERE message every 10 seconds and declares the peer dead after three messages without a response. Your FortiGate logged its own DPD failure at the same time. This means that DPD packets were lost in both directions, which points to the network path or a device on it.
The nat_t_detected field shows whether NAT-T was detected on the customer gateway. It reads false when the tunnel is down because no IKE security association exists. The change on its own isn't a fault. When it reads true, a NAT device sits in front of the FortiGate, or NAT-T is forced on the FortiGate. IKE and ESP then use UDP port 4500 through that device. If the device drops or rebuilds its UDP mapping, packets are lost in both directions at the same time. Check the following on the NAT device and the FortiGate:
- The public IP address is static and matches the IP address of your customer gateway.
- If you use SD-WAN or policy routes, IKE traffic always leaves through the same WAN interface.
To find the side that stops responding, capture UDP 500 and 4500 on the FortiGate WAN interface during a drop. If the AWS DPD messages arrive and the FortiGate doesn't reply, check the FortiGate itself. Look at IPS rate limits, CPU load and NPU offload. If the AWS messages don't arrive, or the FortiGate's packets leave without a reply, the cause is on the path. In that case, also capture on the NAT device and share the timestamps with your internet service provider.
On the AWS side, use the TunnelState metric to record when each drop starts and how long it lasts. For more information, see Monitor AWS Site-to-Site VPN tunnels using Amazon CloudWatch. Drops at a fixed interval point to a timer, such as a NAT mapping timeout. Random drops point to packet loss on the internet path.
It's a best practice to run both tunnels. AWS applies tunnel endpoint updates to one tunnel at a time, so a connection with both tunnels up loses only redundancy. With a single tunnel, each endpoint update or path problem becomes an outage. If you must use one tunnel, turn on tunnel endpoint lifecycle control so that you can schedule AWS managed updates.
To shorten each outage, set the DPD timeout action to Restart so that AWS starts a new IKE session itself. A longer DPD timeout also tolerates short bursts of loss. For both settings, see Configure tunnel options for AWS Site-to-Site VPN. These settings reduce the effect of the drops, but they don't fix the packet loss.
Related information:
Relevant content
asked 2 years ago
asked 4 years ago
asked 2 years ago
- AWS OFFICIALUpdated a year ago

If my answer was helpful, I would appreciate it if you could mark it as the accepted answer.