V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m36s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-08-27 19:38:29 +02:00
parent 69888c0daf
commit d316c1d2b5
4 changed files with 19 additions and 24 deletions

View File

@@ -22,14 +22,20 @@ guard_sourcing
# 0: on success
#######################################
hardening_fail2ban() {
### Declare Arrays, HashMaps, and Variables.
declare
declare -r var_logfile="/root/.ciss/cdi/log/4435_hardening_fail2ban.log"
chroot_logger "${TARGET}${var_logfile}"
systemctl stop fail2ban
chroot_script "${TARGET}" "
export INITRD=No
apt-get install -y --no-install-suggests fail2ban 2>&1 | tee -a ${var_logfile}
echo ExitCode: \$? >> ${var_logfile}
"
cp -u /etc/fail2ban/fail2ban.conf "${DIR_BAK}"fail2ban.conf.bak
chmod 644 "${DIR_BAK}"fail2ban.conf.bak
mv "${TARGET}/etc/resolv.conf" "${TARGET}/root/.ciss/cdi/backup/etc/resolv.conf.bak"
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1024305
sed -i 's/#allowipv6 = auto/allowipv6 = auto/1' /etc/fail2ban/fail2ban.conf