Last active
August 29, 2015 14:13
-
-
Save yoren/ce99160ceac2a5493eac to your computer and use it in GitHub Desktop.
Keep WordPress Safe From Brute Force Attack with Fail2ban
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fail2ban-regex /var/www/vhosts/your.domain.here/logs/site-folder/access_ssl_log /etc/fail2ban/filter.d/wp-login.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[wp-login] | |
enabled = true | |
port = http,https | |
action = iptables-multiport[name=WP, port="http,https", protocol=tcp] | |
sendmail-whois[name=fail2ban-wp-bruteforce, dest=your@email.com] | |
filter = wp-login | |
logpath = /var/www/vhosts/your.domain.here/logs/*/access*log | |
maxretry = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WP brute force attacks filter | |
[Definition] | |
failregex = ^<HOST> .* "POST .*wp-login.php | |
ignoreregex = |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For more information, please refer to my post: Keep WordPress Safe From Brute Force Attacks with Fail2ban.