Merge pull request #438 from YunoHost/emaged-fail2ban-conf-was-broken-wtf

[fix] [critical] Fail2ban conf/filter was not matching failed login attempts...
This commit is contained in:
Laurent Peuch 2018-03-06 21:36:35 +01:00 committed by GitHub
commit a80f7471bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -581,5 +581,6 @@ enabled = true
port = http,https
protocol = tcp
filter = yunohost
logpath = /var/log/nginx*/*error.log
logpath = /var/log/nginx/*error.log
/var/log/nginx/*access.log
maxretry = 6

View file

@ -14,8 +14,8 @@
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT
#
failregex = helpers.lua:[1-9]+: authenticate\(\): Connection failed for: .*, client: <HOST>
^<HOST> -.*\"POST /yunohost/api/login HTTP/1.1\" 401 22
failregex = helpers.lua:[0-9]+: authenticate\(\): Connection failed for: .*, client: <HOST>
^<HOST> -.*\"POST /yunohost/api/login HTTP/1.1\" 401
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.