The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →A SecRule evaluates selected variables against an operator, then applies actions if the condition matches. Write the phase and operator explicitly, give every rule a unique ID, and check how your engine handles selectors, defaults, and chains before deploying a rule that can block traffic.
What does each part of a SecRule do?
Coraza documents this canonical form:
SecRule VARIABLES "@OPERATOR OPERATOR_ARGUMENTS" "ACTIONS"
A practical layout is:
SecRule TARGETS "@OPERATOR ARGUMENTS" "id:10001,phase:1,pass,log,msg:'Explain the match'"
- Targets identify the variables or collections to inspect.
- Operator defines how their values are tested, such as equality, substring matching, or a regular expression.
- Actions determine what happens on a match, including logging, metadata updates, or disruption.
Give each rule a unique id. State phase deliberately: Coraza documents phase 2 as the default when it is omitted, so a rule without a phase can inspect request-body data later than intended. The examples here specify both phase and operator rather than relying on defaults. See the Coraza syntax reference for its documented grammar and behavior.
As an Amazon Associate I earn from qualifying purchases.
The quotes and escaping around targets, operator arguments, and actions are interpreted in the configuration context. A value that works in one parser or connector may need different escaping in another; validate the complete rule in the environment where it will run.
How do variable selectors change what a rule inspects?
Selectors can narrow a rule to one mapped key, combine targets, exclude a target, or count collection values. These Coraza examples illustrate different scopes:
#1 Best Overall
- Fortinet Web Application Firewall - virtual appliance for all supported platforms. Supports up to 2 x vCPU core
- Fortinet HW FWB-VM02
- Manufacturer Part: FWB-VM02
SecRule REQUEST_HEADERS:User-Agent "@contains example" "id:10002,phase:1,pass,log a"
SecRule &REQUEST_HEADERS:host "@eq 0" "id:10003,phase:1,deny,status:403"
SecRule REQUEST_HEADERS|!REQUEST_HEADERS:User-Agent "@detectSQLi" "id:10004,phase:1,pass,log"
In the first rule, : selects the User-Agent key from REQUEST_HEADERS. In the second, the leading & counts the selected collection values and tests whether the count equals zero. In the third, | combines targets and ! excludes the named header from the broader selection. These operators affect target selection; they do not change what the match operator means.
Do not assume regex selection of mapped-variable names is portable. Coraza’s syntax reference describes its PCRE-compatible selector as v2-only and says v3 supports RE2. Check the syntax for the exact Coraza release you deploy before using such selectors.
Which operator should you use, and why can a rule match unexpectedly?
Coraza documents @rx as the default operator. Consequently, leaving the operator out does not make the argument a literal string: it is interpreted as a regular expression. Use an explicit operator so the intended semantics are visible in review.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #2
- Fortinet Web Application Firewall - virtual appliance for all supported platforms. Supports up to 4 x vCPU core
- Fortinet HW FWB-VM04
- Manufacturer Part: FWB-VM04
| Intent | Coraza operator | Behavior documented by Coraza |
|---|---|---|
| Exact equality | @streq |
Case-sensitive string equality |
| Substring | @strmatch |
Case-sensitive substring matching |
| Regular expression | @rx |
RE2-based matching |
For case-insensitive substring matching, Coraza’s operator reference recommends applying t:lowercase. Do not assume operators normalize input automatically. The Coraza operator reference describes these behaviors and available operators.
Check regex syntax and dot behavior
Coraza’s @rx implementation uses RE2 syntax, supports up to nine capture groups for use by actions, and enables dotall mode by default. With dotall, . can match a newline. A pattern that relies on PCRE-specific constructs may therefore fail or behave differently when moved to Coraza. Confirm the supported syntax and test representative inputs on the actual engine.
What do SecRule actions do, and what can defaults change?
Actions are comma-separated. Coraza groups them by purpose:
Rank #3
- Fortinet Web Application Firewall - virtual appliance for all supported platforms. Supports up to 8 x vCPU core
- Fortinet HW FWB-VM08
- Manufacturer Part: FWB-VM08
- Disruptive: includes
deny,drop,redirect,allow,block, andpass. - Non-disruptive: includes logging, metadata, and
setvaractions. - Flow: includes
chain,skip, andskipAfter. - Metadata: includes
id,rev, andseverity. - Data: includes
status.
Coraza says only one disruptive action applies per rule; if several are specified, the last takes precedence. A disruptive action does not execute when SecRuleEngine is set to DetectionOnly. The Coraza actions reference documents action categories, pass, and this DetectionOnly behavior.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemspass means continue processing; it is not an allowlist decision. A rule with pass can still match and perform non-disruptive actions such as logging or variable updates.
Rules can also inherit actions from SecDefaultAction. Coraza documents that default actions combine with a rule’s actions and that rule actions override applicable defaults. When reviewing a short rule, inspect the effective configuration—including its applicable defaults—rather than treating the inline action list as the whole policy. See the Coraza directives reference.
Rank #4
- Meraki MX100: A building block for SASE in a rack-mountable form factor. Medium- to large-branch security and SD-WAN appliance for up to 500 users.
- WAN: 1 x GbE RJ45, 1 x USB (cellular failover), Dual-purpose: 1 x GbE RJ45 +++ LAN: 8 x GbE RJ45, 2 x GbE SFP
- Stateful firewall throughput: 750 Mbps +++ 500 Mbps site-to-site VPN throughput
- Unified management for security, SD-WAN, Wi-Fi, switching, MDM, and IoT +++ Centralized management via web-based dashboard or API
- True zero-touch provisioning +++ Smartphone-like firmware updates
How do chained SecRules work?
A chain combines conditions: the chained condition succeeds only when the required linked conditions match. Do not read each line as an independent rule with separate blocking behavior. The starter rule defines the chain’s entry point, and the disruptive action takes effect only if the chain succeeds.
Action-placement details depend on engine and version. The OWASP ModSecurity 2.x manual places disruptive, phase, metadata, and flow actions on the chain starter; non-disruptive actions may appear on members. That is a version-scoped ModSecurity 2.x rule, not proof that every Coraza release or connector follows identical rules. Before porting a chain, check the documentation for the target engine and version. The OWASP ModSecurity 2.x manual documents the v2 placement behavior.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchHow should macros and dynamic values be handled?
Coraza documents macro expansion in the form %{VARIABLE.KEY}, including use in action values such as logdata and setvar. For example, a macro in an action value supplies dynamic data to that action; it does not by itself change the operator’s match input.
Best Value
- ◆Powerful Celeron N2840 Processor: N2840 Processor, 2 Cores 2 Threads, 1M Cache, Max Turbo Frequency 2.58 GHz, TDP 7.5 W. Whether you need a robust home server, a versatile tool for school education, seamless web browsing, or even efficient business office or industrial tasks, providing efficient performance for everyday tasks.
- ◆Dual 1000M LAN: Mini Router PC with 2*Realtek RTL8111H network card chip full UDE 1000M with filter connector.Soft Router can monitor network data, improve network security, powerful and widely used.
- ◆DDR3L Memory & Large Storage Capacity: Firewall box computer with 1 x DDR3L SO-DIMM memory 1333/1600MHz, 1xMSATA3.0 SSD.
- ◆UHD Graphics & 4K Dual Screen Display: N2840 processor integrated UHD Graphics, HD and VGA dual display interfaces support 4K@60Hz.
- ◆Versatile Connections ports: 2 x1000M Realtek RTL8111H-LAN,2 xUSB3.0, 4 xUSB2.0, HDMI,VGA,AUDIO supports data storage and system boot.Mini desktop computer with WIFI dual antenna, which providing high-speed transmission and reliable connectivity. Support Dual Band Wifi, Internet, streaming media and audio can be used perfectly without interrupting the connection. Enjoy faster file transfers and smoother online experiences.
Quote and escape punctuation carefully in the configuration context. The documented macro form does not establish one universal escaping rule for every connector, so test the complete rule using the parser and connector that will load it.
What should you check before enabling a rule?
- Confirm the engine and version. Separate Coraza v2, Coraza v3, and ModSecurity 2.x behavior where their documentation differs; verify the connector too.
- Make the rule’s intent explicit. Use a unique
id, an intentionalphase, and an explicit operator. - Review target scope. Check whether the rule inspects one key, a combined collection, or a broad target set with exclusions.
- Check inherited actions. Read the applicable
SecDefaultActionand effective engine mode, not only the local action string. - Validate regex portability. Check RE2 compatibility, dotall behavior, and any capture groups used by actions.
- Review chain placement. Confirm which conditions are linked and whether actions are placed where the target engine permits them.
- Test before blocking. Verify expected matches and non-matches with the exact engine and connector. A disruptive action will not execute in Coraza DetectionOnly mode.
If a rule produces false positives, consider whether a narrow target update or exclusion can address the problem before disabling a broader ruleset. Coraza’s directive reference documents target-update directives; their precise effect depends on the installed ruleset and engine.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Recommended Free Tools




