From e46de3d5a2dba2cda5e8318c791a8a0bb717cea4 Mon Sep 17 00:00:00 2001 From: ewilly Date: Sat, 8 Apr 2023 19:20:38 +0200 Subject: [PATCH] Be more precise on fail2ban rule --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index df45cc7..a9b4c47 100644 --- a/scripts/install +++ b/scripts/install @@ -65,7 +65,7 @@ yunohost service add $app --description="Home Assistant server" --log="$log_file ynh_use_logrotate --logfile="$log_file" # Create a dedicated Fail2Ban config -ynh_add_fail2ban_config --logpath="$log_file" --failregex="Login attempt or request with invalid authentication from " +ynh_add_fail2ban_config --logpath="$log_file" --failregex="[homeassistant.components.http.ban] Login attempt or request with invalid authentication from .* Requested URL: ./auth/" # Grant sudo permissions to the user to manage his own systemd service myynh_create_dir "/etc/sudoers.d" diff --git a/scripts/upgrade b/scripts/upgrade index ca76d40..4ba196a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,7 +49,7 @@ yunohost service add $app --description="Home Assistant server" --log="$log_file ynh_use_logrotate --logfile="$log_file" --non-append -ynh_add_fail2ban_config --logpath="$log_file" --failregex="Login attempt or request with invalid authentication from " +ynh_add_fail2ban_config --logpath="$log_file" --failregex="[homeassistant.components.http.ban] Login attempt or request with invalid authentication from .* Requested URL: ./auth/" #================================================= # RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS, ...)