- 论坛徽章:
- 0
|
我的一台阿里云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
|
|