Last active
December 24, 2015 13:49
-
-
Save abdallah/6808544 to your computer and use it in GitHub Desktop.
Fail2ban filter for WordPress from http://codepoets.co.uk/2013/fail2ban-filter-for-wordpress/
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
[Definition] | |
failregex = <HOST>.*] "POST /wp-login.php | |
ignoreregex = |
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
ErrorDocument 401 "Unauthorized Access" | |
ErrorDocument 403 "Forbidden" | |
<FilesMatch "wp-login.php"> | |
AuthName "Authorized Only" | |
AuthType Basic | |
AuthUserFile /home/username/.wpadmin | |
require valid-user | |
</FilesMatch> |
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
[apache-wp-login] | |
enabled = true | |
port = http,https | |
filter = apache-wp-login | |
logpath = /var/www/vhosts/*/statistics/logs/access_log | |
maxretry = 5 | |
findtime = 120 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment