Cloudflare Docs
WAF
Edit this page on GitHub
Set theme to dark (⇧+D)

Parameters

An IP Access rule will apply a certain action to incoming traffic based on the visitor’s IP address, IP range, country, or Autonomous System Number (ASN).

​​ IP address

TypeExample value
IPv4 address192.0.2.3
IPv6 address2001:db8::

​​ IP range

TypeExample valueStart of rangeEnd of rangeNumber of addresses
IPv4 /24 range192.0.2.0/24192.0.2.0192.0.2.255256
IPv4 /16 range192.168.0.0/16192.168.0.0192.168.255.25565,536
IPv6 /64 range2001:db8::/642001:db8::2001:db8:0000:0000:ffff:ffff:ffff:ffff18,446,744,073,709,551,616
IPv6 /48 range2001:db8::/482001:db8::2001:db8:0000:ffff:ffff:ffff:ffff:ffff1,208,925,819,614,629,174,706,176
IPv6 /32 range2001:db8::/322001:db8::2001:db8:ffff:ffff:ffff:ffff:ffff:ffff79,228,162,514,264,337,593,543,950,336

​​ Country

You can specify a country by name or two-letter ISO-3166-1 alpha-2 codes. For example:

  • US
  • germany
  • CN

Cloudflare uses the following special country alpha-2 codes that are not part of the ISO:

​​ Autonomous System Number (ASN)

TypeExample value
ASNAS13335