|
1 | 1 | --- |
2 | 2 | pcx_content_type: troubleshooting |
3 | 3 | source: https://support.cloudflare.com/hc/en-us/articles/200172016-Understanding-WAF-managed-rules-Web-Application-Firewall- |
4 | | -title: Troubleshooting |
| 4 | +title: Troubleshoot WAF managed rules (previous version) |
5 | 5 | sidebar: |
6 | 6 | order: 2 |
7 | | -head: |
8 | | - - tag: title |
9 | | - content: Troubleshoot WAF managed rules (previous version) |
| 7 | + label: Troubleshooting |
10 | 8 | noindex: true |
11 | 9 | --- |
12 | 10 |
|
13 | 11 | By default, WAF managed rules are fully managed via the Cloudflare dashboard and are compatible with most websites and web applications. However, false positives and false negatives may occur: |
14 | 12 |
|
15 | | -* **False positives**: Legitimate requests detected and filtered as malicious. |
16 | | -* **False negatives**: Malicious requests not filtered. |
| 13 | +- **False positives**: Legitimate requests detected and filtered as malicious. |
| 14 | +- **False negatives**: Malicious requests not filtered. |
17 | 15 |
|
18 | 16 | ## Troubleshoot false positives |
19 | 17 |
|
20 | 18 | The definition of suspicious content is subjective for each website. For example, PHP code posted to your website is normally suspicious. However, your website may be teaching how to code and it may require PHP code submissions from visitors. In this situation, you should disable related managed rules for this website, since they would interfere with normal website operation. |
21 | 19 |
|
22 | | -To test for false positives, set WAF managed rules to *Simulate* mode. This mode allows you to record the response to possible attacks without challenging or blocking incoming requests. Also, review the Security Events' [sampled logs](/waf/analytics/security-events/#sampled-logs) to determine which managed rules caused false positives. |
| 20 | +To test for false positives, set WAF managed rules to _Simulate_ mode. This mode allows you to record the response to possible attacks without challenging or blocking incoming requests. Also, review the Security Events' [sampled logs](/waf/analytics/security-events/#sampled-logs) to determine which managed rules caused false positives. |
23 | 21 |
|
24 | 22 | If you find a false positive, there are several potential resolutions: |
25 | 23 |
|
26 | | -* **Add the client’s IP addresses to the [IP Access Rules](/waf/tools/ip-access-rules/) allowlist:** If the browser or client visits from the same IP addresses, allowing is recommended. |
27 | | -* **Disable the corresponding managed rule(s)**: Stops blocking or challenging false positives, but reduces overall site security. A request blocked by Rule ID `981176` refers to OWASP rules. Decrease OWASP sensitivity to resolve the issue. |
28 | | -* **Bypass WAF managed rules with a firewall rule (deprecated):** [Create a firewall rule](/firewall/cf-dashboard/create-edit-delete-rules/#create-a-firewall-rule) with the *Bypass* action to deactivate WAF managed rules for a specific combination of parameters. For example, [bypass managed rules](/firewall/cf-firewall-rules/actions/) for a specific URL and a specific IP address or user agent. |
29 | | -* **(Not recommended) Disable WAF managed rules for traffic to a URL:** Lowers security on the particular URL endpoint. Configured via [Page Rules](/rules/page-rules/). |
| 24 | +- **Add the client’s IP addresses to the [IP Access Rules](/waf/tools/ip-access-rules/) allowlist:** If the browser or client visits from the same IP addresses, allowing is recommended. |
| 25 | +- **Disable the corresponding managed rule(s)**: Stops blocking or challenging false positives, but reduces overall site security. A request blocked by Rule ID `981176` refers to OWASP rules. Decrease OWASP sensitivity to resolve the issue. |
| 26 | +- **Bypass WAF managed rules with a firewall rule (deprecated):** [Create a firewall rule](/firewall/cf-dashboard/create-edit-delete-rules/#create-a-firewall-rule) with the _Bypass_ action to deactivate WAF managed rules for a specific combination of parameters. For example, [bypass managed rules](/firewall/cf-firewall-rules/actions/) for a specific URL and a specific IP address or user agent. |
| 27 | +- **(Not recommended) Disable WAF managed rules for traffic to a URL:** Lowers security on the particular URL endpoint. Configured via [Page Rules](/rules/page-rules/). |
30 | 28 |
|
31 | 29 | Additional guidelines are as follows: |
32 | 30 |
|
33 | | -* If one specific rule causes false positives, set rule’s **Mode** to *Disable* rather than turning *Off* the entire rule **Group**. |
34 | | -* For false positives with the administrator section of your website, create a [page rule](/rules/page-rules/) to **Disable Security** for the admin section of your site resources — for example, `example.com/admin`. |
| 31 | +- If one specific rule causes false positives, set rule’s **Mode** to _Disable_ rather than turning _Off_ the entire rule **Group**. |
| 32 | +- For false positives with the administrator section of your website, create a [page rule](/rules/page-rules/) to **Disable Security** for the admin section of your site resources — for example, `example.com/admin`. |
35 | 33 |
|
36 | 34 | ## Troubleshoot false negatives |
37 | 35 |
|
38 | 36 | To identify false negatives, review the HTTP logs on your origin web server. To reduce false negatives, use the following checklist: |
39 | 37 |
|
40 | | -* Are WAF managed rules enabled in **Security** > **WAF** > **Managed rules**? |
| 38 | +- Are WAF managed rules enabled in **Security** > **WAF** > **Managed rules**? |
41 | 39 |
|
42 | | -* Are WAF managed rules being disabled via [Page Rules](/rules/page-rules/)? |
| 40 | +- Are WAF managed rules being disabled via [Page Rules](/rules/page-rules/)? |
43 | 41 |
|
44 | | -* Not all managed rules are enabled by default, so review individual managed rule default actions. |
| 42 | +- Not all managed rules are enabled by default, so review individual managed rule default actions. |
| 43 | + - For example, Cloudflare allows requests with empty user agents by default. To block requests with an empty user agent, change the rule **Mode** to _Block_. |
| 44 | + - Another example: if you are looking to block unmitigated SQL injection attacks, make sure the relevant SQLi rules are enabled and set to _Block_ under the **Cloudflare Specials** group. |
45 | 45 |
|
46 | | - * For example, Cloudflare allows requests with empty user agents by default. To block requests with an empty user agent, change the rule **Mode** to *Block*. |
47 | | - * Another example: if you are looking to block unmitigated SQL injection attacks, make sure the relevant SQLi rules are enabled and set to *Block* under the **Cloudflare Specials** group. |
| 46 | +- Are DNS records that serve HTTP traffic proxied through Cloudflare? |
48 | 47 |
|
49 | | -* Are DNS records that serve HTTP traffic proxied through Cloudflare? |
| 48 | +- Is a firewall rule [bypassing](/firewall/cf-firewall-rules/actions/#supported-actions) managed rules? |
50 | 49 |
|
51 | | -* Is a firewall rule [bypassing](/firewall/cf-firewall-rules/actions/#supported-actions) managed rules? |
| 50 | +- Does an allowed country, ASN, IP range, or IP address in [IP Access rules](/waf/tools/ip-access-rules/) or [firewall rules](/firewall/cf-firewall-rules/) match the attack traffic? |
52 | 51 |
|
53 | | -* Does an allowed country, ASN, IP range, or IP address in [IP Access rules](/waf/tools/ip-access-rules/) or [firewall rules](/firewall/cf-firewall-rules/) match the attack traffic? |
54 | | - |
55 | | -* Is the malicious traffic reaching your origin IP addresses directly to bypass Cloudflare protection? Block all traffic except from [Cloudflare's IP addresses](/fundamentals/concepts/cloudflare-ip-addresses/) at your origin web server. |
| 52 | +- Is the malicious traffic reaching your origin IP addresses directly to bypass Cloudflare protection? Block all traffic except from [Cloudflare's IP addresses](/fundamentals/concepts/cloudflare-ip-addresses/) at your origin web server. |
0 commit comments