Tunnel Health Checks: ICMP Probe Direction, Type, and Troubleshooting
How ICMP tunnel health check probes work, when to use Request vs Reply and bidirectional vs unidirectional paths, and how to fix common failures.
This page summarises Cloudflare documentation on tunnel health checks for Cloudflare WAN and Magic Transit. These checks decide whether a GRE, IPsec, or Cloudflare Network Interconnect (CNI) path is healthy enough for traffic steering and failover. They are separate from application load-balancer monitors and from Cloudflare Tunnel (cloudflared) connectivity checks.
Tunnel health checks vs endpoint health checks
Section titled “Tunnel health checks vs endpoint health checks”Tunnel health checks monitor whether the tunnel between Cloudflare and your network is reachable. Cloudflare uses the results to steer traffic and warn you when a path degrades.
Cloudflare continuously monitors whether each tunnel connecting your network to Cloudflare is reachable and performing well. When a tunnel becomes unhealthy, Cloudflare automatically steers traffic to an alternate path — without requiring manual intervention. This monitoring relies on tunnel health check probes.
— Cloudflare, Tunnel health checks
Endpoint health checks (Magic Transit, API-configured, beta in the dashboard) probe deeper into your network for diagnostics. They ride available tunnels but do not drive tunnel selection.
Endpoint health checks evaluate connectivity from Cloudflare distributed data centers to your origin network. Unlike tunnel health checks, endpoint probes are designed to provide a broad picture of Internet health between Cloudflare and your network. They flow over available tunnels but do not inform tunnel selection or steering logic.
— Cloudflare, Network health
For ICMP endpoint checks via API, see Run endpoint health checks (beta).
How a tunnel health check probe works
Section titled “How a tunnel health check probe works”A tunnel health check probe is an ICMP payload carried inside the tunnel protocol (for IPsec, inside ESP). The probe goes from Cloudflare to your origin; your side returns a response; Cloudflare aggregates outcomes across its global network.
A tunnel health check probe consists of an ICMP (Internet Control Message Protocol) payload encapsulated in the protocol of the tunnel being tested. For example, if the tunnel is an Internet Protocol Security (IPsec) tunnel, the ICMP packet is encrypted within the Encapsulating Security Payload (ESP) packet of the tunnel.
— Cloudflare, Tunnel health checks
Health check direction: bidirectional vs unidirectional
Section titled “Health check direction: bidirectional vs unidirectional”Direction controls whether the ICMP response returns through the tunnel or over the public Internet.
| Direction | Probe path | Response path | Default for |
|---|---|---|---|
| Bidirectional | Through tunnel | Through tunnel | Cloudflare WAN |
| Unidirectional | Through tunnel | Public Internet (direct server return) | Magic Transit |
A unidirectional health check probe stays encapsulated in one direction and comes into the origin through the tunnel (from Cloudflare to the origin). The response comes back to Cloudflare unencapsulated and routes outside of the tunnel following standard Internet routing.
— Cloudflare, Tunnel health checks
A bidirectional probe stays encapsulated in both directions. The probe comes in through the tunnel and the response also leaves encapsulated through the tunnel.
— Cloudflare, Tunnel health checks
Unidirectional return paths are fragile: stateful gear and ISPs often drop ICMP replies headed for Cloudflare.
However, routing unidirectional ICMP reply packets over the Internet to Cloudflare is sometimes subject to drops by intermediate network devices, such as stateful firewalls. Magic Transit customers with egress traffic can modify this setting to bidirectional.
— Cloudflare, Configure tunnel endpoints
Typical symptom: application traffic works through the tunnel, but the dashboard shows failed health checks. If Magic Transit egress is enabled, switching to bidirectional so probe and response both use the tunnel is the documented fix; see Troubleshoot IPsec tunnels and Troubleshoot tunnel health.
Bidirectional addressing and the health check target
Section titled “Bidirectional addressing and the health check target”For bidirectional checks, Cloudflare uses the tunnel interface address (/30 or /31). By default it sends toward the customer side of the link and sources from the Cloudflare side—for example, with 10.100.0.8/31, destination 10.100.0.9, source 10.100.0.8. Details and diagrams are in Tunnel health checks.
The target is the address Cloudflare must reach through the tunnel. With bidirectional direction and Target = Default, the target is the other usable address in the link (the customer inside address). On AWS, for interface 169.254.240.46/30, probes go to 169.254.240.45; do not set a custom target via API or Terraform when using bidirectional defaults—see Amazon AWS Transit Gateway.
Microsoft Azure expects the same logical address in two forms: /31 on the Cloudflare tunnel interface and /32 in the VPN site or Local Network Gateway address space so Azure routes probe replies back over the tunnel.
Legacy public-target bidirectional setups use a target in 172.64.240.252/30 and policy-based routing so replies sourced from that target return through the tunnel—see Configure tunnel endpoints and Tunnel health checks.
Health check type: Request vs Reply
Section titled “Health check type: Request vs Reply”Type chooses whether Cloudflare sends an ICMP echo request or an ICMP echo reply as the probe payload. Addressing depends on direction; see the summary table in Tunnel health checks.
| Type | Behavior | When to use |
|---|---|---|
| Reply (default) | Probe is an ICMP reply packet | Simple networks without stateful firewalls |
| Request | Probe is an ICMP echo request | Stateful firewalls (recommended for most) |
Stateful firewalls (such as Palo Alto Networks, Check Point, Cisco, and Fortinet) drop the default Reply health check packets because no matching ICMP request exists in their session table.
— Cloudflare, Troubleshoot IPsec tunnels
Change the health check type from Reply to Request.
— Cloudflare, Troubleshoot tunnel health
On stateful devices, Request lets the firewall see a normal echo request and permit the reply. You still need ICMP allowed on the tunnel interface—for Palo Alto Networks NGFW, enable ping on the relevant interface management profile so VTIs respond to echo requests.
Policy-based IPsec and Reply-style checks
Section titled “Policy-based IPsec and Reply-style checks”Route-based VPNs are preferred. On policy-based IPsec, Reply-style probes targeted at Cloudflare public addresses often fall outside traffic selectors and are dropped.
If you use a policy-based VPN (where traffic selectors define specific prefixes rather than 0.0.0.0/0), Reply-style health checks do not work. Reply health checks are self-addressed to Cloudflare IP addresses, which fall outside your tunnel’s traffic selectors.
— Cloudflare, Troubleshoot IPsec tunnels
Use Request and set the health check target to a loopback or interface address that is routable and covered by selectors. Policies must also cover reply-style traffic if you use them—see GRE and IPsec tunnels. Each selector set can consume a Child SA; there is a practical limit of about 100 Child SAs per tunnel.
Health check rate and probe volume
Section titled “Health check rate and probe volume”Per-tunnel rate is low, mid (default), or high, via the dashboard or API—see Update tunnel health checks frequency.
Every Cloudflare data center configured to process your traffic sends tunnel health check probes.
— Cloudflare, Tunnel health checks
Failed probes trigger quick retries; collectively you may see hundreds of ICMP packets per second across the global network, which Cloudflare describes as a small amount of traffic per data center.
Example API fragment (also used on Sophos Firewall and strongSwan guides):
curl --request PUT \ "https://api.cloudflare.com/client/v4/accounts/{account_id}/magic/ipsec_tunnels/{tunnel_id}" \ --header "Content-Type: application/json" \ --data '{ "health_check": { "enabled": true, "target": "172.64.240.252", "type": "request", "rate": "mid" } }'Reference settings for AWS Transit Gateway
Section titled “Reference settings for AWS Transit Gateway”Cloudflare documents these exact tunnel health check fields for AWS:
| Health check field | Value |
|---|---|
| Rate | Medium |
| Type | Request |
| Direction | Bidirectional |
| Target | Default |
With Bidirectional direction, the dashboard hides Health check target; the default is the AWS inside address in the same /30 as the Cloudflare interface.
Why tunnel health fails when IPsec looks fine
Section titled “Why tunnel health fails when IPsec looks fine”Work through these causes in order; the full checklist is in Troubleshoot tunnel health.
Stateful firewall drops Reply probes
Section titled “Stateful firewall drops Reply probes”Switch Health check type from Reply to Request on the tunnel in the Connectors UI, then confirm ICMP is permitted on the tunnel interface.
Cloudflare Network Firewall blocks ICMP
Section titled “Cloudflare Network Firewall blocks ICMP”Customer traffic and Cloudflare’s own probes are subject to Cloudflare Network Firewall rules.
If you block all ICMP traffic, you will also block Cloudflare’s endpoint health checks.
— Cloudflare, Ruleset logic
Allow ICMP from Cloudflare public IP ranges before any deny rule. The same logic applies to tunnel probes described in Troubleshoot tunnel health.
Bidirectional path blocked on your router
Section titled “Bidirectional path blocked on your router”Your router must accept ICMP to tunnel interface addresses and send the echo reply back through the tunnel. For IPsec, selectors must include both sides of the /31 or /30 link—for example 10.252.2.26 and 10.252.2.27 when your side is 10.252.2.27/31.
ICMP denied on the CPE
Section titled “ICMP denied on the CPE”Vendor guides in the cluster add explicit ICMP allow rules—for example Fortinet (ALL_ICMP), SonicWall, and Sophos Firewall (interface alias for the probe target plus SD-WAN policy routing so replies use the same tunnel).
Unidirectional return path blocked
Section titled “Unidirectional return path blocked”With Magic Transit default unidirectional checks, the reply leaves via the Internet. An ISP blocking ICMP toward Cloudflare produces failing checks while data plane traffic still flows—use bidirectional checks when egress is available, per Troubleshoot IPsec tunnels.
Degraded health with IPsec up (AWS)
Section titled “Degraded health with IPsec up (AWS)”If health is degraded but IPsec is up, Cloudflare’s AWS checklist includes: rate Medium, type Request, direction Bidirectional, default target (peer inside /30), matching inside CIDR on the AWS tunnel, and no network policy blocking ICMP to the AWS tunnel inside address.
Cisco Meraki: Layer 7 probes through Cloudflare Gateway
Section titled “Cisco Meraki: Layer 7 probes through Cloudflare Gateway”Cisco Meraki MX (static routing) uses HTTP Layer 7 probes (port 80/tcp) from reserved source 192.0.2.3/32, not the ICMP tunnel health check model above. You must add a Cloudflare Gateway HTTP policy (source internal IP 192.0.2.3, action Do Not Inspect) so probes can reach the configured URL. That path is orthogonal to ICMP tunnel health checks but appears in the same WAN integration docs.
Common mistakes
Section titled “Common mistakes”- Treating IPsec SA up as proof of tunnel health—they are independent on AWS and elsewhere.
- Leaving Reply probes on stateful firewalls (Palo Alto Networks, Check Point, Cisco, Fortinet).
- Setting a custom health check target on AWS when Bidirectional + Default is required.
- Blocking ICMP in Cloudflare Network Firewall without an allow rule for Cloudflare sources first.
- Using Reply on policy-based VPNs without covering Cloudflare addresses in selectors.
- Forgetting Azure private address space entries (
/32per tunnel interface) for bidirectional ICMP. - Expecting Meraki L7 HTTP checks to work without a Gateway HTTP policy for the probe source IP.
How to check this on your site
Section titled “How to check this on your site”- In the Cloudflare dashboard, open your WAN or Magic Transit connectors and confirm each tunnel’s health check direction, type, rate, and target match your platform guide (for AWS, compare with Amazon AWS Transit Gateway).
- If checks fail but IPsec is up, walk the Troubleshoot tunnel health checklist (type Request on stateful gear, MTU, anti-replay, ICMP allows).
- On the origin firewall, verify ICMP to tunnel interface addresses is permitted (Palo Alto Networks NGFW, Fortinet, or your vendor page in the Cloudflare WAN third-party list).
- If you use Cloudflare Network Firewall, confirm an Allow ICMP rule from Cloudflare IP ranges precedes any block, per Ruleset logic.
- You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact sentence you are asking about.