Work With NAT Gateways
Follow the below steps to create a Nat Gateway using the AWS console:
- Open the AWS console and type “Nat Gateway” in the search bar. And select it (from the Features submenu).
- Then hit “Create NAT gateway”. You should see the following screen:
- Fill out the name and tags as you wish.
- Choose the subnet you want your NAT Gateway to live in. Make sure it has an Internet access to make our NAT Gateway Public.
- Then hit “Allocate Elastic IP” if you don’t have any. Elastic IP – is a static IP that your NAT Gateway will always have. You can be sure that it stays the same.
- Click the “Create NAT gateway” orange button.
NAT Gateway will allow the outbound traffic to the internet of the instance which is having in the private subnet to know more how to configure private NAT refer to the How to Set up a NAT Gateway For a Private Subnet in Amazon VPC?.
Amazon Web Services – Introduction to NAT GatewaysAWS NAT Gateway Use Cases
To access the Internet, one public IP address is needed, but we can use a private IP address in our private network. The idea of NAT is to allow multiple devices to access the Internet through a single public address. To achieve this, the translation of a private IP address to a public IP address is required. Network Address Translation (NAT) is a process in which one or more local IP address is translated into one or more Global IP address and vice versa in order to provide Internet access to the local hosts. Also, it does the translation of port numbers i.e. masks the port number of the host with another port number, in the packet that will be routed to the destination. It then makes the corresponding entries of IP address and port number in the NAT table. NAT generally operates on a router or firewall.