Open j323m13 opened 3 months ago
On Debian 12, fail2ban needs a bit more configuration to start. Without the service will crash. If you run the following command:
systemctl status fail2ban.service
you get:
× fail2ban.service - Fail2Ban Service Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Fri 2024-03-15 18:43:15 CET; 6min ago Duration: 92ms Docs: man:fail2ban(1) Process: 3294 ExecStart=/usr/bin/fail2ban-server -xf start (code=exited, status=255/EXCEPTION) Main PID: 3294 (code=exited, status=255/EXCEPTION) CPU: 78ms
Solution: In the file:
/etc/fail2ban/jail.local
add:
[sshd] backend=systemd enabled = true
then restart the server or fail2ban. Run the command systemctl status fail2ban.service
fail2ban.service - Fail2Ban Service Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; preset: enabled) Active: active (running) since Fri 2024-03-15 18:54:33 CET; 1min 29s ago Docs: man:fail2ban(1) Main PID: 530 (fail2ban-server) Tasks: 5 (limit: 2315) Memory: 52.3M CPU: 509ms CGroup: /system.slice/fail2ban.service └─530 /usr/bin/python3 /usr/bin/fail2ban-server -xf start
Problem solved.
I did everything according to the instructions, but the error remains. Debian 12
On Debian 12, fail2ban needs a bit more configuration to start. Without the service will crash. If you run the following command:
you get:
Solution: In the file:
add:
then restart the server or fail2ban. Run the command
systemctl status fail2ban.service
Problem solved.