Answer the question
In order to leave comments, you need to log in
Why is fail2ban not working?
Good afternoon. Centos7, firewalld, fail2ban ((
jail.local
[DEFAULT]
findtime = 3600
[sshd]
enabled = true
port = ssh
maxretry = 3
action = firewallcmd-ipset
2016-11-23 13:52:05,603 fail2ban.filter [31078]: INFO [sshd] Found 221.229.172.103
2016-11-23 13:52:05,706 fail2ban.filter [31078]: INFO [sshd] Found 221.229.172.103
2016-11-23 13:52:06,122 fail2ban.actions [31078]: NOTICE [sshd] 221.229.172.103 already banned
2016-11-23 13:52:06,706 fail2ban.filter [31078]: INFO [sshd] Found 221.229.172.103
2016-11-23 13:52:07,259 fail2ban.filter [31078]: INFO [sshd] Found 221.229.172.103
2016-11-23 13:52:07,285 fail2ban.filter [31078]: INFO [sshd] Found 221.229.172.103
2016-11-23 13:52:07,484 fail2ban.filter [31078]: INFO [sshd] Found 221.229.172.103
2016-11-23 13:52:08,125 fail2ban.actions [31078]: NOTICE [sshd] 221.229.172.103 already banned
2016-11-23 13:52:08,885 fail2ban.filter [31078]: INFO [sshd] Found 221.229.172.103
2016-11-23 13:52:09,127 fail2ban.actions [31078]: NOTICE [sshd] 221.229.172.103 already banned
2016-11-23 13:52:12,242 fail2ban.filter [31078]: INFO [sshd] Found 221.229.172.103
2016-11-23 13:52:44,789 fail2ban.filter [31078]: INFO [sshd] Found 221.229.172.103
2016-11-23 13:52:45,371 fail2ban.filter [31078]: INFO [sshd] Found 221.229.172.103
2016-11-23 13:52:46,174 fail2ban.actions [31078]: NOTICE [sshd] 221.229.172.103 already banned
Answer the question
In order to leave comments, you need to log in
I solved the problem simply - I made authorization by key, and access by password for ssh was closed tightly. (having previously checked with technical support the possibility of restoring access in case of loss of the key and pushing it across all available media). And fail2ban sent me to the ban.
There was also a question about this. CentOS 7. Decided as follows.
Added jail.loc file to /etc/fail2ban folder
[DEFAULT]
##, <здесь можно написать свой ip>
ignoreip = 127.0.0.1/8
[sshd]
findtime = 3600
maxretry = 3
##имеется максимально возможное значение!
bantime = 86400
enabled = true
##это корень зол
action = iptables
## по крайней мере у меня
##через firewalld подавались неправильные команды
##(их можно настроить в файлах папки action.d,
##но не стал с этим заморачиваться)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question