From 0594538243b2f244eb13a9dc231ef810a810e510 Mon Sep 17 00:00:00 2001 From: GunChleoc Date: Wed, 1 May 2024 09:20:51 +0100 Subject: [PATCH] Add fail2ban solution for systems that only log with systemd. --- content/en/admin/prerequisites.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/en/admin/prerequisites.md b/content/en/admin/prerequisites.md index 691d53b0c..e0fa82c8b 100644 --- a/content/en/admin/prerequisites.md +++ b/content/en/admin/prerequisites.md @@ -51,6 +51,11 @@ Finally, restart fail2ban: systemctl restart fail2ban ``` +If the service should fail with the error "Failed during configuration: Have not found any log file for sshd jail", +switch logging to systemd by adding the line `backend=systemd` to the `[sshd]` section. +You might also have to install the `python3-systemd` package. + + ## Install a firewall and only allow SSH, HTTP and HTTPS ports First, install iptables-persistent. During installation, it will ask you if you want to keep the current rules–decline.