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
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 SSH Utility
ssh -A ec2-user@<Public IP address of EC2 instance>
ssh ec2-user@<Private IP of EC2 instance>
Ping Google
Create A NAT Gateway
| 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. |
Add An Entry Of NAT Gateway In The Route Table
Ping Google Again
| Posted By - | Karan Gupta |
| |
| Posted On - | Wednesday, July 27, 2022 |