Features
WAF
The WAF (web application firewall) inspects requests to proxy hosts with the ModSecurity engine and the OWASP Core Rule Set (CRS). Each rule adds to an anomaly score for patterns such as SQL injection, XSS, path traversal and remote code execution, and a request whose total reaches the threshold is blocked.
The CRS rules are loaded once at the nginx http level; what differs per host is only the mode, paranoia level, threshold and rule exclusions. This page covers the settings. When legitimate requests are blocked, follow When the WAF blocks legitimate requests.
Modes and values
| Field | Meaning |
|---|---|
| Mode | Blocking: requests over the threshold get a 403 and are logged. Detection: requests are logged and let through. |
| Paranoia Level | 1 to 4. Higher levels turn on more rules and produce more false positives. The interface suggests PL1 for general sites, PL2 for security-sensitive ones, PL3 for finance/health, PL4 for experts only. |
| Anomaly Threshold | The minimum score that blocks a request; lower is stricter. The interface offers 1 to 20, marked Strict (3), Standard (5) and Lenient (10+). |
Per-host settings
Choose under the proxy host's edit dialog → Security tab → WAF (Web Application Firewall).

| Choice | Behaviour |
|---|---|
| Inherit | Uses the global WAF default as it is: whether it is on, and its mode, paranoia level and threshold. |
| Override | Uses the mode, paranoia level and threshold chosen on this host. On a new host, Override starts at Blocking, 1, 5. |
| Disable | Turns the WAF off for this host whatever the global default says. |
A new proxy host's WAF starts as Disable. Turning on the global WAF does not reach such hosts; choose Inherit on a host for it to follow the global values.
Global default
WAF / Blocking → Global WAF sets the values for hosts that inherit. Saving regenerates every inheriting host.

| Field | Default |
|---|---|
| Global WAF | off |
| Mode | Detection |
| Paranoia Level | 1 |
| Anomaly Threshold | 5 |
How Inherit, Override and Disable work across the security features is described in Global security defaults.
Disabling rules and partial exclusions
WAF / Blocking → WAF Policy Settings has two tabs.
| Tab | Contents |
|---|---|
| Global Policies | The CRS rules by category. Disable or re-enable a rule for all hosts, optionally with a reason; changes are recorded on the Change History tab. |
| Per-Host Policies | Each host's WAF state (Blocking Mode, Detection Mode, Inactive) and number of rule exclusions. Manage Policy disables or re-enables rules for that host only. |

A rule can be switched off at three widths, chosen with Disable This Policy in the log detail.
| Scope | Behaviour |
|---|---|
| The whole host | The rule is off for every request to this host. The widest choice. |
| Only this path | Off only for requests whose path starts with the path you enter. Every other path is still inspected. |
| Only this argument | The rule stays on but stops inspecting one argument (for example content). The narrowest choice. |
The same dialog also offers Global Disable (All Hosts). Path scopes are matched against the normalized path, and a path containing segments such as .. gets no exception. Re-enabling a rule that has partial exclusions removes those partial exclusions too.
Rules off by default
Rule 941310 (US-ASCII Malformed Encoding XSS Filter) is off by default. It mistook posts that mix HTML tags with Korean, Japanese, Chinese, Russian or German text for attacks, and the attack it stops only works against old Internet Explorer. You can turn it back on in the Global Policies list, and a rule turned back on stays on across later upgrades.
Events and testing
- Requests that match rules are recorded under Logs → WAF Events. Opening one shows the rules that blocked it and the request URI, and you can disable a rule from there. See Reading logs and block reasons.


- WAF / Blocking → WAF Tester sends a set of prepared attack patterns to a chosen host and shows whether they were blocked. By default the requests go to NPG's own proxy container, and the Host header is filled with the host's first domain. Use it only on your own systems.
Interaction with other features
- Global trusted IPs: the global trusted IPs under Settings → WAF Auto-Ban are still inspected by the WAF by default. Turning on Trusted IPs also bypass the WAF (ModSecurity) on the same screen skips WAF inspection for their requests. A compromised trusted host could then send attacks straight to your backends, so use it only for addresses that need it.
- WAF auto-ban: when one IP's rule matches on blocking-mode hosts reach the threshold within the time window, that IP is banned on every host. Events in detection mode and matches of disabled rules are not counted. See Automatic bans.
- Block Exploits: Block Exploits on the Security tab is pattern blocking in nginx, separate from the WAF. It stays on when the WAF is off, and WAF rule exclusions do not affect it.
- Request bodies: a host with the WAF on reads the whole request body for inspection. Turning proxy request buffering off on the Performance tab does not make uploads stream to the backend.
- Redirects and streams: the WAF does not apply to redirect hosts or TCP/UDP stream hosts.
Limits
- The interface recommends at least 2 GB of RAM when the WAF is used. If memory runs short, nginx may restart.
- There is no screen for adding or editing CRS rules. Rules can be turned on and off, or excluded in a narrower scope.
- The Advanced Config cannot contain directives such as
modsecurityorSecRule.