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. Details below:

  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.

  4. VPC subnet security group also allows all traffic in and out for 0.0.0.0/0

  5. I have created a NAT Gateway which has a private IP address within the VPC (10.0.0.95) and a public Elastic IP address (let's say 18.154.34.97, but I assume this doesn't matter). This NAT Gateway is attached to the VPC's only subnet.

  6. I have created routing table that is associated with VPC's subnet (10.0.0.0/24) and contains two entries:

Mar 15 in Others by Edureka
• 9,700 points
34 views

1 answer to this question.

0 votes

A total of two subnets is required. One is open to the public, while the other is closed to the public.

Subnetwork open to the general public

The public IP address of a public subnet can be enabled. A NAT gateway and a route table should be included:

    Destination     Target
    10.0.0.0/24     local
    0.0.0.0/0       internet-gateway

subnet (private)

In the private subnet, your private instance should be. A route table for the subnet is required: 

  

     Destination     Target
    10.0.0.0/24      local
     0.0.0.0/0       nat-gateway-id
answered Mar 21 by Edureka
• 8,820 points

Related Questions In Others

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,340 points
150 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 in Others by Edureka
• 9,700 points
71 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,060 points
8,013 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP