手工解除fail2ban封锁的IP地址

手工解除fail2ban封锁的IP地址

首先检查fail2ban的log文件,看是哪一个jail的规则触发了封锁,比如apache的规则。然后可以使用fail2ban-client确认该规则的封锁状态:

root@minisipserver:~$ fail2ban-client status apache
Status for the jail: apache
|- filter
|  |- File list:        /var/log/apache2/error.log
|  |- Currently failed: 0
|  `- Total failed:     21
`- action
   |- Currently banned: 1
   |  `- IP list:       184.15.66.88
   `- Total banned:     3

例如,示例中apache的规则封锁了“184.15.66.88”。接着使用以下命令解除对该IP地址的封锁:

fail2ban-client set apache unbanip 184.15.66.88
Comments are closed.