LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 706|回复: 8

我碰到个服务器是这样的规则,是怎么做出来的,老大们能不能教我一下?

[复制链接]
发表于 2004-6-22 14:22:31 | 显示全部楼层 |阅读模式
[root@proxy root]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
DROP       icmp --  anywhere             anywhere           

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
           all  --  anywhere             anywhere           

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  

[root@proxy root]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
220.32.58.128   *               255.255.255.128 U     0      0        0 eth1
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth1
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         220.32.58.254   0.0.0.0         UG    0      0        0 eth1
发表于 2004-6-22 16:35:10 | 显示全部楼层
是不是这样 ?

iptables -A INPUT -p icmp -j DROP

iptables -A FORWARD -j ACCEPT
 楼主| 发表于 2004-6-23 09:35:01 | 显示全部楼层
有朋友解释说IPTABLES里规则是不对PING做出反应。
ROUTE是怎么做的呢?
发表于 2004-6-23 12:21:37 | 显示全部楼层
route 是用route命令来做的。
man一下route
发表于 2004-6-23 14:08:32 | 显示全部楼层
不让ping。。。
IPTABLES -P INPUT ACCEPT
IPTABLES -P FORWARD ACCEPT
IPTABLES -P OUTPUT ACCEPT

IPTABLES -A INPUT -p icmp -j DROP

怎么这么奇怪的规则。
发表于 2004-6-23 17:08:46 | 显示全部楼层
IPTABLES -P INPUT ACCEPT
IPTABLES -P FORWARD ACCEPT
IPTABLES -P OUTPUT ACCEPT
这个是默认,可以不输入。
发表于 2004-6-24 19:10:10 | 显示全部楼层
iptables -A INPUT -p icmp -j DROP
iptables -A FORWARD -j ACCEPT
发表于 2004-6-24 23:42:01 | 显示全部楼层
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
发表于 2004-6-24 23:45:49 | 显示全部楼层
你这样它iptables列出来可没有禁止icmp的规则也,
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表