Search⌘ K
AI Features

Understand and Configure the NAT Gateway

Explore how to configure NAT gateways in AWS VPC to enable secure, outgoing-only internet access for private subnets. Understand key concepts like IP masquerading, NAT64, and the role of Elastic IPs. Follow practical steps to create, route, describe, and delete NAT gateways to enhance your cloud network security and resilience.

Introduction

Let’s assume we want to use our EC2 instance to connect to the public internet to download a software package. One approach is to launch the EC2 instance in the public subnet while allowing access to the public internet via the internet gateway. However, what if we want our private instance to have outgoing-only internet access and download the software package but not be reachable via the public internet?

To achieve this, we can use NAT (Network Address Translation) devices. A NAT device allows private resources to connect to the public internet, VPCs, or on-prem networks while not forwarding any incoming requests to private resources.

A NAT gateway replaces the source IP address of ...