Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
150 views
in Technique[技术] by (71.8m points)

Cannot ping or ssh to amazon instance launched in VPC

I created a VPC, added an internet gateway, added two subnets, and then launched an instance into that VPC. I created a security group that permits any traffic from anywhere and assigned it to that instance. I assigned to enable a public IP address (I didn't assign it an elastic ip).

I cannot for the life of me figure out why I cannot connect to public ip address of instance. I've literally gone back destroyed and created my vpc and instances with no luck.

There has got to be something simple I'm missing, it cannot be this difficult. What is going on??

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You have created the internet gateway but must have forgot to attach the Internet Gateway to the Subnet in which you are launching the EC2 instances. Go to the subnet in which you have launched the EC2 instances and attach the Internet gateway to the subnet. When you check the route table for the subnet it should look some thing like this screenshot. That "igw" is the internet gateway.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...