V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 58s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 58s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -197,6 +197,12 @@ EOF
|
|||||||
touch "${TARGET}/var/log/fail2ban/fail2ban.log"
|
touch "${TARGET}/var/log/fail2ban/fail2ban.log"
|
||||||
chmod 640 "${TARGET}/var/log/fail2ban/fail2ban.log"
|
chmod 640 "${TARGET}/var/log/fail2ban/fail2ban.log"
|
||||||
|
|
||||||
|
if [[ ! -f "${TARGET}/var/log/ufw.log" ]]; then
|
||||||
|
install -d -m 0755 "${TARGET}/var/log"
|
||||||
|
: >| "${TARGET}/var/log/ufw.log"
|
||||||
|
chmod 0640 "${TARGET}/var/log/ufw.log"
|
||||||
|
fi
|
||||||
|
|
||||||
### Merge / Dump-Parse via 'fail2ban-client -d'. All '*.conf', '*.local', and 'jail.*'-files are read, inherited, and merged.
|
### Merge / Dump-Parse via 'fail2ban-client -d'. All '*.conf', '*.local', and 'jail.*'-files are read, inherited, and merged.
|
||||||
### Syntax, path, and key errors result in a non-zero exit.
|
### Syntax, path, and key errors result in a non-zero exit.
|
||||||
chroot_script "${TARGET}" "
|
chroot_script "${TARGET}" "
|
||||||
|
|||||||
@@ -13,10 +13,11 @@
|
|||||||
guard_sourcing
|
guard_sourcing
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# OpenSSL library defaults (system-wide), TLSv1.2-, TLSv1.3-, AES-256-only;
|
# Hardening 'ufw'.
|
||||||
# Globals:
|
# Globals:
|
||||||
# TARGET
|
# TARGET
|
||||||
# VAR_SETUP_PATH
|
# VAR_SSH_PORT
|
||||||
|
# VAR_UFW_OUT
|
||||||
# Arguments:
|
# Arguments:
|
||||||
# None
|
# None
|
||||||
# Returns:
|
# Returns:
|
||||||
@@ -30,7 +31,7 @@ hardening_ufw() {
|
|||||||
|
|
||||||
if [[ ! -f "${TARGET}/var/log/ufw.log" ]]; then
|
if [[ ! -f "${TARGET}/var/log/ufw.log" ]]; then
|
||||||
touch "${TARGET}/var/log/ufw.log"
|
touch "${TARGET}/var/log/ufw.log"
|
||||||
chmod 640 "${TARGET}/var/log/ufw.log"
|
chmod 0640 "${TARGET}/var/log/ufw.log"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chroot_script "${TARGET}" "
|
chroot_script "${TARGET}" "
|
||||||
@@ -77,9 +78,8 @@ hardening_ufw() {
|
|||||||
|
|
||||||
chroot_script "${TARGET}" "echo 'y' | ufw enable 2>&1"
|
chroot_script "${TARGET}" "echo 'y' | ufw enable 2>&1"
|
||||||
|
|
||||||
chroot_script "${TARGET}" "
|
chroot_script "${TARGET}" "ufw status verbose >> ${var_logfile}"
|
||||||
ufw status verbose >> ${var_logfile}
|
|
||||||
"
|
|
||||||
guard_dir && return 0
|
guard_dir && return 0
|
||||||
}
|
}
|
||||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||||
|
|||||||
Reference in New Issue
Block a user