Add/call action hook when blocking request.
-
I’d like an action hook that is run just before the user is displayed the lockout message. I would like this so that I can log the attempt for Fail2Ban.
I want to be able to have WordFence lock out an IP after 4 failed attempts and then have Fail2Ban block the IP after 8 attempts. I’ve had a couple of instances where a bot spams the login page even after it’s been locked out and it causes the server to slow down a little
bit. I’d like to avoid this by firewalling the bot all together.My desired result is this.
- Failed login attempt #1 – logged by WP Fail2Ban plugin.
- Failed login attempt #2 – logged by WP Fail2Ban plugin.
- Failed login attempt #3 – logged by WP Fail2Ban plugin.
- Failed login attempt #4 – logged by WP Fail2Ban plugin. – IP locked out by WordFence
- Failed login attempt #5 – logged by my script via a new WordFence action hook.
- Failed login attempt #6 – logged by my script via a new WordFence action hook.
- Failed login attempt #7 – logged by my script via a new WordFence action hook.
- Failed login attempt #8 – logged by my script via a new WordFence action hook. – IP locked out by Fail2Ban
This would allow real users that are locked out by WordFence to know what’s going on but fully block bots…
The topic ‘Add/call action hook when blocking request.’ is closed to new replies.