The firewall
The firewall examines requests before plugins handle them. Start with monitoring to see what would be blocked.
Part of the Security pack.
On this page
What it stops#
SQL injections, XSS, file inclusions, PHP script uploads… It examines address parameters, forms, JSON bodies and uploaded file names. It installs itself in wp-content/mu-plugins/ to run before plugins.
Passwords and tokens are never examined. Logged-in administrators and editors aren’t filtered, after real validation of their session. The same applies to an application password (an external tool, assistant or script using the REST API): WordPress checks it first, then the firewall steps aside if the account is an administrator or editor.
The modes#
In Security → Protections applied to your sites, set Firewall mode:
| Mode | Effect |
|---|---|
| Monitoring only | The firewall notes what would be blocked, without blocking anything. This is the starting setting. |
| Lockout | The request receives a 403 error. An address that builds up 5 blocks in 5 minutes is refused for 1 hour. |
| Off | The firewall does nothing. |
Move to blocking without risk#
- Leave Monitoring only on for a few days.
- Look at each site’s log: the Firewall block on its page and the Latest events part.
- If nothing legitimate shows up, switch to Lockout.
The log is collected every 12 hours. Events are kept for 90 days in Situnio.
Blocked attacks in figures#
Security → Attacks blocked shows, over 7, 30 or 90 days, the Blocked requests (by the firewall, from a banned address or from your blocklist), the Refused logins (password attempts while an address is locked out) and the most targeted sites. Each site’s Security tab has the same chart, and the client report includes the curve.
The figures are collected at each check-up, every 12 hours, and kept for 400 days. Days are counted in UTC. In Monitoring only, nothing is blocked: the chart then shows what would have been.
Attack spike#
A site that receives far more malicious requests than usual in one day triggers an alert: at least 200 requests, and at least 10 times its usual level (the median of the previous 14 days, which a past spike does not raise). A site connected for less than 7 days is not monitored yet: Situnio first learns its usual level.
The alert comes by email (see Email alerts), at most once a day per site, with the countries the requests come from and the most active address. If several sites are hit at the same time, a single email groups them. For 48 hours, the Attack spike box stays on the Security page, in the site’s Security tab and on the dashboard. The figures come from the security check, every 12 hours: the alert can therefore arrive a few hours after the spike starts.
Where attacks start from#
Security → Where attacks start from places on a world map the requests caught by the firewall and the login lockouts, over 7, 30 or 90 days: the darker a country, the more it sends. Hovering a country shows its number of attacks. Next to the map, the Most active countries; below, the Most active networks (providers and hosting networks) and the Addresses targeting several of your sites. For one of these addresses, Block everywhere for 7 days adds it to the blocklist of every site in the organisation (owner and admins).
The country is that of the machine attacking. A server rented from Amazon, Google or OVH counts for the country of its data centre, often the United States, not the attacker’s. The map therefore opens on Without hosting networks: only home connections, mobiles and hacked devices remain, and they really are where the map places them. Hosting networks only shows the opposite, All everything; in that case, each country’s bar shows in grey the share coming from hosting networks.
The map is based on logged requests, at most 200 per site per check: a faithful picture of where attacks come from, not their exact total, which Attacks blocked gives. From hosting networks shows the share coming from servers, VPNs or relays: most automated attacks start there.
Attack history#
Attack history brings together the whole log of your sites, over 7, 30, 90 or 365 days. Open it from a site’s Security tab (Full history, by address), from Most targeted sites (By address) or from the map (All addresses, even those targeting a single site). The Addresses targeting several of your sites list only keeps addresses that targeted at least two sites: one that keeps hammering a single site does not appear there.
- By address: one row per IP address, with its country and provider, the Usernames tried, the number of login Lockouts, Refused logins and firewall requests, the sites targeted and the last time. Sorting puts first the most active addresses, those with the most refused logins or lockouts, those that targeted the most sites, or the most recent. Each row has its blocking buttons: for its site if it only targeted one, otherwise Block everywhere for 7 days.
- Event by event: the full log, page by page, from newest to oldest.
Filters combine the site, the period, the type (attacks, login lockouts, firewall, administrator logins), the country, the origin (with or without hosting providers) and a search: a full IP address or its beginning (92.118.), or a username tried (admin).
A login lockout is logged only once. The attempts a bot makes during its lockout (Refused logins) and the requests refused by the blacklist or a ban are counted per address and per day, collected at each check (Situnio Connector 1.27.0 or later, which updates itself; before that, only as a total per site). Tens of thousands of refused logins often come from one or two addresses: sort by refused logins, then block the ones that keep coming back. A blocked address gets a 403 error before WordPress and then counts in Blocked requests.
Allow or block an IP address#
| List | Effect |
|---|---|
| Allowed | Never filtered by the firewall, never banned, never limited at login. For your agency’s address or a monitoring tool. No time limit. |
| Blocked | Refused before WordPress (error 403), even in Monitoring only. Block duration: 24 hours, 7 days, 30 days, 90 days or no limit. |
In the log, an address already in a list shows its state (blocked until when, on this site or everywhere, allowed) and Remove from the list instead of the buttons. An address that comes back after an expired block is offered for longer: 7 days the first time, then 30, then 90, with a reminder of the previous blocks. Never unlimited by default: an address changes hands, at a hosting provider as on a home connection. Expired blocks are kept for 400 days for this, with no effect on the sites.
- For all sites: Security → IP address lists.
- For a single site: the Security tab of its page → Allowed and blocked IP addresses.
- From the log: Block for 7 days or Allow under a firewall or login lockout line.
A range is written 203.0.113.0/24: /16 at the widest to block, /24 to allow (IPv6: /32 and /48). An address in both lists stays allowed. Situnio refuses private addresses, your current address and that of a proxy every visitor goes through. Its own requests and those of the site’s server are never blocked.
Site behind Cloudflare or a proxy: set Visitor address first, otherwise the firewall sees the proxy’s address instead of the visitors’.
Custom proxies must also be declared as trusted relays.
A legitimate form is blocked#
Go back to Monitoring only, then write to us with the log line. define('SITUNIO_CONNECTOR_NO_FIREWALL', true); in wp-config.php turns the firewall off on that site only. If a single address is affected (your office, a monitoring tool), allow it instead: see above.
Still have a question? Write to us.