1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/homeassistant_ynh.git synced 2024-09-03 19:26:16 +02:00

Be more precise on fail2ban rule

This commit is contained in:
ewilly 2023-04-08 19:20:38 +02:00
parent b7b1e656b0
commit e46de3d5a2
2 changed files with 2 additions and 2 deletions

View file

@ -65,7 +65,7 @@ yunohost service add $app --description="Home Assistant server" --log="$log_file
ynh_use_logrotate --logfile="$log_file" ynh_use_logrotate --logfile="$log_file"
# Create a dedicated Fail2Ban config # Create a dedicated Fail2Ban config
ynh_add_fail2ban_config --logpath="$log_file" --failregex="Login attempt or request with invalid authentication from <HOST>" ynh_add_fail2ban_config --logpath="$log_file" --failregex="[homeassistant.components.http.ban] Login attempt or request with invalid authentication from <HOST> .* Requested URL: ./auth/"
# Grant sudo permissions to the user to manage his own systemd service # Grant sudo permissions to the user to manage his own systemd service
myynh_create_dir "/etc/sudoers.d" myynh_create_dir "/etc/sudoers.d"

View file

@ -49,7 +49,7 @@ yunohost service add $app --description="Home Assistant server" --log="$log_file
ynh_use_logrotate --logfile="$log_file" --non-append ynh_use_logrotate --logfile="$log_file" --non-append
ynh_add_fail2ban_config --logpath="$log_file" --failregex="Login attempt or request with invalid authentication from <HOST>" ynh_add_fail2ban_config --logpath="$log_file" --failregex="[homeassistant.components.http.ban] Login attempt or request with invalid authentication from <HOST> .* Requested URL: ./auth/"
#================================================= #=================================================
# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS, ...) # RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS, ...)