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, 2022 in Others by Edureka
• 13,690 points
621 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, 2022 by gaurav
• 23,260 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,460 points
635 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,690 points
580 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,100 points
10,088 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
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