- 论坛徽章:
- 0
|
一個怪問題:
環境: fc6 centos 5.0
我想把主機設成禁ping ...使用以下任何一條命令:
iptables -A INPUT -p icmp --icmp-type echo-request -j DROP
iptables -A OUTPUT p icmp --icmp-type echo-reply -j DROP
然后,我測試結果
在WIN下的是:
Pinging x.x.x.164 with 32 bytes of data:
Reply from x.x.x.168: TTL expired in transit.
Reply from x.x.x.168: TTL expired in transit.
Reply from x.x.x.168: TTL expired in transit.
Reply from x.x.x.168: TTL expired in transit.
Ping statistics for x.x.x.164:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
在linux 下的測試結果:
ping x.x.x.164
PING x.x.x.164 (x.x.x.164) 56(84) bytes of data
From x.x.x.168 icmp_seq=1 Time to live exceeded
From x.x.x.168 icmp_seq=2 Time to live exceeded
From x.x.x.168 icmp_seq=3 Time to live exceeded
From x.x.x.168 icmp_seq=4 Time to live exceeded
--- x.x.x.164 ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3002ms
百思不得其解...??????(兩臺主機是在同個網段.用的redhat 4.0 做的router).. |
|