Fail2Ban is unable to block ip after multiple try

1.1k views Asked by At

I have installed fail2ban on my Linux server version RHEL5.4. Its not blocking IP after max retry limit as described in jail.conf. When I try to restart the fail2ban I got following error message.

/etc/init.d/fail2ban restart
Stopping fail2ban: [  OK  ]
Starting fail2ban: ERROR  NOK: (2, 'No such file or directory')
[  OK  ]

I have tried many more but failed to got solved the above issue. Following is the ssh jail in jail.conf file.

[ssh]

enabled  = true
filter   = sshd
action   = iptables[name=SSH, port=ssh, protocol=tcp]
           sendmail-whois[name=SSH, [email protected], [email protected], sendername="Fail2Ban"]
logpath  = /var/log/secure
maxretry = 3

Any body can suggest where is the issue.?

1

There are 1 answers

2
Satish On

To configure fail2ban, make a 'local' copy the jail.conf file in /etc/fail2ban

cd /etc/fail2ban

sudo cp jail.conf jail.local

Try to restart with default configuration also before editing anything.