Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (19.1k points)

I have Amazon VPC set through the wizard as "public only network", so all my instances are in public subnet.

Instances within VPC that have Elastic IP assigned connect to the internet without any troubles.

But instances without elastic IP can't connect anywhere.

The Internet gateway is present. Route table in aws console looks like

Destination      Target      local          igw-nnnnn

and route from inside instance shows

Kernel IP routing table

Destination     Gateway    Genmask        Flags Metric Ref Use Iface        *  U     0      0     0 eth0

default        UG    100    0     0 eth0

I tried to open ALL inbound and outbound traffic to in a security group that an instance belongs to. Still no success.

~$ ping

PING ( 56(84) bytes of data.


--- ping statistics ---

6 packets transmitted, 0 received, 100% packet loss, time 5017ms

What else can I do?

1 Answer

0 votes
by (44.4k points)

It seems that the only way to get outside from instances that do not have Elastic IP is:

  • add a NAT (Launch an additional m1.small instance from ami-vpc-nat-beta) and assign EIP to that
  • Create an extra subnet which will be "private"
  • Move non-EIP-instances to that private subnet
  • Modify route tables: from the private subnet ought to go to NAT

So, just adding NAT is not enough. Instances should be stopped and moved to a different IP from another subnet.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories