Skip to content

Instantly share code, notes, and snippets.

@sergejmueller sergejmueller/jail.local
Last active Feb 3, 2016

Embed
What would you like to do?
Fail2Ban-Regel für die Erkennung und Sperre von Bots, die dabei erwischt werden, Login-Versuche auf die WordPress-Anmeldeseite abzusetzen. Die Anmeldeseite ist dabei mit einem Zugriffsschutz versehen. Weitere Infos unter https://github.com/sergejmueller/sergejmueller.github.io/wiki/Fail2Ban:-IP-Firewall
[wp-auth]
enabled = true
filter = wp-auth
port = http,https
logpath = /var/log/nginx*/access*.log
maxretry = 1
findtime = 86400
bantime = -1
# Fail2Ban configuration file
#
# Authentication failure
#
# Server: Nginx
# Author: Sergej Müller
#
[Definition]
# Option: failregex
# Notes : Too many authentication failures for IP
# Values: TEXT
#
failregex = ^<HOST>.+POST.+wp-login\.php.+ 401 [0-9]{1,}
# Option: ignoreregex
# Notes : Regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.