From 9a80635dbc33babd4da63eff4d2d157991f069e6 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 28 Feb 2018 08:54:11 -0500 Subject: [PATCH] [fix] Fail2ban conf/filter was not matching failed login attempts... --- data/templates/fail2ban/jail.conf | 3 ++- data/templates/fail2ban/yunohost.conf | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/templates/fail2ban/jail.conf b/data/templates/fail2ban/jail.conf index d34763e48..648d44fa8 100644 --- a/data/templates/fail2ban/jail.conf +++ b/data/templates/fail2ban/jail.conf @@ -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 diff --git a/data/templates/fail2ban/yunohost.conf b/data/templates/fail2ban/yunohost.conf index 3ca8f1c8f..a501c10ba 100644 --- a/data/templates/fail2ban/yunohost.conf +++ b/data/templates/fail2ban/yunohost.conf @@ -14,8 +14,8 @@ # (?:::f{4,6}:)?(?P[\w\-.^_]+) # Values: TEXT # -failregex = helpers.lua:[1-9]+: authenticate\(\): Connection failed for: .*, client: - ^ -.*\"POST /yunohost/api/login HTTP/1.1\" 401 22 +failregex = helpers.lua:[0-9]+: authenticate\(\): Connection failed for: .*, client: + ^ -.*\"POST /yunohost/api/login HTTP/1.1\" 401 # Option: ignoreregex # Notes.: regex to ignore. If this regex matches, the line is ignored.