Create a filter
Last updated Jun 30, 2026 A filter modifies Advanced TCP Protection's execution mode — monitoring, mitigation (enabled), or disabled — for all incoming packets matching an expression.
Each protection system component (SYN flood protection or out-of-state TCP protection) should have at least one rule, but filters are optional.
Note
Filters only apply to Advanced TCP Protection.
Procedure
To create a filter for one of the system components:
- In the Cloudflare dashboard, go to the L3/4 DDoS protection page. Go to DDoS Managed Rules ↗
- Go to Advanced Protection > Advanced TCP Protection.
- Under the system component for which you are creating the filter (SYN Flood Protection or Out-of-state TCP Protection), select Create next to the type of filter you want to create:
- Mitigation Filter: The protection system will drop packets matching the filter expression. - Monitoring Filter: The protection system will log packets matching the filter expression.
- Off Filter: The protection system will ignore packets matching the filter expression.
- Under When incoming packets match, define a filter expression using the Expression Builder (specifying one or more values for Field, Operator, and Value), or manually enter an expression using the Expression Editor. For more information, refer to Edit rule expressions.
- Select Save.
Note
Filters take precedence over rules. For details on how the execution mode is determined, refer to Determining the execution mode.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/ddos-protection/advanced-ddos-systems/how-to/create-filter/#page","headline":"Create a filter","description":"Create a filter to define traffic characteristics for Advanced TCP Protection rules.","url":"https://developers.cloudflare.com/ddos-protection/advanced-ddos-systems/how-to/create-filter/","inLanguage":"en","image":"https://developers.cloudflare.com/ddos-protection/advanced-ddos-systems/how-to/create-filter/og.png?v=00e601f976fd4bdc","dateModified":"2026-06-30","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Create an Advanced DDoS Protection rule for TCP, DNS, or flow-based mitigation. title: Create a rule image: https://developers.cloudflare.com/ddos-protection/advanced-ddos-systems/how-to/create-rule/og.png?v=91dd576da03f876a
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/ddos-protection/llms.txt
Use this file to discover all available pages before exploring further.
Docs