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

Manage firewall rules via the APIs

Cloudflare offers APIs that work together to achieve the same effect as the UI-based Firewall rules feature under Security > WAF.

These APIs are the following:

  • Firewall Rules API: Manage firewall rules and their actions, based on criteria separately defined through filters.
  • Filters API: Manage the filters that enable rule matching.
  • Lists API: Manage named lists of IP addresses that you can use in firewall rules to filter traffic.