Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Fail2ban failed on Debian 12 - solved #283

Open
@j323m13

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions