Articles → AWS → NAT Gateway In AWS
NAT Gateway In AWS
What Is NAT Gateway?
How To Create NAT Gateway?
- Create a private subnet
- Create a new route table
- Associate the subnet with the route table
- Launch 2 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 2 EC2 Linux Instances
Click to Enlarge
Enable Openssh Authentication Agent Service
Click to Enlarge
Login 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 NAT gateway |
Subnet | Select the Public subnet |
Elastic IP allocation ID | Select the elastic IP. If elastic IP does not exists then click on the “Allocate Elastic IP” button to create it |
Click to Enlarge
Add An Entry Of NAT Gateway In Route Table
Click to Enlarge
Ping Google Again
Click to Enlarge