From 600983b03a8f8ae1f0a20323ed88c07a845440b5 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Sat, 18 Apr 2020 01:08:12 +0200 Subject: [PATCH] fail2ban --- scripts/install | 8 ++++++++ scripts/upgrade | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/scripts/install b/scripts/install index 76c1567..d505356 100755 --- a/scripts/install +++ b/scripts/install @@ -170,6 +170,14 @@ ynh_local_curl $installUrl "u_email=$email" "u_firstname=$firstname" "u_name=$la chown -R root: $final_path chown -R $app $final_path/{public,cache,themes,plugins} +#================================================= +# SETUP FAIL2BAN +#================================================= +ynh_script_progression --message="Configuring fail2ban..." + +# Create a dedicated fail2ban config +ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Invalid credentials in /var/www/dotclear2/inc/class.auth.ldap.php .* client: " + #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 922ed46..ad78629 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -180,6 +180,14 @@ ynh_store_file_checksum --file=$php_config chown -R root: $final_path chown -R $app $final_path/{public,cache,themes,plugins} +#================================================= +# UPGRADE FAIL2BAN +#================================================= +ynh_script_progression --message="Reconfiguring fail2ban..." + +# Create a dedicated fail2ban config +ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Invalid credentials in /var/www/dotclear2/inc/class.auth.ldap.php .* client: " + #================================================= # SETUP SSOWAT #=================================================