我正在使用 Apache 2/MySQL 运行 Centos 6.0 服务器。我已经运行了 iptables。我今晚按照以下步骤使用 iptables 阻止来自 IP 的所有流量:
iptables -A INPUT -s xxx.xxx.xxx.xxx -j DROP
iptables -A OUTPUT -d xxx.xxx.xxx.xxx -j DROP
service iptables save
service iptables restart
Run Code Online (Sandbox Code Playgroud)
但是我仍然在我的 Apache 访问日志中不断看到来自这个 IP 的点击,即使在我重新启动 Apache 之后也是如此。iptables 肯定正在运行,而且它绝对是正确的 IP 地址。
这些是我其余的 iptables 条目:
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- anywhere anywhere
2 REJECT all -- anywhere loopback/8 reject-with icmp-port-unreachable
3 ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
4 ACCEPT tcp …Run Code Online (Sandbox Code Playgroud)