Updated on 2022-08-08 GMT+08:00

What Is NAT Gateway?

The NAT Gateway service provides network address translation (NAT) with 20 Gbit/s of bandwidth for Elastic Cloud Servers (ECSs) and Bare Metal Servers (BMSs) in a Virtual Private Cloud (VPC), or servers that connect to a VPC through Direct Connect or Virtual Private Network (VPN) in on-premises data centers, allowing these servers to share elastic IP addresses (EIPs) to access the Internet or to provide services accessible from the Internet.

NAT Gateway supports source NAT (SNAT) and destination NAT (DNAT).

  • SNAT translates private IP addresses into EIPs, allowing servers in a VPC to share an EIP to access the Internet in a secure and efficient way.

    Figure 1 shows how an SNAT rule works.

    Figure 1 NAT gateway with an SNAT rule

  • DNAT enables servers in a VPC to share an EIP to provide services accessible from the Internet through IP address mapping or port mapping.

    Figure 2 shows how a DNAT rule works.

    Figure 2 NAT gateway with a DNAT rule