Cloudflare IP access rules allow, block or challenge requests by IP address, IP range, ASN or country. The problem is the Allow action: for that source, it skips your custom rules, rate limiting rules and managed rules, its matches never show in Security Events, and it never expires (IP Access rules). An Allow added for a partner or during an incident stays a hole in your WAF until someone deletes it. This guide shows why, then the fix, step by step. Lelops Advise runs the same review from questions in plain language: it lists your Allow rules, finds the ones due and changes them after your confirmation.
Why Allow in Cloudflare IP Access Rules Skips Your WAF
An Allow rule takes its source out of your security checks. For an IP address or an ASN (the number of a network, such as a hosting company’s), it skips your custom rules, your rate limiting rules and the WAF Managed Rules; for a country, the managed rules still run. It also wins over Block when both match the same request, so a Block you add for that source does nothing (actions).
The cause is the order of evaluation. IP access rules run before custom rules, so an allowed request never reaches them, the rules that only log included (Rule phase interactions). That gives the issue its usual symptom: a custom rule that doesn’t fire for one IP.
Nothing in Cloudflare flags an Allow rule that outlived its purpose, the case our configuration drift guide opens with. We checked the rule object in Cloudflare’s public API schema: beyond its action, value and note, it keeps only the dates it was created and last modified, with no expiry and no record of its last match.
How to Audit Your Cloudflare IP Access Rules

We recommend these steps, then a monthly pass on the rules whose note names that month:
- List the Allow rules.
GET /zones/{zone_id}/firewall/access_rules/rules?mode=whitelistreturns them,whitelistbeing the API’s value for Allow; the/accounts/{account_id}/path lists the rules that apply to every zone (API reference). - Read each note. It is the only record of who asked for the rule and why, so a rule with no note is the first to question.
- Check its traffic. In Security Analytics, add a filter on Source IP. It shows every request, the ones Cloudflare didn’t act on included, and keeps 31 days on Free, Pro and Business (Security Analytics). It works on a sample of your traffic by default, so a rarely used IP can be missing from it: confirm with the person named in the note before deleting.
- Fix it. With no traffic and nobody who needs it, delete the rule; the API has no bulk delete, so send one DELETE per rule ID. For a source you don’t fully trust, change the action to Managed Challenge, so it is tested instead of let through. For a trusted source that trips one product, replace the Allow with a custom rule using Skip, which bypasses only the products you select (Security features interoperability), or with a managed rules exception for a false positive.
- Write the next review month in the note of every rule you keep, in a fixed form such as
review:2027-03. Next month, add¬es=review:2027-03to the call in step 1: the note filter matches any part of the note and ignores case.
How to Create an IP Access Rule That Stays Safe

In the dashboard, open Security rules on your zone, select Create rule > IP access rules, enter the value, pick the action, choose this website or all websites in the account, and write a note (Create an IP access rule). The value is an IP address, an IPv4 range of /24 or /16, an ASN such as AS13335, or a country code; blocking a country needs the Enterprise plan, and Cloudflare points other plans to a custom rule (parameters).
Pick the lightest action that does the job: a challenge when you are unsure, Block when you are sure, Allow only for a source you trust completely. Never leave the note empty: write who asked, why, and the review month.
How to Fix Cloudflare IP Access Rules with Lelops Advise
Lelops Advise answers questions about your Cloudflare setup and acts on it through a chat, Ask Lelops, so the audit above becomes a few questions instead of API calls.
- Open Ask Lelops from the right edge of any page in the Lelops app. It reaches the zones and accounts your Cloudflare API token lets Lelops see; the token needs permission to read IP access rules, and to edit them for steps 4 and 5.
- List the Allow rules: “List the IP access rules with the Allow action on example.com.” Before it calls Cloudflare, Ask Lelops shows the call it will make, with the zone and the filter, and runs it once you confirm, for a read as for a change. Ask the same about your account for the rules that apply to every zone.
- Find the ones due: “Which IP access rules on example.com have the Allow action and review:2026-12 in their note?” Ask Lelops passes the action and the note text to Cloudflare’s own search, so the answer matches the API filters of the audit.
- Fix what the audit decided: “Change the rule for 198.51.100.4 on example.com to Managed Challenge”, or “Delete the rule for 198.51.100.4 on example.com.” Ask Lelops shows the change, with the rule and what it will become, and runs it once you confirm. Lelops also checks that your role in the organization allows the change.
- Write the next review month: “Set the note of the rule for 198.51.100.4 on example.com to review:2027-03.” The note is part of the rule, so Ask Lelops edits it the same way, after your confirmation.
- Find the change in Versioning: open Guard > Versioning. Each change Ask Lelops made on example.com is a new version of that zone, listed with its date and the person who made it (Lelops Guard). A change to an account-wide rule saves no version, so read that confirmation twice.
- Roll back if a change breaks something: expand the version before it, select Rollback, then Restore and deploy. Lelops deploys that version of the zone again as a new version, its IP access rules included.
Lelops Advise finds the IP access rules that skip your WAF and fixes them from a question in plain language, after your confirmation, keeping a version of every zone change: lelops.ai/product/advise.
FAQ
What are Cloudflare IP access rules?
Cloudflare IP access rules are a list of sources, each with an action, that Cloudflare checks before a site's custom rules. A source is an IP address, an IP range, a network number (ASN) or a country, and the action is Block, Allow or one of three challenges. In plain terms, it is the list of sources Cloudflare stops, tests or lets through before the site's own firewall rules look at the request.
Do Cloudflare IP access rules bypass the WAF?
Only the Allow action does. Allowing an IP address or an ASN skips custom rules, rate limiting rules and WAF Managed Rules for that source, while allowing a country skips custom rules and rate limiting but still runs the managed rules. Block and the challenge actions stop or test the request instead, so they bypass nothing.
Can Cloudflare IP access rules block a country?
Blocking a country with an IP access rule requires the Enterprise plan. On Free, Pro and Business, Cloudflare's documented way to block a country is a WAF custom rule using the Country field. Cloudflare also has two special country codes for these rules: T1 for Tor exit nodes and XX for unknown origins.
How many IP access rules can a Cloudflare account have?
Each Cloudflare account can hold up to 50,000 IP access rules, on every plan, and Enterprise customers can ask their account team for more. The limit counts rules, not addresses, so a /16 range in one rule covers 65,536 IPv4 addresses for one slot. Teams that approach the limit can move long address sets into an IP list referenced by a custom rule, which Cloudflare recommends anyway.
What is the difference between IP access rules and Cloudflare Access?
IP access rules act on where a request comes from (its IP, network or country) and apply to all traffic reaching a website. Cloudflare Access is part of Cloudflare's Zero Trust platform and decides who can reach a given application, using Access policies based on identity, device and other attributes. A search for Cloudflare access rules can mean either: blocking or allowing a source points to IP access rules, protecting an internal tool behind a login points to Cloudflare Access.
Christophe Pronier


