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

Fail2ban failed on Debian 12 - solved #283

Open
j323m13 opened this issue Mar 15, 2024 · 1 comment
Open

Fail2ban failed on Debian 12 - solved #283

j323m13 opened this issue Mar 15, 2024 · 1 comment
Assignees

Comments

@j323m13
Copy link

j323m13 commented Mar 15, 2024

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.

@DiMMMMM0N
Copy link

I did everything according to the instructions, but the error remains. Debian 12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants