QUOTE:原帖由 "czcaozheng"]如果你想单向无法ping通的话(就是说192.168.1.2无法ping通你,但你可以ping通192.168.1.2),还应该加一个--syn的参数[/quote 发表:
man iptables
[quote]
[!] --syn
Only match TCP packets with the SYN bit set and the ACK and RST
bits cleared. Such packets are used to request TCP connection
initiation; for example, blocking such packets coming in an
interface will prevent incoming TCP connections, but outgoing
TCP connections will be unaffected. It is equivalent to --tcp-
flags SYN,RST,ACK SYN. If the "!" flag precedes the "--syn",
the sense of the option is inverted.
由此得知,--syn 是属于 TCP 协议的,而不是 ICMP,因此你说的是错误的
若想阻止 ping 而允许 pong,应该细化到 icmp-type 的 0 和 8