我通过向导将亚马逊 VPC 设置为“仅限公共网络”,因此我的所有实例都在公共子网中。
VPC 中分配有弹性 IP 的实例可以毫无问题地连接到互联网。
但是没有弹性 IP 的实例无法连接到任何地方。
存在 Internet 网关。aws 控制台中的路由表看起来像
Destination Target
10.0.0.0/16 local
0.0.0.0/0 igw-nnnnn
并从内部实例显示路线
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.255.0 U 0 0 0 eth0
default 10.0.0.1 0.0.0.0 UG 100 0 0 eth0
我试图在实例所属的安全组中打开所有入站和出站流量到 0.0.0.0/0。仍然没有成功。
~$ ping google.com
PING google.com (74.125.224.36) 56(84) bytes of data.
^C
--- google.com ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 5017ms
我还可以做些什么?