Skip to content

Commit c7c1c4c

Browse files
authored
[WAF] Update IP Access rules (#25287)
1 parent 4470e57 commit c7c1c4c

File tree

4 files changed

+34
-19
lines changed

4 files changed

+34
-19
lines changed

src/content/docs/waf/tools/ip-access-rules/actions.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ An IP Access rule can perform one of the following actions:
1010

1111
- **Block**: Prevents a visitor from visiting your site.
1212

13-
- **Allow**: Excludes visitors from all security checks, including [Browser Integrity Check](/waf/tools/browser-integrity-check/), [Under Attack mode](/fundamentals/reference/under-attack-mode/), and the WAF. Use this option when a trusted visitor is being blocked by Cloudflare's default security features. The _Allow_ action takes precedence over the _Block_ action. Note that allowing a given country code will not bypass WAF managed rules (previous and new versions).
13+
- **Allow**: Excludes visitors from all security checks, including [Browser Integrity Check](/waf/tools/browser-integrity-check/), [Under Attack mode](/fundamentals/reference/under-attack-mode/), and the WAF. Use this option when a trusted visitor is being blocked by Cloudflare's default security features. The _Allow_ action takes precedence over the _Block_ action.<br/>Allowing a given country code will not bypass WAF managed rules (previous and new versions). Refer to [Important remarks about allowing/blocking by country](/waf/tools/ip-access-rules/#important-remarks-about-allowingblocking-by-country) for more information.
1414

15-
- **Managed Challenge**: Depending on the characteristics of a request, Cloudflare will dynamically choose the appropriate type of challenge from a list of possible actions. For more information, refer to [Cloudflare Challenges](/cloudflare-challenges/challenge-types/challenge-pages/#managed-challenge-recommended).
15+
- **Managed Challenge**: Depending on the characteristics of a request, Cloudflare will dynamically choose the appropriate type of challenge from a list of possible actions. For more information, refer to [Interstitial Challenge Pages](/cloudflare-challenges/challenge-types/challenge-pages/#managed-challenge-recommended).
1616

1717
- **JavaScript Challenge**: Presents the [Under Attack mode](/fundamentals/reference/under-attack-mode/) interstitial page to visitors. The visitor or client must support JavaScript. Useful for blocking DDoS attacks with minimal impact to legitimate visitors.
1818

src/content/docs/waf/tools/ip-access-rules/create.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ sidebar:
88

99
import { TabItem, Tabs, Steps } from "~/components";
1010

11+
:::tip[Recommendation: Use custom rules instead]
12+
Cloudflare recommends that you create [custom rules](/waf/custom-rules/) instead of IP Access rules to perform IP-based or geography-based blocking (geoblocking).
13+
:::
14+
1115
<Tabs syncKey="dashNewNav"> <TabItem label="Old dashboard">
1216

1317
<Steps>

src/content/docs/waf/tools/ip-access-rules/index.mdx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,35 @@ import { GlossaryTooltip, Render } from "~/components";
99

1010
<Render file="survey" product="waf" />
1111

12-
Use IP Access rules to <GlossaryTooltip term="allowlist">allowlist</GlossaryTooltip>, block, and challenge traffic based on the visitor's IP address, country, or Autonomous System Number (ASN).
12+
Use IP Access rules to <GlossaryTooltip term="allowlist">allowlist</GlossaryTooltip>, block, and challenge traffic based on the visitor's IP address, Autonomous System Number (ASN), or country.
1313

1414
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.
1515

1616
:::caution
1717

18-
- Allowing an IP or ASN will bypass any configured [custom rules](/waf/custom-rules/), [rate limiting rules](/waf/rate-limiting-rules/), [WAF Managed Rules](/waf/managed-rules/), and firewall rules (deprecated).
19-
- Allowing a country will:
20-
- Bypass any configured [custom rules](/waf/custom-rules/), [rate limiting rules](/waf/rate-limiting-rules/), and firewall rules (deprecated).
21-
- Not bypass [WAF Managed Rules](/waf/managed-rules/) or [WAF managed rules (previous version)](/waf/reference/legacy/old-waf-managed-rules/).
18+
Allowing an IP or ASN will bypass any configured [custom rules](/waf/custom-rules/), [rate limiting rules](/waf/rate-limiting-rules/), [WAF Managed Rules](/waf/managed-rules/), and firewall rules (deprecated).
19+
20+
For important notes about allowing or blocking traffic by country, refer to [Important remarks about allowing/blocking by country](#important-remarks-about-allowingblocking-by-country).
2221

2322
:::
2423

24+
## Important remarks about allowing/blocking by country
25+
26+
Block by country is only available on Enterprise plans.
27+
28+
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](/waf/custom-rules/).
29+
30+
Allowing a country will:
31+
32+
- Bypass any configured [custom rules](/waf/custom-rules/), [rate limiting rules](/waf/rate-limiting-rules/), and firewall rules (deprecated).
33+
- Not bypass [WAF Managed Rules](/waf/managed-rules/) or [WAF managed rules (previous version)](/waf/reference/legacy/old-waf-managed-rules/).
34+
2535
## Recommendation: Use custom rules instead
2636

2737
Cloudflare recommends that you create [custom rules](/waf/custom-rules/) instead of IP Access rules to perform IP-based or geography-based blocking (geoblocking):
2838

29-
- For IP-based blocking, use an [IP list](/waf/tools/lists/custom-lists/#ip-lists) in the custom rule expression.
30-
- For geoblocking, use fields such as _AS Num_, _Country_, and _Continent_ in the custom rule expression.
39+
- For IP-based blocking, use an [IP list](/waf/tools/lists/custom-lists/#ip-lists) in the custom rule expression. Refer to [Allow traffic from IP addresses in allowlist only](/waf/custom-rules/use-cases/allow-traffic-from-ips-in-allowlist/) for an example.
40+
- For geoblocking, use fields such as _AS Num_, _Country_, and _Continent_ in the custom rule expression. Refer to [Block traffic from specific countries](/waf/custom-rules/use-cases/block-traffic-from-specific-countries/) for an example.
3141

3242
---
3343

src/content/docs/waf/tools/ip-access-rules/parameters.mdx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar:
66
label: Parameters
77
---
88

9-
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).
9+
An IP Access rule will apply a certain action to incoming traffic based on the visitor's IP address, IP range, Autonomous System Number (ASN), or country.
1010

1111
## IP address
1212

@@ -26,6 +26,12 @@ An IP Access rule will apply a certain action to incoming traffic based on the v
2626
| IPv6 `/48` range | `2001:db8::/48` | `2001:db8::` | `2001:db8:0000:ffff:ffff:ffff:ffff:ffff` | 1,208,925,819,614,629,174,706,176 |
2727
| IPv6 `/32` range | `2001:db8::/32` | `2001:db8::` | `2001:db8:ffff:ffff:ffff:ffff:ffff:ffff` | 79,228,162,514,264,337,593,543,950,336 |
2828

29+
## Autonomous System Number (ASN)
30+
31+
| Type | Example value |
32+
| ---- | ------------- |
33+
| ASN | `AS13335` |
34+
2935
## Country
3036

3137
Specify a country using two-letter [ISO-3166-1 alpha-2 codes](https://www.iso.org/iso-3166-country-codes.html). Additionally, the Cloudflare dashboard accepts country names. For example:
@@ -39,15 +45,10 @@ Cloudflare uses the following special country alpha-2 codes that are not part of
3945
- `T1`: [Tor exit nodes](/network/onion-routing/) (country name: `Tor`)
4046
- `XX`: Unknown/reserved
4147

42-
:::note[Notes about country blocking]
48+
:::note[Notes]
4349

44-
- Block by country is only available on Enterprise plans.
45-
- IP addresses globally allowed by Cloudflare will override an IP Access rule country block, but they will not override a country block via [WAF custom rules](/waf/custom-rules/).
50+
Country block is only available on Enterprise plans.
4651

47-
:::
52+
IP addresses globally allowed by Cloudflare will override a country block via IP Access rules, but they will not override a country block via [custom rules](/waf/custom-rules/).
4853

49-
## Autonomous System Number (ASN)
50-
51-
| Type | Example value |
52-
| ---- | ------------- |
53-
| ASN | `AS13335` |
54+
:::

0 commit comments

Comments
 (0)