Linux 软件免费装
Banner图

WP fail2ban - Advanced Security

开发者 invisnet
freemius
更新时间 2026年10月21日 05:08
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv3
版权网址: 版权信息

标签

security login protection brute force fail2ban syslog

下载

4.3.0.5 4.4.0.6 4.3.0.4 5.4.1 2.1.1 4.4.0.2 2.1.0 2.2.0 3.0.0 3.6.0 4.3.0.6 2.3.1 5.2.1 5.4.0.1 1.0 1.2 2.3.2 3.5.0 3.5.1 4.3.0.9 4.4.0.4 5.0.0 5.0.1 2.2.1 2.3.0 3.0.1 4.3.0.7 4.3.0.8 4.4.0.9 5.1.0.5 5.2.0 5.3.0 5.3.1 4.4.0.8 5.1.1 5.3.2 5.3.3 3.0.2 3.5.3 5.3.4 3.0.3 4.4.0.3 1.1 2.0.0 5.2.2 5.2.2.1 5.4.0 5.5.0 1.2.1 5.4.2

详情介绍:

Got a firewall? Use it. WP fail2ban gives fail2ban the information it needs to block attackers at the firewall. fail2ban is a server-side service that bans abusive IP addresses; WP fail2ban tells it about brute-force attacks, user enumeration, comment abuse, spam, and more. Once an address is banned, the firewall stops its requests before they reach your site. Free protection from the usual suspects The Free edition covers the attacks WordPress sites see every day: Need more protection? See what Premium adds → How WP fail2ban works WP fail2ban records security events in a form fail2ban can recognise. fail2ban watches those events and applies the rules you configure on the server. When an address crosses a threshold, it can be banned by the host firewall, so later requests are stopped before they reach WordPress. WP fail2ban ships with filters that work well for typical sites, so most installations can start with them as they are. The events themselves are deliberately written for humans as well as fail2ban: they tell you who is doing what, to what, and why it matters. That makes the logs useful to read directly, and makes it much easier to adapt the supplied filters or write your own if your setup needs something unusual. WP fail2ban also handles exiting keep-alive connections. When abusive activity should result in a ban, it closes the connection so the client cannot simply keep sending requests over a connection that was opened before the firewall rule was added. The Blocklist works a little differently: it can give the firewall hostile addresses learned from other participating sites, so your site does not have to see the attack first. Installation and server setup → Premium protection from the unusual suspects Premium goes beyond fail2ban. Premium also adds controls including geo‑blocking, XML‑RPC restrictions, honeypots, and safeguards around sensitive WordPress operations. See Premium plans and pricing → Your firewall can stop an IP address, but it cannot see what that address is doing inside WordPress. WP fail2ban fills that gap: the Free edition gives fail2ban the information it needs to act on everyday abuse, while Premium adds protection and intelligence that go beyond fail2ban. If you have questions about hosting, the Blocklist, Free and Premium, version requirements, privacy, or how WP fail2ban stores data, the FAQ below covers the practical details.

安装:

WP fail2ban has two parts to set up: WordPress needs to generate the events, and fail2ban needs to know how to act on them. WordPress
  1. Install WP fail2ban from the Plugin Directory and activate it.
  2. The Free edition is configured in wp‑config.php. The defaults are a good starting point; change them only where your site needs different behaviour.
  3. Check the WP fail2ban settings pages to see the effective configuration.
Configure WP fail2ban → fail2ban WP fail2ban includes the wordpress-hard.conf and wordpress-soft.conf filters. Copy them into your fail2ban filter directory and configure jails for both. The hard filter is for events that can normally be banned immediately. The soft filter is for events such as failed logins where several attempts may be reasonable. Exactly where fail2ban reads its logs depends on your operating system and whether it uses traditional syslog files or the systemd journal, so use the installation documentation for the current examples. Configure fail2ban → Once both sides are configured, test the installation before relying on it.

升级注意事项:

5.5.0 This is a feature release. You do not need to update your filters from 5.1.0. 5.4.2 This is a maintenance release. You do not need to update your filters from 5.1.0. 5.4.1 This is a bug-fix release. You do not need to update your filters from 5.1.0. 5.4.0.1 This is an important bug-fix release. You do not need to update your filters from 5.1.0. 5.4.0 This is a feature release. You do not need to update your filters from 5.1.0. 5.3.4 This is a bug-fix release. You do not need to update your filters from 5.1.0. 5.3.3 This is a bug-fix release. You do not need to update your filters from 5.1.0. 5.3.2 This is a minor release. You do not need to update your filters from 5.1.0. 5.3.1 This is a bug-fix release. You do not need to update your filters from 5.1.0. 5.3.0 This is a feature release. You do not need to update your filters from 5.1.0. [//]: # fs_free_only_begin 5.2.2 This is a minor release. You do not need to update your filters from 5.1.0. [//]: # fs_free_only_end [//]: # fs_premium_only_begin 5.2.2 This is a feature release. If you are using the WAF you will need to check the "WordPress core" setting in the WAF Options section. [//]: # fs_premium_only_end 5.2.1 This is a minor release. You do not need to update your filters from 5.1.0. [//]: # fs_free_only_begin 5.2.0 This is a minor release. You do not need to update your filters from 5.1.0. [//]: # fs_free_only_end [//]: # fs_premium_only_begin 5.2.0 This is a feature release. If you are using the WAF you will need up update your fail2ban filters and create a new jail; otherwise, things will continue to work as before. [//]: # fs_premium_only_end 5.1.1 This is a minor release. You do not need to update your filters from 5.1.0. 5.1.0.5 This is a feature release. To take advantage of the new features you will need up update your fail2ban filters; existing filters will continue to work as before. 5.0.1 This is a minor release. You do not need to update your filters from 5.0.0. 5.0.0 PLEASE READ THE NOTES BEFORE UPGRADING. This is a major feature release. You must update your filters. 4.4.0.9 This is a minor release. You do not need to update your filters from 4.4.0. 4.4.0.8 This is a bug-fix release. You do not need to update your filters from 4.4.0. 4.4.0.7 This is a Premium-only bug-fix release. You do not need to update your filters from 4.4.0. 4.4.0.6 This is a bug-fix release. You do not need to update your filters from 4.4.0. 4.4.0.5 This is a bug-fix release. You do not need to update your filters from 4.4.0. 4.4.0.4 This is a bug-fix release. You do not need to update your filters from 4.4.0. 4.4.0.3 This is a bug-fix release. You do not need to update your filters from 4.4.0. 4.4.0.2 This is a feature release. To take advantage of the new features, including the Blocklist Add-on, you will need up update your fail2ban filters; existing filters will continue to work as before. Blocklist Add-on users: Please disable the Blocklist plugin before upgrading WP fail2ban, then upgrade the Blocklist plugin and reactivate it. 4.3.2.2 This is a bug-fix release. You do not need to update your filters from 4.3.2.0. 4.3.2.1 This is a bug-fix release. You do not need to update your filters from 4.3.2.0. 4.3.2.0 This is a feature release. To take advantage of the new features you will need up update your fail2ban filters; existing filters will continue to work as before. Premium users: Please backup your database before upgrading. 4.3.0.7 This is a bug-fix release. You do not need to update your filters from 4.3.0. Premium users: Please update your MaxMind database. 4.3.0.6 This is a bug-fix release. You do not need to update your filters from 4.3.0. 4.3.0.5 This is a bug-fix release. You do not need to update your filters from 4.3.0. 4.3.0.4 This is a feature release. To take advantage of the new features you will need up update your fail2ban filters; existing filters will continue to work as before. Premium users: Please backup your database before upgrading. 4.2.8 This is a bug-fix release. You do not need to update your filters from 4.1.0. 4.2.7.1 This is a bug-fix release. You do not need to update your filters from 4.1.0. 4.2.7 This is a bug-fix release. You do not need to update your filters from 4.1.0. 4.2.6 This is a minor release. You do not need to update your filters from 4.1.0. 4.2.5.1 This is a premium-only patch release. If you are on PHP 7.0 or later you do not need to upgrade. 4.2.5 This is a minor release. You do not need to update your filters from 4.1.0. 4.2.4 This is a minor release. You do not need to update your filters from 4.1.0. 4.2.3 This is a bug-fix release. You do not need to update your filters from 4.1.0. 4.2.2 You do not need to update your filters from 4.1.0. 4.2.1 You do not need to update your filters from 4.1.0. 4.1.0 To take advantage of the new features you will need up update your fail2ban filters; existing filters will continue to work as before. 4.0.5 This is a security fix (Freemius SDK): all 4.x users are strongly advised to upgrade immediately. You do not need to update your filters from 4.0.1. 4.0.4 This is a bug-fix. You do not need to update your filters from 4.0.1. 4.0.3 This is a bug-fix. You do not need to update your filters from 4.0.1. 4.0.2 This is a bug-fix. You do not need to update your filters from 4.0.1. 4.0.1 To take advantage of the new features you will need up update your fail2ban filters; existing filters will continue to work as before. 3.6.0 You will need up update your fail2ban filters. 3.5.3 You will need up update your fail2ban filters. 3.5.1 Bug-fix: disable WP_FAIL2BAN_BLOCK_USER_ENUMERATION in admin area.... 3.5.0 You will need up update your fail2ban filters. 3.0.3 You will need up update your fail2ban filters. 3.0.0 BREAKING CHANGE: The fail2ban filters have been split into two files. You will need up update your fail2ban configuration. 2.3.0 Fix for WP_FAIL2BAN_PROXIES; if you’re not using it you can safely skip this release. 2.2.1 Bug-fix. 2.2.0 BREAKING CHANGE: WP_FAIL2BAN_LOG has been renamed to WP_FAIL2BAN_AUTH_LOG. Pingbacks are getting a lot of attention recently, so WPf2b can now log them. The wordpress.conf filter has been updated; you will need to update your fail2ban configuration. 2.1.0 The wordpress.conf filter has been updated; you will need to update your fail2ban configuration. 2.0.1 Bug-fix in experimental code; still an experimental release. 2.0.0 This is an experimental release. If your current version is working and you’re not interested in the new features, skip this version - wait for 2.1.0. For those that do want to test this release, note that wordpress.conf has changed - you’ll need to copy it to fail2ban/filters.d again.

常见问题:

Is WP fail2ban “fail2ban for WordPress”?

No. fail2ban is the service that watches logs and bans abusive IP addresses at the firewall. WP fail2ban is the bridge between WordPress and fail2ban: it tells fail2ban what is happening inside WordPress in a form it can act on. The name dates from 2011, when “WP + something” was commonly understood to mean an integration between WordPress and that thing.

Why does a dismissed Premium notice sometimes come back?

It shouldn’t. The Premium notices are provided by Freemius and use WordPress’s normal admin request handling to remember when you dismiss them. If another plugin mishandles that request before WP fail2ban or Freemius sees it, the dismissal is never saved and the notice can appear again. Because plugins are usually loaded alphabetically, this can be caused by almost any plugin loaded before WP fail2ban. There is very little WP fail2ban can do to work around another plugin breaking the request.

Will WP fail2ban work with my hosting?

If you can configure fail2ban and the firewall, yes. That normally includes VPSs, dedicated servers, and other hosting where you have control of the operating system. WP fail2ban supplies the WordPress side of the integration; fail2ban and the firewall run on the server. On managed hosting, it depends on what your provider allows. If you cannot install or configure fail2ban yourself, ask your host whether they support it or can add the WP fail2ban filters for you.

What is the Blocklist?

The WP fail2ban Blocklist uses attacks seen by participating WP fail2ban sites to identify hostile IP addresses. That means your firewall can block an address before it attacks your site, rather than waiting for your site to see enough activity for fail2ban to act. The Blocklist is built from WP fail2ban’s own data, not third-party threat feeds. The Free edition receives a reduced list; Premium receives the full current intelligence available for your site. Learn more about the WP fail2ban Blocklist add-on →

Why is the WordPress.org edition 5.x while Premium is 6.x?

The WordPress.org edition remains on 5.x so it can continue to support PHP 7.4. There are still a lot of WP fail2ban sites running PHP 7.4, even though PHP itself stopped supporting it nearly four years ago. Premium is based on 6.x and requires PHP 8 or later. It has moved on significantly from 5.x as WP fail2ban continues to develop. WordPress.org does not provide parallel release channels for different major versions, so 5.x and 6.x cannot both be offered for different PHP versions. Keeping the WordPress.org edition on 5.x is therefore a compromise: it lets development continue on modern PHP without abandoning existing WP fail2ban users who have not yet been able to move away from PHP 7.4.

What’s the difference between Free and Premium?

The Free edition covers the everyday WordPress abuse most sites need fail2ban to act on. Premium goes further with the full Blocklist, the Web Application Firewall, persistent event history, geo‑blocking, maintained security data, and additional controls. Compare all Free and Premium features →

Is WP fail2ban a firewall?

It depends which kind of firewall you mean. WP fail2ban is not a network firewall. It tells fail2ban when WordPress sees abusive behaviour, and fail2ban can then add bans to the server’s stateful network firewall. That firewall stops traffic before it reaches WordPress. Premium also includes a Web Application Firewall (WAF). A WAF works at a different layer: it examines what a request is trying to make WordPress do and can block malicious application-level behaviour, including SQL injection. The two complement each other. The network firewall blocks hostile sources; the WAF protects WordPress from malicious requests that reach WordPress.

How is WP fail2ban different from ModSecurity and other WAFs?

They work at different layers, and they can work together. ModSecurity and similar web-server WAFs inspect HTTP requests and responses and apply rules before or around the application. That makes them good at rejecting traffic based on what the request itself looks like. WP fail2ban runs inside WordPress, so it can see what the request actually means to WordPress: whether a login failed, whether a username exists, whether a comment was rejected as spam, what WordPress operation was attempted, and so on. It turns that application-level knowledge into events that fail2ban can act on at the network firewall. Premium’s WAF uses the same advantage. For SQL injection, for example, it can inspect the SQL WordPress is actually about to execute rather than trying to infer solely from the incoming request whether it contains an attack. They are complementary, not alternatives: a web-server WAF can reject malicious-looking requests before WordPress sees them; WP fail2ban can act after WordPress has interpreted them and knows what they actually mean.

Can I use WP fail2ban behind Cloudflare or another reverse proxy?

Yes, but WP fail2ban needs to know which proxies it can trust. A reverse proxy means the connection to WordPress comes from the proxy rather than directly from the visitor. WP fail2ban uses X-Forwarded-For to recover the real client IP, but only when the connecting address belongs to a proxy you have explicitly trusted. That prevents an attacker simply supplying their own forwarding header. WP fail2ban deliberately uses only X-Forwarded-For for client IP resolution. Keeping a single trusted path through that part of the code reduces the chances of subtle bugs or inconsistent behaviour, and X-Forwarded-For is the standard header that reverse proxies are expected to support. Free lets you configure trusted proxy networks yourself. Premium can keep Cloudflare's published IP ranges up to date automatically, so Cloudflare's edge nodes remain recognised as trusted proxies as its network changes. The CF-Connecting-IP header is not used to determine the client address. WP fail2ban only uses it as a signal that a site appears to be behind Cloudflare, so it can recommend the appropriate QuickStart configuration. Read more about how WP fail2ban handles client IP addresses →

Does WP fail2ban send my security data anywhere?

Not as part of normal operation. WP fail2ban’s normal job is local: WordPress generates the event, WP fail2ban records it, and fail2ban acts on it on your server. The Free edition includes Freemius, but sharing usage information with Freemius is optional: you can skip the opt-in and continue using and updating WP fail2ban. Premium uses Freemius for purchasing, licensing, and updates, so that connection is part of using the paid product. Freemius publishes what information it collects and why. Freemius data practices The Blocklist is a separate add-on and necessarily has its own data exchange; its README explains that separately.

更新日志:

5.5.0-LTS 5.4.2-LTS 5.4.1-LTS 5.4.0-LTS 5.3.4 5.3.3 5.3.2 5.3.1 5.3.0 5.2.2 5.2.1 5.2.0 5.1.1 5.1.0 5.0.1 5.0.0 "Delphi" 4.4.0.9 4.4.0.8 4.4.0.7 4.4.0.6 4.4.0.5 4.4.0.4 4.4.0.3 4.4.0.2 4.3.2.2 4.3.2.1 4.3.2.0 4.3.0.9 4.3.0.8 4.3.0.7 4.3.0.6 4.3.0.5 4.3.0.4 "Columbo" 4.2.8 4.2.7.1 4.2.7 4.2.6 4.2.5.1 4.2.5 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.0 4.0.5 4.0.2 4.0.1 4.0.0 3.6.0 3.5.3 3.5.1 3.5.0 3.0.3 3.0.2 3.0.1 3.0.0 2.3.2 2.3.0 2.2.1 2.2.0 2.1.1 2.1.0 2.0.1 2.0.0 1.2.1 1.2 1.1 1.0