skip to content

With Cloudflare WAF custom rules, how do you let a partner's fixed IP range past your other security rules, and what exactly does Skip skip?

level: middleimportance: should knowfreq 50%

answer

  1. no Allow action any more
  2. position in the rule list
  3. ruleset, phases, products
  4. something Skip cannot reach

basics

~20 s

Add a custom rule at the top matching ip.src in $partner_ips on the partner's paths, with the Skip action. Skip bypasses only what you select: remaining custom rules, later phases such as rate limiting, or listed products.

solid answer

~40 s

Custom rules have no Allow action; **Skip** replaced the old Allow and Bypass. I would put the partner's range in an IP list, `$partner_ips`, and write `ip.src in $partner_ips and starts_with(http.request.uri.path, "/partner-api/")` with Skip. Then I choose what it skips: *All remaining custom rules* (`ruleset: "current"`), whole later phases (`http_ratelimit`, `http_request_firewall_managed`, `http_request_sbfm`), or non-ruleset products such as Zone Lockdown or Browser Integrity Check. Order matters. Custom rules run top to bottom and a Block or challenge above the Skip still wins, so the skip rule goes first. A rule created through the API is appended last unless you pass `position`. Skip cannot touch Bot Fight Mode or the DDoS phase, which runs before custom rules. Its matches are logged by default.

code

plaintext · 1 line
plaintext
ip.src in $partner_ips and starts_with(http.request.uri.path, "/partner-api/")

go deeper

for a junior

Recall that Skip replaced Allow and Bypass and that the skip rule must sit above the rules it is meant to avoid.

for a middle

Explain the skip options (remaining custom rules, phases, products), the phase order, and why a Block above the Skip still wins.

for a senior

Show how you keep a partner exception narrow and visible: an IP list, a path scope, only the needed phases, logging kept on, and a review when the partnership changes.

for a principal

Discuss who may add a skip rule and how exceptions are reviewed, since each one is a standing hole in the zone's defences.

## No Allow action: Skip instead A partner calls your API from a fixed range, and some of your rules, such as the country challenge on logins, would stop it. Deprecated firewall rules had **Allow**, which stopped further firewall rules, and **Bypass**, which turned off named products. WAF custom rules support neither. The **Skip** action replaces both, and one rule can do what used to take two. ## What Skip can skip | Dashboard option | API action parameter | What is skipped | |---|---|---| | All remaining custom rules | `ruleset: "current"` | Rules below this one in the same ruleset | | All rate limiting rules | `phases: ["http_ratelimit"]` | The rate limiting phase | | All managed rules | `phases: ["http_request_firewall_managed"]` | WAF Managed Rules | | All Super Bot Fight Mode rules | `phases: ["http_request_sbfm"]` | Super Bot Fight Mode | | (API only) | `phase: "current"` | All remaining rules in the custom-rules phase, including later custom rulesets | | Products | `products: [...]` | Features outside the Ruleset Engine, such as `zoneLockdown`, `uaBlock`, `bic`, `hot`, `securityLevel` | One rule may set `ruleset`, `phases` and `products` together. The `products` values are case-sensitive. ## Order decides whether the skip runs at all Skip only helps if the request reaches it. Two orders apply. 1. **Phases run in a fixed sequence**: `ddos_l7` (HTTP DDoS Attack Protection), then `http_request_firewall_custom` (custom rules), `http_ratelimit`, `http_request_firewall_managed`, and `http_request_sbfm`. A custom rule can therefore skip the three phases after it, never the DDoS phase before it. Within a phase, account-level rulesets run before zone-level ones. 2. **Custom rules run top to bottom.** If rule 1 Blocks and rule 2 Skips, a request matching both is blocked. Unlike firewall rules' old priority ordering, no action outranks another. Put the skip rule **above** every rule the partner must pass. The Rulesets API appends a new rule at the end unless the request includes `position` (`before`, `after` or `index`). ## Building the partner rule - Create an **IP list** (available on every plan) named, say, `partner_ips`, holding the partner's CIDR range. Lists live at account level and can be reused across zones. Changing the list changes every rule that uses it, so a new partner address needs no rule edit. - Scope the expression to what the partner actually calls: the path prefix, and the hostname if you have several. - Skip only what the partner trips. Usually that is the remaining custom rules plus rate limiting, not managed rules. ```json { "description": "Partner API: skip remaining custom rules and rate limiting", "expression": "ip.src in $partner_ips and starts_with(http.request.uri.path, \"/partner-api/\")", "action": "skip", "action_parameters": { "ruleset": "current", "phases": ["http_ratelimit"] }, "logging": { "enabled": true }, "position": { "before": "" } } ``` ## What Skip cannot reach - **Bot Fight Mode**, the Free-plan toggle, sits outside the Ruleset Engine and cannot be skipped. Super Bot Fight Mode can. - The **DDoS** phase runs before custom rules. - Products outside the Ruleset Engine are not covered by skipping a phase; they need the `products` option. ## Checking the exception works After deploying, confirm the skip does what you meant and nothing more: 1. Ask the partner for a test call, or wait for their next batch, and find the requests in **Security Events**. With logging on, they appear as matches of the skip rule, not of the country challenge below it. 2. Check that nothing below the skip rule matched the partner's addresses. If the challenge still fires, the skip rule is lower in the list than you think, or its expression does not match; a path typo or a missing CIDR range in the list are the usual causes. 3. Check the reverse: requests from outside `$partner_ips` to `/partner-api/` must still meet every rule. A skip scoped by path alone, without the address condition, would open the endpoint to everyone. IP lists accept individual IPv4 and IPv6 addresses and CIDR ranges (IPv4 prefixes `/8` to `/32`, IPv6 `/12` to `/128`), so a partner's whole range fits in one entry. ## Keeping the exception honest - Leave **logging** on (the default for Skip rules) so the partner's traffic still shows in Security Events. Turn it off only for very high-volume trusted traffic. - Review the IP list when the partnership changes; a stale entry is an open door. - Keep managed rules running unless a confirmed false positive says otherwise. Tune that exception in the managed rules themselves.

  • Why not simply skip every phase for the partner?
    The partner's systems can be compromised or misbehave, and a full skip would remove rate limiting and the managed rules exactly when you need them. Skip only what the partner's legitimate traffic actually trips, usually the remaining custom rules and perhaps rate limiting. If a managed rule produces a confirmed false positive on its requests, handle that as a scoped managed-rules exception instead.
  • Does a Skip rule hide the partner's requests from Security Events?
    Not by default. Skip rules log matching requests unless you turn off **Log matching requests** (`logging.enabled: false` in the API). Keeping it on lets you see the partner's volume and spot an address that should no longer be trusted. Turning it off suits a high-volume positive-security rule where the events would only be noise.
  • The partner is still challenged on a Free-plan zone even with the skip rule first. What could cause that?
    Bot Fight Mode. It runs outside the Ruleset Engine and custom rules cannot skip it. The choices are turning it off, or moving to Super Bot Fight Mode on a paid plan, whose phase a Skip rule can bypass.

  • Custom rules still have Allow for trusted IPs and Bypass for products.
  • One Skip rule anywhere in the list lets the partner past every other rule.
  • Skipping all remaining custom rules also skips rate limiting and managed rules.
  • A Skip rule can exempt the partner from Bot Fight Mode.
  • A custom rule created through the Rulesets API is placed first by default.

Since Cloudflare deprecated firewall rules (their API unsupported from 2025-06-15), the Allow and Bypass actions are gone and WAF custom rules use Skip, evaluated strictly in order.