我在我们的iptablesconfiguration文件/ etc / sysconfig / iptables中有以下规则
-A INPUT -s 84.23.99.97 -j DROP
而当我做iptables – 列表我得到以下
Chain INPUT (policy ACCEPT) target prot opt source destination DROP all -- 84.23.99.97 anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
但是,如果我做了一个tcpdump,我仍然可以看到这个ip的所有stream量,为什么?
tcpdump -ttttn tcp port 1234 | grep 84.23.99.97 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes 2010-10-21 23:49:33.828011 IP 84.23.99.97.9061 > myip: Flags [S], seq 3522466008, win 65535, options [mss 1460,sackOK,eol], length 0 2010-10-21 23:49:33.832182 IP 84.23.99.97.64804 > myip: Flags [S], seq 1088176500, win 65535, options [mss 1460,sackOK,eol], length 0 ....
tcpdump 在入侵iptables之前看到入站stream量 。 在上面的示例中,这解释了为什么您会看到入站的SYN,而不是来自您的机器的SYN / ACK。
你需要保存你的规则。 也许你做了,但没有提到呢? 如果不是这样的话:%sudo / sbin / service iptables save
这导出当前使用的规则并启动防火墙。 不pipe你在/ etc / sysconfig / iptables中有什么,这将告诉你防火墙实际使用的是什么。