Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fail2ban solution for systems that only log with systemd. #1437

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add fail2ban solution for systems that only log with systemd.
  • Loading branch information
gunchleoc committed May 1, 2024
commit 0594538243b2f244eb13a9dc231ef810a810e510
5 changes: 5 additions & 0 deletions content/en/admin/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down