AWS VPC can t access Internet despite configuring NAT Internet Gateway according to rules

0 votes

I'm a bit lost on that one - I've followed AWS documentation and it seems that there is nothing more I can find. The situation summary is that I have an EC2 instance within a VPC and it can't reach the Internet despite following Amazon AWS instructions in setting up a NAT for the VPC

  1. I have a VPC with one subnet (CIDR 10.0.0.0/24) and one EC2 instance in (it has private IP address within VPC only, 10.0.0.168)

  2. I have created an Internet Gateway and attached it to the said VPC.

  3. I have created a Network ACL with All Traffic Allow for 0.0.0.0/0 for both Inbound and Outbound traffic and attached the ACL to the VPC's only subnet.

Mar 14, 2022 in Others by Edureka
• 13,670 points
625 views

1 answer to this question.

0 votes

You'll need two subnets. One is public, and the other is private.

Subnet that is open to the public

Public IP addresses can be enabled on a public network. It must have a NAT gateway as well as a route table:

Target Subnet 10.0.0.0/24
 local 0.0.0.0/0 internet-gateway private subnet

The private subnet should be used for your private instance. A route table should be present on the subnet:

10.0.0.0/24 is the local destination target.
0.0.0.0/0 nat-gateway-id \sNACL

It is preferable to leave the default NACLs alone. It's quite easy to make a mistake with these. Only security groups should be used to control access to and from your instance.

answered Mar 25, 2022 by Edureka
• 13,670 points

Related Questions In Others

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

How to create subnet inside a VPC in AWS using Terraform?

Hi@akhtar, You need to use aws_subnet resource inside your ...READ MORE

answered Jul 21, 2020 in Others by MD
• 95,440 points
446 views
0 votes
0 answers

Why can't I connect to AWS RDS?

0 I'm trying to connect to my new ...READ MORE

Mar 1, 2022 in Others by Edureka
• 13,670 points
401 views
0 votes
1 answer

how to access AWS S3 from Lambda in VPC

With boto3, the S3 urls are virtual by default, ...READ MORE

answered Sep 28, 2018 in AWS by Priyaj
• 58,090 points
9,614 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How can I restrict access to an S3 website to Cloudfront?

Make a CloudFront access identity for origin ...READ MORE

answered Mar 24, 2022 in Others by Edureka
• 13,670 points
2,112 views
0 votes
2 answers

How to copy a formula horizontally within a table using Excel VBA?

Hi so basically, create an adjacent column ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,670 points
769 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP