NAT GATEWAY IMPLEMENTATION ON AWS CLOUD

ojotemitopseun

ojo temitope seun

Posted on June 17, 2023

NAT GATEWAY IMPLEMENTATION ON AWS CLOUD

NAT GATEWAY
A NAT gateway is a Network Address Translation (NAT) service in AWS that allows instances in a private subnet to access the internet but prevents inbound traffic from accessing the internal instance.

ADVANTAGES OF NAT-GW

  1. It enhances security for private networks by keeping internal addressing private from the external network.
  2. A NAT gateway supports 5 Gbps of bandwidth and automatically scales up to 45 Gbps.
  3. It is AWS managed service that has higher bandwidth, better availability, and no admin work required.

Conditions for NAT-GW Implementation
 
a. NAT is created in a specific availability zone using an elastic IP address (EIP). Note that NAT GW does not support inter-AZ. That is , you cannot create instances in different AZs communicating with each other via NAT GW.
 
b. For a NAT GW to be created, there must be an existing internet gateway attached to the public VPC where you want to create your NAT GW.
 
c. NAT GW only works within the VPC; separate subnets should be created for private and public subnets within the same VPC.

d. A NAT GW is created inside the public subnet, but the default route is added on the private network using the NAT GW to access the internet.

STEPS TO SET UP NAT GW
a. Create the NAT GW in the public subnet.

Image description

b. Add a default route pointing to the NAT-GW on the private subnet.

Image description

c. SSH into the public EC2 instance and import key pairs for the private EC2 instance created.

Image description

d. Give permission to the private EC2 keypair.

Image description

e. SSH from the public instance to the private instance.

Image description

f. login Successfully to the private instance and ping any websites on internet

Image description

Thanks for your time

💖 💪 🙅 🚩
ojotemitopseun
ojo temitope seun

Posted on June 17, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related