linux – fail2ban:unban ip如何(使用fail2ban-client)
发布时间:2020-12-14 01:01:38 所属栏目:Linux 来源:网络整理
导读:我使用的是fail2ban v.0.8.2,但我无法取消IP: 使用fail2ban-client我看到IP: fail2ban-client status fail2banStatus for the jail: fail2ban|- filter| |- File list: /var/log/fail2ban.log | |- Currently failed: 1| `- Total failed: 8`- action |- C
我使用的是fail2ban v.0.8.2,但我无法取消IP:
使用fail2ban-client我看到IP: fail2ban-client status fail2ban Status for the jail: fail2ban |- filter | |- File list: /var/log/fail2ban.log | |- Currently failed: 1 | `- Total failed: 8 `- action |- Currently banned: 2 | `- IP list: 151.10.65.197 151.10.72.169 `- Total banned: 2 从手册页应该足够做: fail2ban-client get fail2ban actionunban 151.10.65.197 输出命令不会返回错误,但是: iptables -L -nv |grep -b2 -a1 151 16262- pkts bytes target prot opt in out source destination 16351: 0 0 DROP all -- * * 151.10.72.169 0.0.0.0/0 16440: 0 0 DROP all -- * * 151.10.65.197 0.0.0.0/0 16529- 181K 48M RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 和的输出 fail2ban-client status fail2ban 与上面相同,因此命令不会运行. 解决方法
您需要使用fail2ban-client获取jail-name actionunban ipaddress这将允许您取消IP地址.使用iptables -L -n查找要使用的正确jail-name的状态?您给出的命令:fail2ban-client get fail2ban actionunban xxx.xxx.xxx.xxx在输出时是正确的.再次检查状态以确保它尚未被超时解除阻止.这可以解释为什么命令失败.
这是一个很好的页面Fail2ban Manual Unban Single Host (for iptables)取决于版本,unban过程语法(get / set)已经发生了变化. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |