Skip to content

Coraza WAF rules

Requires WHP super admin access. These features are unlocked for customers with a WHP super admin role on the server — for example, anyone running a Virtual Dedicated Server. Customers without super admin won’t see these pages.

Coraza is an open-source web-application firewall (WAF) that runs as a sidecar in front of your sites. The Coraza Rules page in the admin sidebar gives you a UI to set the global mode, tune individual rules, and review detections and blocked requests — all without rebuilding the sidecar image.

Coraza Rules page — Firing rules tab

The mode is set in Server Settings → Security (the change link next to the pill on the Coraza Rules page takes you there). The same names are used in both places: Off, Detect only and Enforce.

ModeWhat happens to a matching request
OffNo inspection. The WAF sidecar is stopped and requests pass untouched.
Detect onlyRules are evaluated and logged to the WAF audit log. A small set of always-on, high-confidence protections still blocks in this mode too: probes for sensitive files (/etc/passwd, .env, .git), remote command execution, PHP and Java code injection (including Log4Shell), restricted file types such as .bak and .sql, and known CVE exploits. Everything else is logged only.
EnforceThe same always-on protections, plus two body checks: a complete multipart or JSON request body that fails to parse is rejected, and so is a JSON body with more than 1000 arguments (the visitor gets the same 403 block page with a reference ID as for any other block). SQL injection, cross-site scripting, scanner signatures and the anomaly score are logged but not blocked, to avoid breaking legitimate sites and editors.

The WAF is fail-open: if the Coraza sidecar is itself unhealthy, traffic still flows.

Super admin access is granted to the root user only. Sign in directly at https://<your-server-hostname>:8443 with the root credentials.

The WHMCS client portal route doesn’t apply for super admin — it signs you in as the linked customer, not as root.

The default view. Each row is a rule that has matched at least one request in the selected time window (toggle Last 24h or Last 7d at top right).

Columns:

  • Rule ID — the CRS or custom rule identifier. view opens the rule definition. Ask AI opens an explanation of what this rule catches.
  • Hits — how many times the rule fired in the time window.
  • Top hosts — the top customer domains that triggered this rule (with per-host hit counts).
  • Top URIs — the most common request paths that triggered it (helpful for distinguishing scans from real traffic).
  • State — per-rule override of the global mode. Options: (default → …), enforce, detect, off. The text after the arrow is what the rule does today (for example detect, score or enforce), based on the global mode and the built-in high-confidence list. A rule marked score only adds to the anomaly score and is logged, not blocked, in either mode (the rule 949110 that totals the score blocks only a request that has already matched one of the always-on protections). Picking enforce, detect or off overrides the default for that rule.
  • Per-host — opens a Hosts (N) drawer to set per-host overrides for that rule.

The full OWASP Core Rule Set catalogue (v4 families: 901, 905, 911, 913, 920–922, 930–934, 941–944, 949, 950–956, 959, 980). Use this when you want to look up a rule that hasn’t fired yet — for example, to pre-mute a rule you know will produce false positives on a specific app.

The most recent 100 rule and exception changes (who changed what, and when), plus the status of the reconciler that applies your changes to the WAF. It also lists sites in emergency mode and any changes that could not be applied. This tab is a change log, not a list of blocked requests; for those, see Reviewing detections below.

Every change customers have made themselves (for example excluding a rule on their own site), most recent first.

  1. Make sure the server is in Detect only mode (or use the Per-host drawer to keep the rules you are testing at detect for that site).
  2. Drive normal traffic for at least 24 hours.
  3. Open Firing rules and check which rules fired for that host. Confirm no legitimate request is matching a rule that would block (the ones whose default is enforce; these block in both modes).
  4. Switch the mode to Enforce in Server Settings → Security. This adds the body-parse and JSON-argument-count rejections; the always-on protections were already active.
  1. Find the rule in Firing rules.
  2. Click Per-host → Hosts (N) to add a per-site mute, OR change the rule’s State column to mute it globally.

Prefer per-host. Global mute weakens the WAF for every site.

The WAF produces two different kinds of records, and they live in different places on the Coraza Rules page:

You want to seeWhere to lookDoes the visitor see anything?
Logged detections — rules that matched but let the request through (in either mode, every rule outside the always-on set)Firing rules tab. A rule whose State reads (default → detect) or (default → score) is log-only, with one exception: 949110, which totals the score, blocks only a request that has also matched an always-on protection.No. The page loads normally, so there is no block page and no reference ID.
Blocked requests — requests the WAF actually stoppedFiring rules tab, rows whose State reads (default → enforce). view lists the matching requests.Yes. The visitor gets the branded 403 page with a reference ID.

Both kinds are counted in Hits; the State column tells you which kind a rule produces.

To review:

  1. Open Coraza Rules and pick Last 24h or Last 7d at the top right.
  2. On Firing rules, start with the highest Hits and look at Top hosts and Top URIs to separate scanners from real visitors.
  3. For a rule you do not recognise, click Ask AI or open the rule from the CRS catalog.
  4. If a rule is firing on legitimate traffic, mute it for that site only (see Mute a noisy rule above) rather than turning it off globally.

Customer reports a request was wrongly blocked? The branded 403 page shows a reference ID (also sent as the X-Request-Reference response header). This page is shown for every block, including a rejected unparsable or oversized request body in Enforce mode (those show rule 991900020 or 991900031 in the audit log). Ask the customer for it, then:

  1. Look the reference up in the edge (HAProxy) access log on the server to find the time, client IP, host and URL of that request.
  2. Find the matching transaction in the WAF audit log on the server; it names the matched rule ID, source IP, URL and offending parameter.
  3. Decide whether to mute the rule (see above) or leave it. Many “false positives” turn out to be real attempts.
  • Source of truth: security.db. All rule edits go through the panel and write to that SQLite file; manual file edits won’t survive a regeneration.
  • Reload mechanism. Rule edits apply via SIGHUP to coraza-spoa; adding or removing whole rule files requires a full container restart, which the panel performs when the change needs it.
  • Real source IPs are in the audit log — even with HAProxy in front of the WAF, the real client IP is propagated through the SPOE messages.

A rule shows enabled but doesn’t fire. Check that the global mode is Detect only or Enforce. Off bypasses every rule.

A request matched a rule but was not blocked. Expected: in both modes only the always-on high-confidence rules block (plus, in Enforce, unparsable bodies and oversized JSON). Everything else, including SQL injection, cross-site scripting and scanner signatures, is logged only.

The Firing rules tab is empty. Confirm coraza-spoa is healthy on the Services tab of Server Settings. If it’s restarting in a loop, check the container logs — usually a malformed rule file or a missing include.

Edits revert on restart. Make sure you’re editing through the panel; manual edits outside the panel-managed path are overwritten.

Still stuck? Open a support ticket and our team will help.