无法启动 Fail2Ban

无法启动 Fail2Ban

最近我收到 3 封来自 Fail2Ban 的电子邮件

  • 监狱 nginx-http-auth 已被停止。
  • 监狱 nginx-badbots 已被停止。
  • 监狱 ssh 已停止。

然后我启动 SSH 进入我的虚拟机,这是日志

└── tail -f /var/log/fail2ban.log
2019-09-17 21:06:06,201 fail2ban.actions: WARNING [ssh] Unban 49.73.61.65
2019-09-17 21:06:06,208 fail2ban.actions: WARNING [ssh] Unban 178.128.104.155
2019-09-17 21:06:06,215 fail2ban.actions: WARNING [ssh] Unban 139.59.13.51
2019-09-17 21:06:06,221 fail2ban.actions: WARNING [ssh] Unban 139.59.84.111
2019-09-17 21:06:06,227 fail2ban.actions: WARNING [ssh] Unban 138.197.221.114
2019-09-17 21:06:06,232 fail2ban.actions: WARNING [ssh] Unban 49.88.112.114
2019-09-17 21:06:06,241 fail2ban.actions.action: ERROR  iptables -D INPUT -p tcp -m multiport --dports ssh -j fail2ban-ssh
iptables -F fail2ban-ssh
iptables -X fail2ban-ssh returned 100
2019-09-17 21:07:06,335 fail2ban.jail   : INFO   Jail 'ssh' stopped

然后我试着停下来再开始

service fail2ban stop
service fail2ban start

我不断得到

└── service fail2ban stop                                                                                                                                       
 * Stopping authentication failure monitor fail2ban                                                                                                      [ OK ] 
└── service fail2ban start                                                                                                                               
 * Starting authentication failure monitor fail2ban                                                         * Socket file /var/run/fail2ban/fail2ban.sock is present

我该如何进一步解决这个问题?

答案1

尝试使用fail2ban-client reload然后重新启动您的服务。

相关内容