AWS NAT Gateways
Amazon Web Services (AWS) NAT Gateway – stands for Network Address Translation. It is a managed AWS service that is scaled based on your usage. NAT Gateway will help you to access the internet which instances are configured in the private subnet but without proper routing, no one can access that instance from outside.
Types Of AWS NAT Gateways
- Public: NAT Gateway that resides in a public subnet. You can access the internet from the instance which is residing in the private subnet but others cant access this instance which is in the private subnet through the internet without proper routing to the subnets.
- Private: Private NAT Gateways are mostly used for communication between VPCs or between VPCs and Transit Gateway. You can’t access Elastic IP with the private NAT Gateway.
The main use case of NAT Gateway is to allow you to have Internet access in private subnets of your Virtual Private Cloud. This way your instances still can’t be accessed from the Internet but the instances themselves can access the Internet. So you have Internet access without having a risk of being hacked through publicly accessible instances.
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.