Skip to content

Instantly share code, notes, and snippets.

@erpe
Created June 10, 2020 16:50
Show Gist options
  • Save erpe/3ef032df9e659935b141acb332977fb3 to your computer and use it in GitHub Desktop.
Save erpe/3ef032df9e659935b141acb332977fb3 to your computer and use it in GitHub Desktop.
fail2ban filter for wordpress / apache log combined
[INCLUDES]
before = common.conf
[Definition]
datepattern = %%d/%%b/%%Y:%%H:%%M:%%S
failregex = <HOST>.*POST.*(wp-login\.php|xmlrpc\.php).* 200
[wordpress]
enabled = true
port = http,https
filter = wordpress
logpath = /var/log/apache2/your_host_access.log
maxretry = 3
bantime = 3600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment