Reputation: 11
After installation, I copied the jail.conf file as jail.local. I didn't rewrite anything, I didn't say anything in the file, I'm trying to start with the default values.
I followed this description for installation: https://www.digitalocean.com/community/tutorials/how-to-protect-ssh-with-fail2ban-on-ubuntu-22-04
OS version: 24.04
If I delete the jail.local file, the application starts, no error. When I copy the jail.conf named jail.local Fail2ban won't start and I get an error:
[1805969]: ERROR Failed during configuration: Have not found any log file for sshd jail
Aug 19 05:47:41 fail2ban.local fail2ban-server[1805969]: 2024-08-19 05:47:41,690 fail2ban [1805969]: ERROR Async configuration of server failed
I don't get this error on Ubuntu 22.04. Is this a bug on Ubuntu 24?
I would like to use local configuration file for Fail2ban.
Upvotes: 1
Views: 4528
Reputation: 51
I just ran into this problem as well and googled it and noticed you are too having the same issue. I'll let you know if I come up with a solution:
EDITED
Here's the solution that worked for me: Inside your jail.local file set the backend to "systemd". See example below
[sshd]
enable = true
port = ssh
logpath = *whatever you logpath is set to*
backend = systemd
Let me know if this helps! I'm a rookie so it feels good to help out :)
Upvotes: 5