WordPress plugin
WP fail2ban Premium
WP fail2ban Premium entries security events from WordPress so the server-side fail2ban service can respond to activity it recognizes. Configured filters match the events, and fail2ban can add an abusive IP address to the server firewall. The firewall can then stop later requests before they reach WordPress. The extension provides the WordPress integration; fail2ban and the firewall must be configured on the server.
WP fail2ban Premium entries security events from WordPress so the server-side fail2ban service can respond to activity it recognizes. Configured filters match the events, and fail2ban can add an abusive IP address to the server firewall. The firewall can then stop later requests before they reach WordPress. The extension provides the WordPress integration; fail2ban and the firewall must be configured on the server.
Filters and event types
The included filters are wordpress-hard.conf, wordpress-soft.conf and wordpress-extra.conf. Hard filters handle events that may warrant an immediate ban. Soft filters cover activity where several attempts may be reasonable first. You can adapt the filters or add rules for a custom setup.
Events include failed login attempts, specified blocked usernames, empty usernames, user enumeration, comments on nonexistent content, spam and pingbacks. WP fail2ban can block common user enumeration methods. Where enumeration cannot be blocked, it can require users to log in with an email address instead of a username. Spam comments can be logged as hard failures, while pingbacks can be logged as soft failures to support rate limiting without disabling pingbacks.
Premium controls and investigation
Premium includes a Web Application Firewall (WAF) that checks the SQL WordPress is about to run and can block SQL injection. It also includes the full Blocklist, geo-blocking, XML-RPC restrictions, honeypots and safeguards for sensitive WordPress operations.
- Restrict XML-RPC requests while allowing Jetpack, pingbacks or both.
- Block traffic from selected countries.
- Automatically maintain geolocation data and trusted Cloudflare and Jetpack network ranges.
- Use Akismet support to log the IP address when it discards obvious spam, alongside comments marked as spam.
- Review structured event history by IP address, country, username, event type and other details instead of relying only on the system log.
- Run a custom action when WP fail2ban detects a specified event.
The Premium dashboard provides event history for reviewing activity over time. The Site Health Check checks the fail2ban configuration and whether filters are current. WP fail2ban can also run as a must-use add-on, and its API lets other add-ons extend its behavior.
Setup
Install and configure WP fail2ban in WordPress, then configure fail2ban to read the relevant logs and use the filters. Review the hard, soft and extra filter files, set trusted proxies if your site uses them, and pick the events and Premium controls that fit your setup. After configuration, use Site Health and the event history to review the integration.
