The filter files included should not be edited; there are no user-serviceable parts inside.
If you are using the typical settings for WPf2b the Blocklist add-on will work without further configuration.
- Copy
wpf2b-blocklist-hard.conf
to yourfail2ban/filters.d
directory - Create 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.
.. seealso:: :ref:`configuration__syslog__local_facility`
- Add the following to
wp-config.php
define('WP_FAIL2BAN_ADDON_BLOCKLIST_CUSTOM_JAIL', true);
.. seealso:: :ref:`WP_FAIL2BAN_ADDON_BLOCKLIST_CUSTOM_JAIL`
- Reload or restart
fail2ban