Shield and WAF
Shield filters requests to sites in nginx: rules, rate limits, a browser check (proof-of-work) and autoban. WAF is ModSecurity with the OWASP Core Rule Set. Both are set up in Shield.
Site modes
Section titled “Site modes”The mode is set per site in the Sites tab. The default is Off.
| Mode | What it does |
|---|---|
| Log | Only records matches. |
| Rules | Applies rules and rate limits. |
| Rules + PoW | The same, and every request the rules did not decide on goes through the browser check. |
Shield does not protect TCP/UDP streams or sites with a fully custom config.
Rules are checked top to bottom until the first match. Conditions: IP, country, AS, domain, path, method, User-Agent, header, bot, JA4 fingerprint, TLS parameters, hidden files. Actions: allow, block (with a firewall ban if autoban is on), rate limit, browser check.
Presets add common rules: blocking secret and vulnerability scanners and WordPress probes, a limit of 600 requests a minute per address.
Rate limits count per IP (IPv6 per /64 network), per IP and path, per header or per JA4.
Attack mode makes every visitor who has not passed the check solve the proof-of-work, and turns itself off after an hour.
Autoban
Section titled “Autoban”Off by default. Bans an address in the firewall for 24 hours if within 10 minutes it collected 10 rule blocks, 30 rate limit rejections or 100 4xx responses. A repeat ban within 30 days doubles, up to 30 days. IPv6 is banned by /64. The allowlist, localhost, addresses with an open panel session and addresses taken from a header (a site behind a CDN or proxy) are never banned. With the firewall off, a ban blocks nothing.
ModSecurity v3 with OWASP CRS. First turn on the ModSecurity module in Web server → Modules and image, then the site’s WAF mode: Log only records hits, Block rejects requests.
- Paranoia level 1–4, 1 by default. Anomaly thresholds are 5 for requests and 4 for responses.
- False positives are removed with exclusions: a CRS rule number, optionally a variable, a path and sites.
- In Block mode a request whose body cannot be parsed (JSON or multipart, for example) is rejected with 400.
- WAF does not inspect response bodies.
Countries and networks
Section titled “Countries and networks”Country and AS rules work only with GeoIP databases. They are set up in Settings → GeoIP: by default the free iplocation databases with daily updates; MaxMind can be added with your own key.