WAF (Firewall)
A WAF (Web Application Firewall) inspects each request and blocks attacks: SQL injection, cross-site scripting, path traversal, command injection.
nsin’s WAF is managed, on the OWASP Core Rule Set, kept current by nsin. You don’t write signatures — you set where and how strict.
Turn it on
Section titled “Turn it on”- Rules → Add Rule → WAF.
- Leave paths as everything, or narrow to a section.
- Set strictness and sensitivity (below).
- Save in dry run first.
Strictness and sensitivity
Section titled “Strictness and sensitivity”| Setting | What it does |
|---|---|
| Strictness (paranoia level, 1–4) | Checks run. 1: clear attacks only. Higher: subtler attacks, more false positives. Most sites: 1–2. |
| Sensitivity (threshold) | Score builds as checks trip; at this score, blocked. Lower is stricter. |
| Body inspection limit | KB of body checked; uploads capped there. 0 skips it. |
Always start in dry run
Section titled “Always start in dry run”A dry-run rule logs what it would block but lets everything through.
- Create the rule in dry run.
- Leave it a day or two.
- Check Monitoring → WAF log.
- Real traffic caught: tune it (below). Otherwise, enforce.
Removing false positives
Section titled “Removing false positives”The WAF log names which check matched, by rule id — most to least surgical fix:
- Exclude that rule id. Everything else keeps working.
- Narrow the paths so the WAF skips that endpoint.
- Lower the strictness for the whole rule.
Prefer the first over dropping admin-area protection.
Combining rules
Section titled “Combining rules”- WAF rule, whole site, strictness 1.
- Stricter WAF rule on
/admin/*or your API. - Rate limiting on
/login. - Block rules for paths you never serve, like
/wp-login.phpon a non-WordPress site.
Common questions
Section titled “Common questions”Real visitors are blocked. Find it in the WAF log, note the rule id, exclude it. Several ids for one feature: narrow the path instead.
Does the WAF slow my site down? No — inspection is edge-side, in milliseconds; the body limit keeps it fast.
Do I still need it with a server firewall? Yes — it stops attacks before they cost bandwidth and CPU.
Blocked visitors see nsin’s page.
That’s nsin’s 403 page, not yours — error page rules only cover 5xx. See
Custom Error Pages.