Skip to content

Commit a2f0e32

Browse files
[DDoS Protection] L3/4 managed ruleset override guidance updates (#27209)
* [DDoS Protection] L3/4 managed ruleset override guidance updates This change introduces a fix to a mix-up in the logic of how Network-layer DDoS Attack Protection managed ruleset override expressions work and adds some additional context, guidance, and recommendations on how effectively utilize them. * Apply suggestions from code review --------- Co-authored-by: Patricia Santa Ana <103445940+patriciasantaana@users.noreply.github.com>
1 parent f72c180 commit a2f0e32

File tree

2 files changed

+27
-11
lines changed

2 files changed

+27
-11
lines changed

src/content/docs/ddos-protection/managed-rulesets/network/network-overrides/override-examples.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ The following scenarios detail how you can make use of override rules as a solut
1717

1818
### VPN traffic is blocked by a UDP rule
1919

20-
If you have VPN traffic concentrated to a single or a few single destination IP addresses and the traffic is being blocked by a UDP rule, you can create an override rule for the UDP rule to the destination IPs or ranges.
20+
If you have VPN traffic concentrated to a single or a few single destination IP addresses and the traffic is being blocked by a UDP rule, you can create an override rule for the UDP rule to the destination IPs or ranges.
2121

2222
:::note
23-
The override only applies to the fingerprint and not the detection. Refer to [Important remarks](/ddos-protection/managed-rulesets/network/network-overrides/override-expressions/#important-remarks) for more information.
23+
The override only applies to the detection and not the fingerprint generated and used for mitigation. Refer to [Important remarks](/ddos-protection/managed-rulesets/network/network-overrides/override-expressions/#important-remarks) for more information.
2424
:::
2525

2626
### Attack traffic is flagged by the adaptive rule based on UDP and destination port

src/content/docs/ddos-protection/managed-rulesets/network/network-overrides/override-expressions.mdx

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,20 @@ head:
1111

1212
import { GlossaryTooltip } from "~/components"
1313

14-
Set an override expression for the Network-layer DDoS Attack Protection managed ruleset to define a specific scope for [sensitivity level](/ddos-protection/managed-rulesets/network/override-parameters/#sensitivity-level) or [action](/ddos-protection/managed-rulesets/network/override-parameters/#action) adjustments. For example, you can set different sensitivity levels for different destination IP addresses or ports: a medium sensitivity level for destination IP address `A` and a low sensitivity level for destination IP address `B`.
14+
Set an override expression for the Network-layer DDoS Attack Protection managed ruleset to define a specific scope for [sensitivity level](/ddos-protection/managed-rulesets/network/override-parameters/#sensitivity-level) or [action](/ddos-protection/managed-rulesets/network/override-parameters/#action) adjustments.
15+
16+
When considering which, if any, expressions you should utilize, think of expressions as a tool to scope overrides to the specific service that the Network-layer DDoS Attack Protection managed ruleset is protecting. That is to say that most services are defined by their destination ports and IPs as opposed to source ports or IPs. Refer to [Imporant remarks](/ddos-protection/managed-rulesets/network/network-overrides/#important-remarks) for more information.
17+
18+
For example, you can set different sensitivity levels for different destination IP addresses or ports: a medium sensitivity level for destination IP address `A` and a low sensitivity level for destination IP address `B`.
1519

1620
## Available expression fields
1721

18-
You can use the following fields in override expressions:
22+
The following fields are made available for use in override expressions.
23+
24+
The list of fields we recommend using in expressions:
1925

20-
- `ip.src`
2126
- `ip.dst`
2227
- `ip.proto.num`
23-
- `ip.len`
24-
- `ip.ttl`
25-
- `tcp.srcport`
2628
- `tcp.dstport`
2729
- `tcp.flags`
2830
- `tcp.flags.ack`
@@ -31,16 +33,30 @@ You can use the following fields in override expressions:
3133
- `tcp.flags.reset`
3234
- `tcp.flags.syn`
3335
- `tcp.flags.urg`
34-
- `udp.srcport`
3536
- `udp.dstport`
3637

38+
The list of fields we do not recommend to be used in expressions:
39+
40+
- `ip.src`
41+
- `ip.len`
42+
- `ip.ttl`
43+
- `tcp.srcport`
44+
- `udp.srcport`
45+
3746
Refer to the [Fields reference](/ruleset-engine/rules-language/fields/reference/) in the Rules language documentation for more information.
3847

3948
## Important remarks
4049

41-
- Each expression is limited to 4,000 characters, which means you can enter approximately a maximum of 200 IP addresses in a single expression. However, you can enter IP addresses in CIDR format, which allows you to include a larger number of IP addresses. For example, you can use `192.0.0.0/24` to match IP addresses from `192.0.0.0` to `192.0.0.255`.
42-
- Override expressions are not allowlists. They apply to the mitigation, not during detection. This means an override only takes effect if the attack fingerprint — as generated by the DDoS managed rules — includes the same fields specified in your expression.
50+
### Recommended vs. non-recommended fields
51+
52+
Override expressions are not allowlists. Overrides are applied to the detection, and are not applied to the resulting mitigation. This means an override only takes effect if the attack fingerprint, as generated by the DDoS managed rules, includes the same fields specified in your expression. Thus, it makes the use of source fields like `ip.src`, `ip.len`, `ip.ttl`, `tcp.srcport`, and `udp.srcport` unreliable.
53+
54+
The use of non-recommended fields in an expression may result in unexpected behavior. While you may be inclined to utilize source properties, the expressions are not allowlists and including source traffic properties may result in false positives.
4355

4456
For example, if you create an override with sensitivity set to `Essentially Off` for `ip.src eq 192.0.2.1`, it only applies if the fingerprint includes `ip.src`. However, because DDoS attacks are often distributed across many source IPs, the fingerprint may not include `ip.src` at all. In such cases, your override is not applied.
4557

4658
In a common scenario, an attack originating from thousands of IPs can target a single destination IP and port. The fingerprint would focus on the shared attributes, such as the destination IP, port, and additional packet fields that represent strong signals of the attack pattern. Even if your override matches a specific source IP, it will not apply if that field is not present in the fingerprint. As a result, the system will mitigate the attack using the default high sensitivity, and traffic from your specified IP could still be blocked. It is recommended to use more stable expressions such as protocol, destination IP, and destination port.
59+
60+
### Character limits
61+
62+
Each expression is limited to 4,000 characters, which means you can enter approximately a maximum of 200 IP addresses in a single expression. However, you can enter IP addresses in CIDR format, which allows you to include a larger number of IP addresses. For example, you can use `192.0.0.0/24` to match IP addresses from `192.0.0.0` to `192.0.0.255`.

0 commit comments

Comments
 (0)