Rule Actions: Firewall, Gateway, DDoS Mitigation, and Log Fields
What security rule actions do on match, which values appear in Cloudflare Logpush datasets, and how firewall, Gateway, and DDoS actions differ.
This page summarises Cloudflare documentation on actions: what a rule does when its expression matches, and how products encode that outcome in Logpush and analytics fields named Action, Decision, or related names. The same word covers both configuration (you choose block, log, managed_challenge, and so on) and telemetry (each log line records the action Cloudflare applied).
Rule actions: what happens when a rule matches
Section titled “Rule actions: what happens when a rule matches”A rule action is the handling Cloudflare applies after the rule expression matches.
The action of a rule tells Cloudflare how to handle matches for the rule expression.
— Cloudflare, Actions (Rules language)
For classic firewall rules (now deprecated in favour of WAF custom rules), the same idea applies at the HTTP layer:
The action of a firewall rule tells Cloudflare how to handle HTTP requests that have matched the rule expression.
— Cloudflare, Firewall rules actions
Firewall Events Action: log codes for HTTP security
Section titled “Firewall Events Action: log codes for HTTP security”The firewall_events dataset (account and zone scopes) records the outcome of Cloudflare Firewall processing per request.
What the Action field means in firewall logs
Section titled “What the Action field means in firewall logs”Action is the first-class firewall code for what Cloudflare did on that request.
The code of the first-class action the Cloudflare Firewall took on this request.
— Cloudflare, Firewall Events (account)
Documented values include allow, block, challenge, jschallenge, log, bypass, several managedchallenge* and challenge* solved/bypassed variants, connectionclose, and others listed on the same dataset pages.
Which product fired: Source, RuleID, and Ref
Section titled “Which product fired: Source, RuleID, and Ref”To connect a log line to policy, use fields alongside Action:
| Field | Role |
|---|---|
Source |
Which Cloudflare security product triggered the request (waf, firewallrules, botmanagement, ratelimit, apishield, dlp, and others). |
RuleID |
Product-specific rule identifier for the triggered rule. |
Ref |
Your user-defined rule label (settable via Rulesets API for some products). |
Description |
Description of the rule that matched. |
Kind |
Event kind; currently only firewall. |
Source possible values are documented on Firewall Events (account).
Rule chain order: MatchIndex
Section titled “Rule chain order: MatchIndex”When multiple rules match, MatchIndex shows position in the evaluation chain:
Rules match index in the chain. The last matching rule will have MatchIndex 0. If another rule matched before the last one, it will have MatchIndex 1.
— Cloudflare, Firewall Events (account)
The terminating match is MatchIndex 0; earlier matches use 1, 2, and so on. Use this when debugging “why did the client see allow but I expected block?”
Leaked credentials alongside firewall Action
Section titled “Leaked credentials alongside firewall Action”For login-related paths, LeakedCredentialCheckResult may appear with values such as password_leaked, username_and_password_leaked, username_password_similar, username_leaked, or clean — see Firewall Events (account).
HTTP request logs: SecurityAction vs full firewall Action
Section titled “HTTP request logs: SecurityAction vs full firewall Action”The http_requests dataset (and zone variant) adds security context without replacing firewall_events:
SecurityAction— action of the security rule that triggered a terminating action, if any.SecurityRuleID/SecurityRuleDescription— identifying metadata for that terminating rule.LeakedCredentialCheckResult— same leaked-credential enum as firewall events.
EdgePathingOp, EdgePathingSrc, and EdgePathingStatus classify how the request was handled at the edge (unknown when no specific classification or data). Bot Management customers may see BotScoreSrc (for example Machine Learning, Verified Bot); enabling that feature requires contacting the account team per HTTP Requests (account).
Gateway actions: DNS, HTTP, and network sessions
Section titled “Gateway actions: DNS, HTTP, and network sessions”Cloudflare Zero Trust Gateway logs use Action (and policy identifiers) per layer.
Gateway HTTP Action and policy fields
Section titled “Gateway HTTP Action and policy fields”On Gateway HTTP, Action is the action Gateway performed on the HTTP request. Related fields include PolicyID, PolicyName, file-blocking fields (BlockedFileHash, BlockedFileReason, BlockedFileType), ForensicCopyStatus, Onramp (traffic source type), and UntrustedCertificateAction (none, block, error, or passThrough for certificate errors).
Gateway DNS resolver decisions
Section titled “Gateway DNS resolver decisions”Gateway DNS records resolver policy outcomes: PolicyID, PolicyName, ResolverPolicyID, ResolverPolicyName, ResolverDecision (for example overrideForSafeSearch), QueryTypeName, and CustomResolverResponse. Some fields are deprecated in favour of ResolverPolicyID / ResolverPolicyName as noted on that page.
Gateway network sessions
Section titled “Gateway network sessions”Gateway Network logs Action on the session plus PolicyID, PolicyName, and Onramp.
DLP forensic copies tied to Gateway rules
Section titled “DLP forensic copies tied to Gateway rules”When Gateway firewall rules trigger DLP forensic capture, DLP Forensic Copies include TriggeredRuleID and Phase (request or response).
DDoS managed ruleset override actions (HTTP and network)
Section titled “DDoS managed ruleset override actions (HTTP and network)”Override action in DDoS managed rulesets is separate from firewall log enums but uses overlapping ideas (block, log, challenges).
HTTP DDoS override action values
Section titled “HTTP DDoS override action values”From HTTP DDoS override parameters:
| User-facing name | API action |
Behaviour (summary) |
|---|---|---|
| Block | block |
Blocks matching HTTP requests. |
| Managed Challenge | managed_challenge |
Dynamic challenge type based on request characteristics. |
| Interactive Challenge | challenge |
Interactive challenge to matching clients. |
| Log | log |
Enterprise + Advanced DDoS Protection; logs matches for validation before stricter actions. |
Internal-only actions (not settable in overrides) include Connection Close, Force Connection Close, and DDoS Dynamic, as described on the same page.
Network-layer DDoS override action values
Section titled “Network-layer DDoS override action values”From Network DDoS override parameters:
log— Enterprise; logs packets matching network DDoS rules (recommended before switching to block).block— Blocks IP packets matching the rule at configured sensitivity.DDoS Dynamic— internal; may block or apply undisclosed mitigation.
Network Analytics: packet Outcome and MitigationSystem
Section titled “Network Analytics: packet Outcome and MitigationSystem”Network Analytics Logs use Outcome (pass | drop) and Verdict (pass | drop), with MitigationSystem values dosd, flowtrackd, or magic-firewall. The Network Analytics v1 to v2 migration guide maps dosd to DDoS managed rulesets, flowtrackd to Advanced TCP Protection, and magic-firewall to Cloudflare Network Firewall.
Magic IDS Detections use a simpler Action: pass or block.
Rate limiting rule action
Section titled “Rate limiting rule action”When a rate limit threshold is reached, the rule’s action field (API name action) accepts block, js_challenge, managed_challenge, challenge, or log per Rate limiting parameters. With block, you can customise response type, status code, and body. Legacy rate limiting described mitigations as action plus ban duration on Rate Limiting (previous version).
Other Logpush datasets that record actions or decisions
Section titled “Other Logpush datasets that record actions or decisions”These are narrower but use the same “what did the product do?” pattern:
| Dataset | Field | Meaning |
|---|---|---|
| Browser Isolation User Actions | Decision |
allow or block on user actions (copy, paste, download, etc.). |
| Page Shield Events | Action |
log or allow for CSP violations. |
| Turnstile Events | Action |
Customer-configured widget action string; EventType covers challenge lifecycle. |
| Access Requests | Action |
Record type login or logout. |
Common mistakes when reading or configuring actions
Section titled “Common mistakes when reading or configuring actions”- Confusing log
Actionwith override API values — Firewall log codes likejschallengesolvedare telemetry; DDoS overrides use API strings likemanaged_challenge. Normalise in your SIEM with explicit field names. - Ignoring
MatchIndex— Only the last match (0) is the effective terminating rule for firewall events; earlier matches may explain side effects or logging rules. - Using
logon DDoS without plan/feature — HTTP and networklogactions are tied to Enterprise (and HTTP log also requires Advanced DDoS Protection) per override parameter docs. - Expecting Gateway HTTP
Actionto equal firewallAction— Gateway policies and CDN/WAF firewall are different pipelines; correlate withPolicyID/Source, not assume identical enums. - Deprecated firewall rules — New work should follow WAF custom rules; old “firewall rule action” wording still appears in logs and migration docs.
How to check this on your site
Section titled “How to check this on your site”-
In the Cloudflare dashboard, open Security → Events (or equivalent for your product) and confirm the action shown for a test request matches the rule action you configured.
-
If you use Logpush, enable or inspect the relevant dataset (
firewall_events,gateway_http, orhttp_requests) and verifyAction,RuleID,Ref, andMatchIndexon a controlled test hit. -
For DDoS tuning, temporarily set override
actiontologper HTTP or network documentation, then review logged traffic in Analytics as referenced there. -
For network attack visibility, confirm
MitigationSystemandOutcomein Network Analytics Logs align with migration guide definitions. -
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact wording you are asking about, and we will correct or clarify it.