for TABLE in filter nat mangle ; do
$IPT -t $TABLE -F
$IPT -t $TABLE -X
done
$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
for DNS in $(grep ^n /etc/resolv.conf|awk '{print $2}'); do
$IPT -A INPUT -p udp -s $DNS --sport domain -j ACCEPT
done
if [ "$INET_IFACE"=PPP0 ]; then
$IPT -t nat -A POSTROUTING -o $INET_IFACE -j MASQUERADE
else
$IPT -t nat -A POSTROUTING -o $INET_IFACE -j SNAT --to $INET_IP
fi
在rhel5 x64能直接通过 ssh 192.168.1.11 登上rhel5 x86, 可是登上去之后 ping 155.35.99.99
[root@laoku01-rhel5-1 ~]# ping 155.35.99.99
PING 155.35.99.99 (155.35.99.99) 56(84) bytes of data.
From 155.35.99.99 icmp_seq=2 Destination Host Unreachable
From 155.35.99.99 icmp_seq=3 Destination Host Unreachable
From 155.35.99.99 icmp_seq=4 Destination Host Unreachable
像是我的路由没有设置好,哪里的问题呢?
然后在非路由linux rhel5x86 上,我删除了路由155.35.0.0,结果ping变成了"Network is unreachable":
#ip route
192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.11
155.35.0.0/16 dev eth0 proto kernel scope link src 155.35.99.98
# ip route delete 155.35.0.0/16
# ip route
192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.11
# ping 155.35.99.99
connect: Network is unreachable