From 93a6d0b6e97c4f2caf397878540f552838ebc88c Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Sat, 17 Jun 2023 23:00:40 +0200 Subject: [PATCH] deb12 fail2ban auth.log fix --- install/vst-install-debian.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh index 627a4219..ab47493c 100755 --- a/install/vst-install-debian.sh +++ b/install/vst-install-debian.sh @@ -1630,6 +1630,13 @@ if [ "$fail2ban" = 'yes' ]; then fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -) sed -i "${fline}s/false/true/" /etc/fail2ban/jail.local fi + if [ ! -e /var/log/auth.log ]; then + # Debian workaround: auth logging was moved to systemd + # We took this fix from HestiaCP + touch /var/log/auth.log + chmod 640 /var/log/auth.log + chown root:adm /var/log/auth.log + fi #update-rc.d fail2ban defaults currentservice='fail2ban' ensure_startup $currentservice