Skip to content

Instantly share code, notes, and snippets.

@hannesbe
Last active July 5, 2019 13:45
Show Gist options
  • Save hannesbe/41b4a4ee35dbe2fe7ada to your computer and use it in GitHub Desktop.
Save hannesbe/41b4a4ee35dbe2fe7ada to your computer and use it in GitHub Desktop.
fail2ban Apache log filters for WordPress brute force login & XMLRPC attacks
# fail2ban Apache log filter for WordPress failed logins / brute force attacks
# Location in CentOS/EL7 : /etc/fail2ban/filter.d/apache-wp-login.conf
[INCLUDES]
before = common.conf
[Definition]
_daemon = wordpress
failregex = ^<HOST>.*].*POST.*/wp-login\.php HTTP.*
ignoreregex =
# fail2ban Apache log filter for WordPress failed XMLRPC logins / brute force attacks
# Location in CentOS/EL7 : /etc/fail2ban/filter.d/apache-wp-xmlrpc.conf
[INCLUDES]
before = common.conf
[Definition]
_daemon = wordpress
failregex = ^<HOST>.*].*/xmlrpc\.php.*
ignoreregex =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment