免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1482 | 回复: 2
打印 上一主题 下一主题

[其他] 关于 iptables 一个奇怪的问题(fail2ban) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-12-16 22:12 |只看该作者 |倒序浏览
我的一台阿里云vps, 只要打开 fail2ban, 拦截几个攻击IP 加到iptables, 服务器就不能访问了(ssh nginx 都访问不了, 只能通过后台重启)

此时 iptables 内容如下, 我死活没找出问题, 求帮忙

[root@ss fail2ban]# iptables -nL
Chain INPUT (policy DROP)
target     prot opt source               destination         
fail2ban-HTTP  tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain fail2ban-HTTP (1 references)
target     prot opt source               destination         
REJECT     all  --  120.32.147.118       0.0.0.0/0           reject-with icmp-port-unreachable
RETURN     all  --  0.0.0.0/0            0.0.0.0/0         

我的fail2ban 配置如下, 拦截在1分钟内太多访问的IP

[nginx-get-dos]
enabled = true
action = iptables[name=HTTP, port=http, protocol=tcp]
port = http
filter = nginx
logpath = /var/log/nginx/access.log
maxretry = 250
findtime = 60
bantime = 1800

论坛徽章:
0
2 [报告]
发表于 2014-12-17 13:45 |只看该作者
  各位大神 可否出手

论坛徽章:
0
3 [报告]
发表于 2014-12-17 19:00 |只看该作者
找到问题了

Chain INPUT (policy DROP)

引起的, iptables --policy INPUT ACCEPT   即可搞定
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP