1.1. fail2ban
1.1.1. Standard Filters
The filter files included should not be edited; there are no user-serviceable parts inside.
1.1.1.1. Typical Settings
If you are using the typical settings for WPf2b the Blocklist add-on will work without further configuration.
1.1.1.2. Creating a Custom Jail
Copy
wpf2b-blocklist-hard.conf
to yourfail2ban/filters.d
directoryCreate a new file in
fail2ban/jail.d
calledwpf2b-blocklist.conf
[wpf2b-blocklist-hard]
enabled = true
filter = wpf2b-blocklist-hard
logpath = /var/log/auth.log
maxretry = 1
port = http,https
Note
Make sure you change logpath
to the correct log for your OS. If your OS uses systemd it may be simpler and/or easier to install a real syslog service first.
Tip
It is strongly recommended that you also use a different syslog
facility with a custom jail.
See also
Add the following to
wp-config.php
define('WP_FAIL2BAN_ADDON_BLOCKLIST_CUSTOM_JAIL', true);
Reload or restart
fail2ban