Cloudflare Docs
Firewall Rules
Visit Firewall Rules on GitHub
Set theme to dark (⇧+D)

Cloudflare Firewall Rules

Cloudflare Firewall Rules allows you to create rules that inspect incoming traffic and block, challenge, log, or allow specific requests.

​​ Main features

  • Rule-based protection: Use pre-defined rulesets provided by Cloudflare, or define your own firewall rules. Create rules in the Cloudflare dashboard or via API.
  • Complex custom rules: Each rule’s expression can reference multiple fields from all the available HTTP request parameters and fields, allowing you to create complex rules.

​​ Availability

Cloudflare Firewall Rules is available to all customers. However, the number of active firewall rules you can have and support for the Log action and regular expressions depend on your Cloudflare plan.

This table outlines the Firewall Rules features and entitlements available with each customer plan:

Cloudflare plan
FeatureFreeProBusinessEnterprise
Active rules5201001,000
Supported actionsAll except LogAll except LogAll except LogAll
Regular expression supportNoNoYesYes
Number of IP Lists1101010

​​ Next steps

For additional information, refer to the following pages: