Skip to content

Instantly share code, notes, and snippets.

@hannesbe
Last active January 14, 2016 00:39
Show Gist options
  • Save hannesbe/d988e8cd8b47fb1cc7f4 to your computer and use it in GitHub Desktop.
Save hannesbe/d988e8cd8b47fb1cc7f4 to your computer and use it in GitHub Desktop.
fail2ban Apache jail for WordPress failed logins / brute force attacks
# fail2ban Apache jail for WordPress failed logins / brute force attacks
# Location in CentOS/EL7 : /etc/fail2ban/jail.d/apache-wp.conf
# 86400 = 24h, 21600 = 6h, 3600 = 1h
[apache-wp-xmlrpc]
enabled = false
filter = apache-wp-xmlrpc
port = http,https
logpath = /var/www/vhosts/*/logs/*access*log
/var/log/httpd/*access*_log
maxretry = 10
bantime = 3600
findtime = 86400
[apache-wp-login]
enabled = false
filter = apache-wp-login
port = http,https
logpath = /var/www/vhosts/*/logs/*access*log
/var/log/httpd/*access*_log
maxretry = 10
bantime = 3600
findtime = 86400
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment