我在我的服务器上,我无法ping任何外面的东西。 我尝试了例如google.com。 我如何诊断这个问题? 我可以ping我的本地主机(ping工程)
这是我的跟踪到google.com:
[root@ip-10-112-63-16 tony]# traceroute google.com traceroute to google.com (74.125.113.147), 30 hops max, 40 byte packets 1 * * * 2 * * * 3 * * * 4 * * * 5 * * * 6 * * * 7 * * * 8 * * * 9 * * * 10 * * * 11 * * * 12 * * * 13 * * * 14 * * * 15 * * * 16 * * * 17 * * * 18 * * * 19 * * * 20 * * * 21 * * * 22 * * * 23 * * * 24 * * * 25 * * * 26 * * * 27 * * * 28 * * * 29 * * * 30 * * *
这是路由的结果-n:
[root@ip-10-112-63-16 tony]# /sbin/route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.112.62.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0 0.0.0.0 10.112.62.1 0.0.0.0 UG 0 0 0 eth0
这些是我的iptables:
[root@ip-10-112-63-16 tony]# /sbin/iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
据此( http://aws.amazon.com/articles/1145 )默认情况下,EC2阻止ICMP。 你需要发出这个命令来允许它
ec2-authorize默认-P icmp -t -1:-1 -s 0.0.0.0/0