WP fail2ban – Advanced Security
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:0
About this tool.
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.
Features
- 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 Another 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.