You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/waf/tools/ip-access-rules/actions.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ An IP Access rule can perform one of the following actions:
10
10
11
11
-**Block**: Prevents a visitor from visiting your site.
12
12
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.
14
14
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).
16
16
17
17
-**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.
Cloudflare recommends that you create [custom rules](/waf/custom-rules/) instead of IP Access rules to perform IP-based or geography-based blocking (geoblocking).
Use IP Access rules to <GlossaryTooltipterm="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 <GlossaryTooltipterm="allowlist">allowlist</GlossaryTooltip>, block, and challenge traffic based on the visitor's IP address, Autonomous System Number (ASN), or country.
13
13
14
14
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.
15
15
16
16
:::caution
17
17
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).
22
21
23
22
:::
24
23
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
+
25
35
## Recommendation: Use custom rules instead
26
36
27
37
Cloudflare recommends that you create [custom rules](/waf/custom-rules/) instead of IP Access rules to perform IP-based or geography-based blocking (geoblocking):
28
38
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.
Copy file name to clipboardExpand all lines: src/content/docs/waf/tools/ip-access-rules/parameters.mdx
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ sidebar:
6
6
label: Parameters
7
7
---
8
8
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.
10
10
11
11
## IP address
12
12
@@ -26,6 +26,12 @@ An IP Access rule will apply a certain action to incoming traffic based on the v
26
26
| 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 |
27
27
| 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 |
28
28
29
+
## Autonomous System Number (ASN)
30
+
31
+
| Type | Example value |
32
+
| ---- | ------------- |
33
+
| ASN |`AS13335`|
34
+
29
35
## Country
30
36
31
37
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
- 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.
46
51
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/).
0 commit comments