Articles → AWS → NAT Gateway In AWS
NAT Gateway In AWS
What Is NAT Gateway?
How To Create A NAT Gateway?
- Create a private subnet
- Create a new route table
- Associate the subnet with the route table
- Launch two EC2 Linux instances
- Enable OpenSSH Authentication Agent service
- Log in to the Linux instance using the SSH utility
- Ping Google
- Create a NAT gateway
- Add an entry of NAT gateway in the route table
- Ping Google again
Create A Private Subnet
Click to Enlarge
Create A New Route Table
Click to Enlarge
Associate The Subnet With The Route Table
Click to Enlarge
Launch Two EC2 Linux Instances
Click to Enlarge
Enable Openssh Authentication Agent Service
Click to Enlarge
Log In To The Linux Instance Using SSH Utility
Click to Enlarge
ssh -A ec2-user@<Public IP address of EC2 instance>
Click to Enlarge
ssh ec2-user@<Private IP of EC2 instance>
Click to Enlarge
Ping Google
Click to Enlarge
Create A NAT Gateway
Click to Enlarge
Click to Enlarge
Field | Value |
---|
Name | Any custom name of the NAT gateway. |
Subnet | Select the Public subnet. |
Elastic IP allocation ID | Select the elastic IP. If an elastic IP does not exist, then click on the “Allocate Elastic IP” button to create it. |
Click to Enlarge
Add An Entry Of NAT Gateway In The Route Table
Click to Enlarge
Ping Google Again
Click to Enlarge
Posted By - | Karan Gupta |
|
Posted On - | Wednesday, July 27, 2022 |