You are not logged in.

#1 2020-04-27 22:31:27

5ulo
Member
From: Slovakia
Registered: 2012-05-04
Posts: 100

[SOLVED] fail2ban - jail 'sshd' does not exist

I recently installed fail2ban on a freshly updated arch. Followed instructions on the Wiki page but I am unable to run f2b correctly.
This is the f2b sshd config

[root@box e]# cat /etc/fail2ban/sshd.local 
[sshd]
enabled = true
port    = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s
maxretry = 3
findtime = 1d
bantime = 2w

No rule in iptables

[root@box e]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination 

And f2b sshd status

[root@box e]# fail2ban-client status sshd
2020-04-28 00:23:32,084 fail2ban                [1425]: ERROR   NOK: ('sshd',)
Sorry but the jail 'sshd' does not exist

The result of this situation is that there's not a single jail on ssh login attempt.
I really can't find any useful information about that 'sshd' jail does not exist part.. Any idea what to check? Thanks for any advice.

Last edited by 5ulo (2020-04-28 14:04:18)

Offline

#2 2020-04-27 23:35:53

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: [SOLVED] fail2ban - jail 'sshd' does not exist

Unless I'm missing something, looks look the name/path of your .local file is wrong. I have mine in /etc/fail2ban/jail.local, and the wiki mentions /etc/fail2ban/jail.d/sshd.local, I think.

Offline

#3 2020-04-28 10:27:46

5ulo
Member
From: Slovakia
Registered: 2012-05-04
Posts: 100

Re: [SOLVED] fail2ban - jail 'sshd' does not exist

I am so ashamed :-D thanks @firecat53 that was it.. that little /jail.d/ dir. Now it is working as expected.

Offline

#4 2020-04-28 13:13:13

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] fail2ban - jail 'sshd' does not exist

Please remember to mark your thread [SOLVED] (edit the title of your first post).


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

Board footer

Powered by FluxBB