INTEGRITY Cloudflare Docs

Concepts

Prefixes

Advanced DDoS Protection protects the IP prefixes you select from sophisticated DDoS attacks. A prefix can be an IP address or an IP range in CIDR format. You must add prefixes to Advanced DDoS Protection so that Cloudflare can analyze incoming packets and offer protection against sophisticated TCP DDoS attacks.

Prefixes added to Advanced DDoS Protection must be one of the following:

You cannot add a prefix (or a subset of a prefix) that you have not onboarded to Magic Transit or whose status is still Unapproved. Contact your account team to get help with prefix approvals.

Allowlist

The Advanced DDoS Protection allowlist is a list of prefixes that will bypass all configured Advanced DDoS Protection rules.

For example, you could add prefixes used only by partners of your company to the allowlist so that they are exempt from packet inspection and mitigation actions performed by Advanced DDoS Protection.

Rule

A rule configures Advanced DDoS Protection for a given scope, according to several settings: execution mode, burst sensitivity, and rate sensitivity.

Each system component (SYN flood protection and out-of-state TCP protection) has its own list of rules, and it should have at least one rule.

Rule settings

Each rule type has the following settings: scope, mode, burst sensitivity, and rate sensitivity.

You may need to adjust the burst or rate sensitivity of a rule in case of false positives or due to specific traffic patterns.

Scope

Advanced TCP Protection rules can have one of the following scopes:

The rule scope allows you to adjust the system's tolerance for out-of-state packets in locations where you may have more or less traffic than usual, or due to any other networking reasons.

When multiple rules with different scopes apply to a data center, the rule with the most specific scope takes precedence. For example, if you have both a region rule (such as Western Europe) and a data center rule (such as Marseille), traffic through Marseille will be processed according to the data center rule.

Besides defining rules with one of the above scopes, you must also select the prefixes that you wish to protect with Advanced TCP Protection.

Mode

The Advanced TCP Protection system constantly learns your TCP connections to mitigate DDoS attacks. Advanced TCP Protection rules can have one of the following execution modes: monitoring, mitigation (enabled), or disabled.

Burst sensitivity

The burst sensitivity is the rule's sensitivity to short-term bursts in the packet rate:

The default burst sensitivity is Medium.

Rate sensitivity

The rate sensitivity is the rule's sensitivity to the sustained packet rate:

The default rate sensitivity is Medium.

Profile sensitivity

The sensitivity to DNS queries that have not been recently seen.

The default profile sensitivity and recommended setting is Low. You should only increase sensitivity if it is needed based on observed attacks.

Filter

A filter modifies Advanced TCP Protection's execution mode — monitoring, mitigation (enabled), or disabled — for all incoming packets matching an expression.

The filter expression can reference source and destination IP addresses and ports. Each system component (SYN flood protection and out-of-state TCP protection) should have one or more rules, but filters are optional.

Each system component has its own filters. You can configure a filter for each execution mode:

When there is a match, a filter will alter the execution mode for all configured rules in a given system component (SYN flood protection or out-of-state TCP protection), including disabled rules.

For instructions on creating filters in the Cloudflare dashboard, refer to Create a filter. For API examples, refer to Common API calls.

Example use case

You can create a monitor filter for a new prefix that you are onboarding by using the expression to match against the prefix.

Your already onboarded prefixes can remain protected with one or more configured rules in mitigation mode.

When onboarding a new prefix, you would configure a monitoring filter for this prefix and then add it to Advanced TCP Protection.


Determining the execution mode

When you have both rules and filters configured, the execution mode is determined according to the following:

  1. If there is a match for one of the configured filters, use the filter's execution mode. The filter evaluation order is based on their mode, in the following order:
    1. Mitigation filter (filter with enabled mode)
    2. Monitoring filter (filter with monitoring mode)
    3. Off filter (filter with disabled mode)
  2. If no filter matched, use the execution mode determined by existing rules.
  3. If no rules match, disable Advanced TCP Protection.

Mitigation reasons

The Advanced TCP Protection system applies mitigation actions for different reasons based on the connection states. The Mitigation reason field shown in the Advanced TCP Protection tab of the Network Analytics dashboard will contain more information on why a given packet was dropped by the system.

The connection states are the following:

The mitigation reasons are the following:

Reason Description
Unexpected Packet dropped because it was not expected given the current state of the TCP connection it was associated with.
Challenge needed Packet challenged because the system determined that the packet is most likely part of a packet flood.
Challenge passed Packet dropped because it belongs to a solved challenge.
Not found Packet dropped because it is not part of an existing TCP connection and it is not establishing a new connection.
Out of sequence Packet dropped because its properties (for example, TCP flags or sequence numbers) do not match the expected values for the existing connection.
Already closed Packet dropped because it belongs to a connection that is already closed.

Mitigation will only occur based on your Advanced TCP Protection configuration (rule sensitivities, configured allowlists and prefixes). The protection system will provide some tolerance to out-of-state packets to accommodate for the natural randomness of Internet routing.