
fail2ban is one of the simplest and most effective security measures you can implement to protect your WordPress site.
WP fail2ban provides the link between WordPress and fail2ban:
Oct 17 20:59:54 foobar wordpress(www.example.com)[1234]: Authentication failure for admin from 192.168.0.1 Oct 17 21:00:00 foobar wordpress(www.example.com)[2345]: Accepted password for admin from 192.168.0.1
WPf2b comes with three fail2ban filters: wordpress-hard.conf, wordpress-soft.conf, and wordpress-extra.conf. These are designed to allow a split between immediate banning (hard) and the traditional more graceful approach (soft), with extra rules for custom configurations.
Failed Login Attempts
The very first feature of WPf2b: logging failed login attempts so the IP can be banned. Just as useful today as it was then.
Block User Enumeration
One of the most common precursors to a password-guessing brute force attack is user enumeration. WPf2b can block it, stopping the attack before it starts.
Block username logins
Sometimes it’s not possible to block user enumeration (for example, if your theme provides Author profiles). WPf2b can require users to login with their email address instead of their username.
Blocking Users
Anther of the older WPf2b features: the login process can be aborted for specified usernames.
Say a bot collected your site’s usernames before you blocked user enumeration. Once you’ve changed all the usernames, add the old ones to the list; anything using them will trigger a “hard” fail.
Empty Username Login Attempts
Some bots will try to login without a username; harmless, but annoying. These attempts are logged as a “soft” fail so the more persistent bots will be banned.
Spam
WPf2b will log a spammer’s IP address as a “hard” fail when their comment is marked as spam; the Premium version will also log the IP when Akismet discards “obvious” spam.
Attempted Comments
Some spam bots try to comment on everything, even things that aren’t there. WPf2b detects these and logs them as a “hard” fail.
Pingbacks
Pingbacks are a great feature, but they can be abused to attack the rest of the WWW. Rather than disable them completely, WPf2b effectively rate-limits potential attackers by logging the IP address as a “soft” fail.
Block XML‑RPC Requests [Premium]
The only reason most sites need XML‑RPC (other than Pingbacks) is for Jetpack; WPf2b Premium can block XML‑RPC while allowing Jetpack and/or Pingbacks.
Block Countries [Premium]
Sometimes you just need a bigger hammer – if you’re seeing nothing but attacks from some countries, block them!
Cloudflare and Proxy Servers
WPf2b will work with Cloudflare, and the Premium version will automatically update the list of Cloudflare IP addresses.
You can also configure your own list of trusted proxies.
syslog Dashboard Widget
Ever wondered what’s being logged? The dashboard widget shows the last 5 messages; the Premium version keeps a full history to help you analyse and prevent attacks.
Site Health Check
WPf2b will (try to) check that your fail2ban configuration is sane and that the filters are up to date; out-of-date filters are the primary cause of WPf2b not working as well as it can.
When did you last run the Site Health tool?
mu-plugins Support
WPf2b can easily be configured as a “must-use plugin” – see Configuration.
API to Extend WPf2b
If your plugin can detect behaviour which should be blocked, why reinvent the wheel?
Event Hooks [Premium]
Need to do something special when WPf2b detects a particular event? There’s a hook for that.
Starting from $0 per month.
Rating
Reviewers
66 reviews
Tags
Developed By
invisnet
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Use a live weather forecast widget to show current conditions and upcoming predictions, giving visitors real time local weather updates for better planning.
Create real estate listings with a listings widget that displays properties clearly, supports customization, and helps visitors explore homes more easily.
Add a Pomodoro timer to your site so users can structure focus and break cycles, improving time management and productivity.
Show TikTok videos with a TikTok slider that displays clips in an engaging, customizable slideshow to boost visibility and keep visitors watching.
Add an MP3 Player to your website and engage visitors with music, podcasts, and spoken audio without any setup complexity.

Show WordPress posts with a WordPress feed that keeps content fresh, improves navigation, and helps visitors discover more of your site.
Show Sitejabber reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions that support higher sales.
Add a translation widget to your site so users can switch languages easily and access content in their preferred language.

Show Tumblr posts with a Tumblr feed that keeps content fresh, improves navigation, and helps visitors discover more posts.
Add Telegram Chat to your site to communicate with visitors, deliver instant support, and provide a smoother, more reliable user experience.
Add an events calendar to your site so visitors can view upcoming activities, improving engagement and event visibility.
Show Bluesky posts with a Bluesky feed that updates in real time, improves content discovery, and keeps visitors engaged with fresh activity.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
