Troubleshoot tunnel health·续

Solution

Disable anti-replay protection on your router:

For most routers:

Locate the anti-replay or replay protection setting in your IPsec configuration and disable it.

If you can only set a replay window size:

Set the replay window to 0 to effectively disable the check.

For devices that do not support disabling anti-replay:

Enable replay protection in the Cloudflare dashboard. This routes all tunnel traffic through a single server, maintaining proper sequence numbers at the cost of losing anycast benefits.

  1. Go to the Connectors page. Go to Connectors ↗
  2. In IPsec/GRE tunnels, select Edit on your IPsec tunnel.
  3. Enable Replay protection.
  4. Select Update tunnel.

For Cisco IOS/IOS-XE routers experiencing "invalid SPI" errors:

Enable ISAKMP invalid SPI recovery to help the router resynchronize Security Associations:

configure terminal
crypto isakmp invalid-spi-recovery
exit

Caution

Enabling replay protection in Cloudflare reduces the performance and resilience benefits of the anycast architecture. Only use this option when your device does not support disabling anti-replay protection.

For a detailed explanation of why this setting is necessary, refer to Anti-replay protection.


Tunnel degraded after rekey events

Symptoms

  • Tunnel health drops to Degraded or Down periodically
  • Issues coincide with IPsec rekey intervals (typically every few hours)
  • Tunnel recovers automatically after 1-3 minutes
  • Router logs show successful rekey completion

Cause

When your tunnel endpoint initiates an IPsec rekey, new Security Associations (SAs) must propagate across Cloudflare's network. Rekey propagation delays have been significantly reduced and are uncommon in most deployments. However, brief tunnel degradation during rekeys can still occur in some configurations.

Cloudflare never initiates rekey — only responds. All rekey attempts must come from your tunnel endpoint. If your device receives a TEMPORARY_FAILURE response during rekey, it must re-establish the IKE session to recover.

Solution

This behavior is expected and the tunnel will automatically recover. To minimize impact:

  1. Configure Dead Peer Detection (DPD) with restart: Set your tunnel endpoint's DPD action to "restart" so it automatically re-establishes the IKE session if a rekey fails with TEMPORARY_FAILURE. Without DPD restart, the device can get stuck in a loop of failed rekeys.
  2. Increase rekey intervals: Configure longer SA lifetimes on your tunnel endpoint to reduce rekey frequency. Common values are 8-24 hours for IKE SA and 1-8 hours for IPsec SA.
  3. Adjust health check sensitivity: If brief degradation during rekeys triggers alerts, consider lowering the health check rate:
  4. Go to the Connectors page. Go to Connectors ↗
  5. In IPsec/GRE tunnels, select Edit on the tunnel.
  6. Change Health check rate to Low.
  7. Stagger rekey times: If you have multiple tunnels, configure different SA lifetimes so they do not rekey simultaneously.

Bidirectional health check failures

Symptoms

  • Health checks configured as bidirectional fail consistently
  • Unidirectional health checks work correctly
  • Traffic flows through the tunnel normally

Cause

Bidirectional health checks require both the probe and response to traverse the tunnel. Your router must:

  1. Accept ICMP packets destined for the tunnel interface IP addresses
  2. Route the ICMP response back through the tunnel to Cloudflare

If traffic selectors or firewall rules do not permit this traffic, bidirectional health checks fail.

Solution

For IPsec tunnels:

Configure traffic selectors to accept packets for the tunnel interface addresses. For example, if your tunnel interface address is 10.252.2.27/31:

  • Permit traffic to/from 10.252.2.26 (Cloudflare side)
  • Permit traffic to/from 10.252.2.27 (your side)

For all tunnel types:

Ensure your firewall permits ICMP traffic on the tunnel interface. Many firewalls require explicit rules to allow management traffic (including ping) on tunnel interfaces.

For detailed information on how bidirectional health checks work, refer to Tunnel health checks.


IPsec tunnel establishment failures

Symptoms

  • Tunnel status shows Down and never becomes healthy
  • No traffic passes through the tunnel
  • Router logs show IKE negotiation failures

Cause

IPsec tunnel establishment can fail due to several configuration mismatches:

Issue Symptom
Crypto parameter mismatch IKE negotiation fails with "no proposal chosen"
Incorrect PSK Authentication failures in Phase 1
Wrong IKE ID format Authentication failures despite correct PSK
Firewall blocking IKE No IKE traffic reaches Cloudflare

Solution

  1. Verify crypto parameters match Cloudflare's supported configuration:

Phase 1 (IKE)

Parameter Supported values
IKE version IKEv2 only
Encryption AES-GCM-16, AES-CBC-256
Authentication SHA-256, SHA-384, SHA-512
DH Group DH group 14, 15, 16, 19, 20

Phase 2 (IPsec)

