What Is NAT Gateway?
The NAT Gateway service provides the network address translation (NAT) function for servers, such as Elastic Cloud Servers (ECSs), Bare Metal Servers (BMSs), and Workspace desktops, in a Virtual Private Cloud (VPC) or servers that connect to a VPC through Direct Connect or Virtual Private Network (VPN) in local data centers, allowing these servers to access the Internet using elastic IP addresses (EIPs) or to provide services for the Internet.
NAT Gateway supports source NAT (SNAT) and destination NAT (DNAT) functions.
- The SNAT function translates a private IP address to a public IP address by binding EIPs to servers in a VPC, providing secure and efficient access to the Internet.
Figure 1 shows the SNAT architecture.
- The DNAT function enables servers that share the same EIPs in a VPC to provide external services through the mappings between IP addresses and ports.
Figure 2 shows the DNAT architecture.