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/troubleshooting/faq.mdx
+52-25Lines changed: 52 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,15 +3,12 @@ title: FAQ
3
3
pcx_content_type: faq
4
4
sidebar:
5
5
order: 10
6
-
7
6
---
8
7
9
8
## General questions
10
9
11
-
12
10
### Why does a security event display a Cloudflare IP address even though other fields match the client details?
13
11
14
-
15
12
This happens when a request goes through a Cloudflare Worker.
16
13
17
14
In this case, Cloudflare considers the client details, including its IP address, for triggering security settings. However, the IP displayed in [Security Events](/waf/analytics/security-events/paid-plans/) will be a Cloudflare IP address.
@@ -20,23 +17,23 @@ In this case, Cloudflare considers the client details, including its IP address,
20
17
21
18
Yes, you may have to escape certain characters in expressions. The exact escaping will depend on the string syntax you use:
22
19
23
-
* If you use the raw string syntax (for example, `r#"this is a string"#`), you will only need to escape characters that have a special meaning in regular expressions.
24
-
* If you use the quoted string syntax (for example, `"this is a string"`), you need to perform additional escaping, such as escaping special characters `"` and `\` using `\"` and `\\`, both in literal strings and in regular expressions.
20
+
- If you use the raw string syntax (for example, `r#"this is a string"#`), you will only need to escape characters that have a special meaning in regular expressions.
21
+
- If you use the quoted string syntax (for example, `"this is a string"`), you need to perform additional escaping, such as escaping special characters `"` and `\` using `\"` and `\\`, both in literal strings and in regular expressions.
25
22
26
23
For more information on string syntaxes and escaping, refer to [String values and regular expressions](/ruleset-engine/rules-language/values/#string-values-and-regular-expressions).
27
24
28
25
### Why is my regular expression pattern not working?
29
26
30
-
If you are using a regular expression, it is recommended that you test it with a tool such as [Regular Expressions 101](https://regex101.com/?flavor=rust\®ex=) or [Rustexp](https://rustexp.lpil.uk).
27
+
If you are using a regular expression, it is recommended that you test it with a tool such as [Regular Expressions 101](https://regex101.com/?flavor=rust®ex=) or [Rustexp](https://rustexp.lpil.uk).
31
28
32
29
### How do I exclude certain requests from being blocked or challenged?
33
30
34
31
In certain situations you want to enforce a blocking or challenging action but make an exception for specific types of requests.
35
32
36
33
Cloudflare supports two methods of allowing requests using WAF custom rules:
37
34
38
-
* Exclude a type of request from being blocked or challenged in a custom rule by updating the rule expression, for example adding an exclusion based on IP address, ASN, or country.
39
-
* Create a separate custom rule with a [*Skip* action](/waf/custom-rules/skip/). This skip rule must appear before the rule with the block/challenge action in the rules list.
35
+
- Exclude a type of request from being blocked or challenged in a custom rule by updating the rule expression, for example adding an exclusion based on IP address, ASN, or country.
36
+
- Create a separate custom rule with a [_Skip_ action](/waf/custom-rules/skip/). This skip rule must appear before the rule with the block/challenge action in the rules list.
40
37
41
38
The examples below illustrate a few possible approaches.
42
39
@@ -57,11 +54,14 @@ Exclude multiple IP addresses from a blocking/challenging rule that assesses Thr
57
54
- Two rules to skip remaining custom rules for specific IPs and block the rest.
58
55
59
56
1. Rule 1:
60
-
- Expression: `ip.src in {192.0.2.1 198.51.100.42 203.0.113.0/24}`
61
-
- Action: Skip > All remaining custom rules
57
+
58
+
- Expression: `ip.src in {192.0.2.1 198.51.100.42 203.0.113.0/24}`
59
+
- Action: Skip > All remaining custom rules
60
+
62
61
2. Rule 2:
63
-
- Expression: `(http.host eq "example.com" and cf.threat_score > 5)`
64
-
- Action: Block (or a challenge action)
62
+
63
+
- Expression: `(http.host eq "example.com" and cf.threat_score > 5)`
64
+
- Action: Block (or a challenge action)
65
65
66
66
**Example 2**
67
67
@@ -80,24 +80,52 @@ Block Amazon Web Services (AWS) and Google Cloud Platform (GCP) because of large
80
80
- Two rules to skip remaining custom rules for specific IPs and block the rest.
81
81
82
82
1. Rule 1:
83
-
- Expression: `ip.src in {192.0.2.1 198.51.100.42 203.0.113.0/24}`
84
-
- Action: Skip > All remaining custom rules
83
+
84
+
- Expression: `ip.src in {192.0.2.1 198.51.100.42 203.0.113.0/24}`
85
+
- Action: Skip > All remaining custom rules
86
+
85
87
2. Rule 2:
86
-
- Expression: `(http.host eq "example.com" and cf.threat_score > 5)`
87
-
- Action: Block (or a challenge action)
88
88
89
-
### Why are some rules bypassed when I did not create an exception?
89
+
- Expression: `(http.host eq "example.com" and cf.threat_score > 5)`
90
+
- Action: Block (or a challenge action)
90
91
92
+
### Why are some rules bypassed when I did not create an exception?
91
93
92
94
If you have [SSL/TLS certificates](/ssl/) managed by Cloudflare, every time a certificate is issued or renewed, a [domain control validation (DCV)](/ssl/edge-certificates/changing-dcv-method/dcv-flow/) must happen. When a certificate is in `pending_validation` state and there are valid DCV tokens in place, some Cloudflare security features such as [custom rules](/waf/custom-rules/) and [WAF Managed Rules](/waf/managed-rules/) will be automatically disabled on specific DCV paths (for example, `/.well-known/pki-validation/` and `/.well-known/acme-challenge/`).
93
95
96
+
### Why is Cloudflare blocking a specific IP address?
97
+
98
+
Cloudflare may block an IP address due to various reasons:
99
+
100
+
-**Web Application Firewall (WAF) mitigation actions**: The Cloudflare WAF protects websites from various online threats, including malicious traffic, DDoS attacks, and common vulnerabilities. If your IP address is associated with suspicious or malicious activity, it might trigger the WAF and block requests.
101
+
102
+
-**High security settings**: The website owner might have set their Cloudflare security settings to a high level, making the filtering of incoming traffic stricter. In this situation, even legitimate users may get blocked or have to solve challenges.
103
+
104
+
-**Excessive requests**: Cloudflare may block an IP address if it detects an unusually high number of requests in a short period, in which case it will rate limiting subsequent requests. This is a protective measure against potential abuse or attacks.
105
+
106
+
-**Traffic from malicious bots**: Cloudflare employs bot detection mechanisms to distinguish between legitimate users and automated bots. If traffic from your IP address behaves like traffic from a malicious bot, it could get blocked.
107
+
108
+
-**Blocklisted IPs**: Cloudflare might block IP addresses listed on public blocklists due to their association with known malicious activities.
109
+
110
+
If your IP address is blocked, try the following:
111
+
112
+
-**Check Cloudflare Security Events**: Use the [Security Events](/waf/analytics/security-events/paid-plans/) log to check for specific reasons your IP might be getting blocked. Look for details on the type of threat or activity that triggered the block.
113
+
114
+
-**Contact the website owner**: If you are a legitimate user and your IP is wrongly blocked, contact the website owner or administrator. They may be able to allowlist your IP or investigate the issue further.
115
+
116
+
-**Verify your own website traffic**: Check for abnormal activity. If you manage a website behind Cloudflare, ensure that your site's traffic is legitimate and not triggering security measures inadvertently.
117
+
118
+
-**Check your IP reputation**: Verify whether your IP address is listed on public blocklists, such as [Project Honey Pot](https://projecthoneypot.org/). If so, take steps to address any issues that may have led to the listing.
119
+
120
+
-**Adjust your security settings**: If you are a website owner using Cloudflare, consider adjusting security settings to find the right balance between protection and accessibility.
121
+
94
122
## Bots
95
123
96
124
### How does the WAF handle traffic from known bots?
97
125
98
126
#### Caution about potentially blocking bots
99
127
100
-
When you create a WAF custom rule with a *Block*, *Interactive Challenge*, *JS Challenge*, or *Managed Challenge (Recommended)* action, you might unintentionally block traffic from known bots. Specifically, this might affect search engine optimization (SEO) and website monitoring when trying to enforce a mitigation action based on URI, path, host, ASN, or country.
128
+
When you create a WAF custom rule with a _Block_, _Interactive Challenge_, _JS Challenge_, or _Managed Challenge (Recommended)_ action, you might unintentionally block traffic from known bots. Specifically, this might affect search engine optimization (SEO) and website monitoring when trying to enforce a mitigation action based on URI, path, host, ASN, or country.
101
129
102
130
Refer to [How do I exclude certain requests from being blocked or challenged?](#how-do-i-exclude-certain-requests-from-being-blocked-or-challenged).
103
131
@@ -111,10 +139,9 @@ For more information on verified bots, refer to [Bots](/bots/concepts/bot/).
111
139
112
140
:::note
113
141
114
-
There is no functional difference between known and verified bots. However, the known bots field (`cf.client.bot`) is available for all customers, while the verified bots field (`cf.bot_management.verified_bot`) is available for Enterprise customers.
142
+
There is no functional difference between known and verified bots. However, the known bots field (`cf.client.bot`) is available for all customers, while the verified bots field (`cf.bot_management.verified_bot`) is available for Enterprise customers.
115
143
:::
116
144
117
-
118
145
## Challenges
119
146
120
147
### Do the Challenge actions support content types other than HTML (for example, AJAX or XHR requests)?
@@ -135,15 +162,15 @@ Users do not complete all challenges. Cloudflare issues challenges that are neve
135
162
136
163
There are multiple reasons for this:
137
164
138
-
* Users give up on a challenge.
139
-
* Users try to solve a challenge but cannot provide an answer.
140
-
* Users keep refreshing the challenge, but never submit an answer.
141
-
* Cloudflare receives a malformed challenge answer.
165
+
- Users give up on a challenge.
166
+
- Users try to solve a challenge but cannot provide an answer.
167
+
- Users keep refreshing the challenge, but never submit an answer.
168
+
- Cloudflare receives a malformed challenge answer.
142
169
143
170
### Why do I have matches for a firewall rule that was not supposed to match the request?
144
171
145
172
Make sure you are looking at the correct request.
146
173
147
174
Only requests that triggered a challenge will match the request parameters of the rule. Subsequent requests with a `[js]challengeSolved` or `[js]challengeFailed` action may not match the parameters of the rule — for example, the bot score may have changed because the user solved a challenge.
148
175
149
-
The "solved" and "failed" actions are informative actions about a previous request that matched a rule. These actions state that "previously a rule had matched a request with the action set to *Interactive Challenge* or *JS Challenge* and now that challenge was answered."
176
+
The "solved" and "failed" actions are informative actions about a previous request that matched a rule. These actions state that "previously a rule had matched a request with the action set to _Interactive Challenge_ or _JS Challenge_ and now that challenge was answered."
0 commit comments