INTEGRITY Cloudflare Docs

IP Access rules

Use IP Access rules to allowlist, block, and challenge traffic based on the visitor's IP address, Autonomous System Number (ASN), or country.

IP Access rules are commonly used to block or challenge suspected malicious traffic. Another common use of IP Access rules is to allow services that regularly access your site, such as APIs, crawlers, and payment providers.

Important remarks about allowing/blocking by country

Block by country is only available on Enterprise plans.

IP addresses globally allowed by Cloudflare will override an IP Access rule country block, but they will not override a country block via custom rules.

Allowing a country will:

Recommendation: Use custom rules instead

Cloudflare recommends that you create custom rules instead of IP Access rules to perform IP-based or geography-based blocking (geoblocking):

When upgrading to custom rules, consider replacing the Allow action supported by IP Access rules with the Skip action. Note that the Skip action does not bypass all of Cloudflare's app security features.


Availability

IP Access rules are available to all customers.

Free Pro Business Enterprise
Availability Yes Yes Yes Yes
Number of rules 50,000 50,000 50,000 50,000, but can purchase more
Block by country No No No Yes

Each Cloudflare account can have a maximum of 50,000 rules. If you are an Enterprise customer and need more rules, contact your account team.

Block by country is only available on Enterprise plans. Other customers may perform country blocking using WAF custom rules.

Final remarks

To learn more about protection options provided by Cloudflare to protect your website against malicious traffic and bad actors, refer to Account security.