|
|

楼主 |
发表于 2007-11-7 15:54:11
|
显示全部楼层
谢谢,确实是iptables的问题,我在“系统”->“管理”->“服务”中停止“iptalbes”,在Windows XP中就可以Ping通]了,但重新开启iptables后,还可以Ping通(而开通时没有ping过的rjh.yx.edu.cn此时是ping不通的),重启了iptables(service iptables restart)也一样,怎么才能立即生效呢?
使用命令:- # iptables -A INPUT -i eth0 -p tcp --dport 53 -j ACCEPT
- # /etc/rc.d/init.d/iptables save
- # service iptables restart
- # iptables -L -n
- Chain INPUT (policy ACCEPT)
- target prot opt source destination
- RH-Firewall-1-INPUT 0 -- 0.0.0.0/0 0.0.0.0/0
- ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:53
- Chain FORWARD (policy ACCEPT)
- target prot opt source destination
- REJECT 0 -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
- Chain OUTPUT (policy ACCEPT)
- target prot opt source destination
- Chain RH-Firewall-1-INPUT (1 references)
- target prot opt source destination
- ACCEPT 0 -- 0.0.0.0/0 0.0.0.0/0
- ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 255
- ACCEPT esp -- 0.0.0.0/0 0.0.0.0/0
- ACCEPT ah -- 0.0.0.0/0 0.0.0.0/0
- ACCEPT udp -- 0.0.0.0/0 224.0.0.251 udp dpt:5353
- ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:631
- ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:631
- ACCEPT 0 -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
- ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
- REJECT 0 -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
复制代码 此时是开通了53端口还是没开通53端口,搞不清了,因为此时在Windows XP还是ping不通rjh.yx.edu.cn(由于从前面的配置可以看出,www只是rjh的别名,在刚刚关闭iptables时ping通过,现在限制不了,只能用rjh.yx.edu.cn来测试了)。
平常不常用Linux,所以总是一知半解,查了半天资料,也只能明白了一些,还有些不明白,还望继续赐教! |
|