Parameter Supported values
Encryption AES-GCM-16, AES-CBC-256
Authentication SHA-256, SHA-512
PFS Group DH group 14, 15, 16, 19, 20
  1. Verify the Pre-Shared Key (PSK):
  2. Regenerate the PSK in the Cloudflare dashboard
  3. Copy the new PSK exactly (no extra spaces or characters)
  4. Update your router with the new PSK
  5. Check the IKE ID format: Cloudflare uses FQDN format for the IKE ID. Ensure your router is configured to accept an FQDN peer identity. The FQDN is displayed in the tunnel details in the Cloudflare dashboard.
  6. Verify firewall rules: Ensure your edge firewall permits:
  7. UDP port 500 (IKE)
  8. UDP port 4500 (IKE NAT-T)
  9. IP protocol 50 (ESP)

For the complete list of supported parameters, refer to Supported configuration parameters.


Policy-based VPN health check failures

Symptoms

  • Health checks fail consistently on policy-based IPsec tunnels
  • Traffic matching the tunnel's traffic selectors (encryption domain) flows normally
  • Route-based tunnels on the same device work correctly

Cause

Policy-based IPsec tunnels use traffic selectors to define which prefixes are permitted in the tunnel. Reply-style health checks are self-addressed to Cloudflare IP addresses. These addresses fall outside the tunnel's traffic selectors (which only permit customer network destinations), so the tunnel endpoint drops the health check packets.

Additionally, some firewalls (such as Check Point) may flag Reply-style health check packets as spoofed due to their self-addressed nature, even on route-based tunnels.

Solution

  1. Change the health check type from Reply to Request.
  2. Configure a loopback address on your tunnel endpoint as the health check target. The target must be:
  3. Routable from the tunnel endpoint
  4. Covered by the tunnel's traffic selectors (encryption domain)
  5. For bidirectional health checks, ensure the health check source (the tunnel Interface Address configured in the Cloudflare dashboard) is also covered by a traffic selector.

Note

Policy-based tunnels use a separate Child SA for each set of traffic selectors. There is a limit of approximately 100 Child SAs per tunnel. The health check traffic may use its own Child SA, which can go down independently from the Child SAs carrying your application traffic.


Vendor-specific guidance

Common vendor-specific issues

Vendor Common issue Solution
Palo Alto Networks Health checks fail with default settings Change health check type to Request; disable anti-replay
Cisco Meraki Cannot disable anti-replay Enable replay protection in Cloudflare dashboard
AWS VPN Gateway Cannot disable anti-replay Enable replay protection in Cloudflare dashboard
VeloCloud Cannot disable anti-replay Enable replay protection in Cloudflare dashboard
Check Point Out-of-state packet drops Change health check type to Request

Gather information for support

If you have worked through this guide and still experience tunnel health issues, gather the following information before contacting Cloudflare support:

Required information

  1. Account ID and Tunnel name(s) affected
  2. Timestamps (in UTC) when the issue occurred
  3. Tunnel configuration details:
  4. Tunnel type (GRE or IPsec)
  5. Health check type (Request or Reply)
  6. Health check direction (Bidirectional or Unidirectional)
  7. Health check rate (Low, Medium, or High)
  8. Router information:
  9. Vendor and model
  10. Firmware/software version
  11. IPsec configuration (sanitized to remove PSK)
  12. Symptoms observed:
  13. Dashboard tunnel health status
  14. Whether user traffic is affected
  15. Error messages from router logs

Helpful diagnostic data

  • Packet captures from your router showing tunnel traffic
  • Router logs covering the time period of the issue
  • Traceroute results from your network to Cloudflare endpoints
  • Screenshots of the tunnel health dashboard
  • Distributed traceroutes using tools like ping.pe ↗︎ to test reachability from multiple global locations

Router diagnostic commands

Collect output from these commands (syntax varies by vendor):

  • IPsec SA status: show crypto ipsec sa
  • IKE SA status: show crypto isakmp sa
  • Tunnel interface status: show interface tunnel <number>
  • Routing table: show ip route

Resources

Was this helpful?

YesNo

On this page

Troubleshoot tunnel health·续 - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/cloudflare-wan/troubleshooting/tunnel-health/#page","headline":"Troubleshoot tunnel health","description":"Troubleshoot WAN tunnel health issues.","url":"https://developers.cloudflare.com/cloudflare-wan/troubleshooting/tunnel-health/","inLanguage":"en","image":"https://developers.cloudflare.com/cloudflare-wan/troubleshooting/tunnel-health/og.png?v=d4de1aa0a2c42341","dateModified":"2026-08-24","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Definitions for terms used across Cloudflare WAN documentation. title: Glossary image: https://developers.cloudflare.com/cloudflare-wan/glossary/og.png?v=fe6c6ff25ef427bd


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/cloudflare-wan/llms.txt
Use this file to discover all available pages before exploring further.