Firewall and WAF
Hive inspects requests in two places that behave the same: an engine inside WordPress and an optional guard that runs before WordPress loads. The rules are not written into the plugin but delivered signed from reportedip.com, with a bundled baseline that always works offline. The engine is free on every plan.
The engine inside WordPress
On init at priority 1 the engine matches the active ruleset against the URI, the query string,
the request body (also in a decoded copy) and the user agent: SQL injection, cross-site scripting, path
traversal, command injection, file inclusion wrappers, SSRF, Log4Shell, PHP object injection, XXE, web shell
uploads, CRLF and template injection, scanner user agents. A hit ends in the shared 403 block page.
- Safe by construction: bounded regular expressions, a malformed rule is skipped, and an error lets the request through instead of taking the site down.
- No false alarms for your editors: signed-in users who may edit content, wp-admin, cron and WP-CLI are not inspected by the engine; the whitelist always wins.
- Report-only: the firewall can log what it would block (
waf_would_block) without blocking. - Where: engine, mode and Paranoia Level under Protection Settings → Firewall & Bots; rule sync and exceptions on Server & Maintenance → Rules; the firewall log on Activity.
Signed rule delivery and Priority Sync
Rulesets come versioned and Ed25519-signed from reportedip.com. The plugin checks every ruleset against a public key it ships with and keeps the bundled baseline when a feed is missing, too large or does not verify, so a tampered feed cannot change your rules. New signatures reach every connected site within hours, without a plugin release.
| Plan | Rules | Refresh |
|---|---|---|
| Local Shield, any plan | Bundled OWASP Top 10 baseline, Paranoia Level 1 | With the plugin updates |
| Free, Community Network | Server ruleset at Paranoia Level 1, which covers more than the bundled one | Every six hours |
| Contributor | Priority Sync: Paranoia Level 2 and the bot address range feeds | Weekly |
| Pro and up | Priority Sync: Paranoia Level 3, bot ranges, the live list of disposable mail domains | Daily |
Paranoia Level 3 is strict and catches obfuscated payloads, at the price of more false positives; it is meant for experienced operators. Contributor is a free plan for accounts that contribute data, for example through a honeypot or the Linux agent.
Extended Protection: the guard before WordPress
An optional auto_prepend_file guard applies the same rules, exceptions, whitelist and IP blocks
before WordPress loads, so a blocked request costs almost nothing. Its hits are written to a queue and imported
into the log and the escalation ladder; a block set by the plugin reaches the guard within the same request.
The guard is off by default and set up on Server & Maintenance → Server:
- Apache and PHP-FPM (also nginx with PHP-FPM) are configured automatically through
.htaccessor a.user.iniin the document root. - Other stacks get the line for php.ini or the hosting panel, or an nginx
fastcgi_paramsnippet. - Signed-in users: the guard skips body inspection when a WordPress sign-in cookie is present, so saving content never trips it; URL and user agent rules still apply.
- Status you can trust: the Server tab reports whether the guard really ran for the current request, and the readiness register warns when its queue is not writable.
- Fail-open and safe to remove: any error lets the request through. Switching it off removes the directives Hive controls and leaves an inert placeholder file, so a leftover line in a hand-edited configuration never points at a missing file. Report-only mode switches the guard off as well.
Load shield
Distributed crawlers sometimes request expensive, uncached pages such as shop filters, calendars or the search, each address only once. Every request ties up a PHP worker until the pool is full and real visitors get errors. Counters per address do not catch this. The load shield counts uncached requests in the guard before WordPress loads, learns the normal level of your site and steps in when a flood of requests without any cookie exceeds it. Pro plan and up; it runs only in the guard, so it needs Extended Protection. While the guard does not run, the dashboard shows the shield as waiting and a next step leads to the Server tab.
| Mode | What it does |
|---|---|
| Off | The default. Nothing is counted. |
| Measure only | Counts and logs what it would do, without checking anyone. Good for the first week on a new site. |
| Automatic | Checks visitors only while a flood runs and stops by itself once it is over. The recommendation of the quickstart. |
| Always | Checks every uncached request from a client without the shield cookie. |
The setting Load shield scope decides which pages are checked. It matters most for how many real visitors ever see a check page.
| Scope | What gets checked |
|---|---|
| Uncached requests only | Only filters, search and other URLs with a query string, plus the extra paths you list. Cached pages never see a check. |
| Whole site while hardening mode is active | The default. In addition, every first page view without the shield cookie goes through the browser check for as long as hardening mode runs. Hardening mode starts on a flood and also on a wave of sign-in attacks, so this scope can check the whole site for an hour after a brute force wave as well. |
| Whole site during every flood | Every first page view without the cookie is checked whenever the shield is on. |
- When it switches on: when the cookieless uncached requests of one minute reach the larger of Minimum flood size per minute (120) and Multiple of the normal level (5 times). The normal level learns only from quiet minutes, so a long flood cannot raise its own bar. A flood keeps the shield on for at least 15 minutes; one that returns within an hour doubles that, up to four hours. It ends after two quiet minutes.
- What visitors see: in most cases a short page with an immediate redirect that sets the cookie
rip_human; the next request passes. Clients that look like plain HTTP clients, networks that were redirected three times without coming back with the cookie, and every visitor in a whole-site scope get a short browser check instead, which the browser solves in about a second. Without JavaScript the check shows a Continue button that works after about five seconds. On a site without HTTPS browsers cannot compute the check, so the redirect takes its place. All check pages answer with status 503 andRetry-After, so a search engine that is checked by mistake comes back later and keeps the real page in its index. - Limit per minute: Checked visitors let through per minute (default 120) caps how many visitors get through after a solved check while the shield is on. Above it they see a waiting page that reloads by itself after 20 seconds without a second check, and for the rest of the flood new visitors get a checkbox I am not a robot instead of the browser check. Visitors who already passed are not counted. On a site with many first visits per minute raise the value, 0 switches the limit off.
- When the redirect stops filtering: if a flood takes the redirect in its stride and comes back with the cookie at flood level, every cookie holder of level one gets the browser check until the flood is over.
- Who is never checked or counted: wp-admin, sign-in, cron, REST, AJAX, feeds, sitemaps,
robots.txt, payment callbacks (wc-api), calendar feeds (ical), previews of page builders, requests that only carry tracking or ad click parameters such asutm_*,gclid,fbclidorsrsltid, any method other than GET (so HEAD requests of uptime monitors pass), signed-in users, whitelisted addresses, the server itself and private addresses (a cache preload such as WP Rocket), trusted proxies without a client header and firewall exceptions for the whole firewall. Verified crawlers pass by their published address ranges or, for crawlers without ranges, by a reverse and forward DNS lookup; a copied user agent does not pass. Until the verified crawler list has arrived, the shield only measures. A page the web server delivers from its own cache never reaches the shield. - Browsers without cookies: a browser that keeps no cookie gets the browser check after three redirects and, once solved, passes for 15 minutes without the cookie.
- Graylist: addresses flagged as fake bots, addresses that matched a firewall rule while the firewall only reports, and repeat offenders must pass the browser check on the first page for one day instead of being blocked. An address that solves the check leaves the list, so a shared address such as iCloud Private Relay or a mobile carrier network is not checked all day. The switch Browser check for suspicious bots turns it off.
- Repeat offenders: an address that is sent the browser check in three different minutes of one day and never passes it is shared with the community as Bad Web Bot (on by default, switchable). An address where any visitor passed that day is never shared, nor is a browser that only blocks cookies, nor are single requests. Block repeat offenders locally (off by default) also blocks such an address for 24 hours through the normal list of blocked IPs, where it can be released.
- Hardening mode: Start hardening mode on a flood (on by default) starts hardening mode when the shield switches on and extends it while the flood lasts. Switching hardening mode off by hand ends it until the next flood.
- Fine tuning: Extra expensive paths counts path prefixes such as
/shop/filter/as expensive even without a query string, up to 50. Shield cookie lifetime (hours) (default 24) sets how long a visitor who passed is let through. - Visible success: a dashboard card shows the state (off, waiting, measuring only, ready, active now), the requests answered before WordPress in 24 hours and 30 days and the PHP time saved. The admin bar shows a running flood inside the hardening mode note, and the log tab Activity → Load shield lists every minute, the floods and the repeat offenders, with a CSV export. MainWP shows the state per site.
- Privacy: the cookie
rip_humanis technically necessary, holds no user ID and is bound to the network range of the visitor, not to the person. No tracking, no third parties, no external assets on the check pages; everything stays on your server except the optional reports. - Accessibility: the check pages have a page title, a status line read out by screen readers, work with the keyboard alone and follow the light or dark setting of the device. The waiting page has a link to try at once.
- Where: mode and options under Protection Settings → Firewall & Bots, the guard itself on Server & Maintenance → Server.
Exceptions for false positives
A form that accepts HTML, a page builder posting raw markup or an API receiving attack samples can trip a signature now and then. An exception lets that one case pass while the rest stays protected.
- Where: Server & Maintenance → Rules → WAF Exceptions, or Allow on a firewall row in the log, which fills in a narrow exception for exactly that rule on that path.
- Scope: one rule, a rule group or, for an endpoint of your own, the whole engine on a path, optionally narrowed to an address or range. A whole-engine exception always needs a path or address, so the firewall can never be switched off globally by accident.
- Keep it narrow: a rule on a path before a group, a group before the whole engine. The log row shows the matched value, the inspected part, method, URI and user agent, and for
admin-ajax.phpthe AJAX action. - Both layers: exceptions are baked into the guard and rebuilt whenever the list changes. On a network they apply to all sites. Every plan.
- In code: the filter
reportedip_hive_waf_bypass_routesexcludes REST routes by an anchored prefix on the resolved route; it works in the engine only.
Reference codes and the block page
Every block, firewall or sensor, carries a code such as WAF_SQLI-3F9A2B71 on the block page and in
the X-RIP-Ref header. A visitor who was blocked by mistake quotes the code, and you find the row in
the log. The code is a one-way hash of address, reason and hour, so it reveals nothing. The texts of the block
page can be replaced with the filter reportedip_hive_blocked_page_strings.
Page caches
The block page defines DONOTCACHEPAGE, DONOTCACHEDB and DONOTCACHEOBJECT
and sends Cache-Control: no-store, no-cache, must-revalidate, max-age=0, Pragma: no-cache
and the WordPress nocache_headers(). WP Rocket, W3 Total Cache, WP Super Cache and LiteSpeed Cache
respect this, so one blocked attacker never leaves a cached 403 for real visitors. The form check carries
nothing request-specific, so cached pages keep working with it.
Last updated: · Maintained by the ReportedIP team