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

Notes and Constraints

Observe the following constraints when using a NAT gateway:
  • Multiple rules for one NAT gateway can use the same EIP, but the rules for different NAT gateways must use different EIPs.
  • Each VPC can only have one NAT gateway.
  • Manually adding the default route for a VPC is not allowed.
  • Each VPC subnet can only be used in one SNAT rule.
  • SNAT and DNAT rules are designed for different functions. If SNAT and DNAT rules reuse the same EIP, resource preemption will occur. An SNAT rule cannot share an EIP with a DNAT rule with Port Type set to All ports.
  • DNAT rules do not support the mapping between an EIP and a virtual IP address.
  • If both an EIP and a NAT gateway are configured for a server, data will be forwarded through the EIP.
  • The custom CIDR block configured when adding an SNAT rule must be a subset of the VPC subnet CIDR blocks.
  • The custom CIDR block must be a CIDR block of a Direct Connect connection and cannot conflicts with VPC's existing subnet CIDR blocks.
  • When you perform operations on underlying resources of an ECS, for example, changing its specifications, the configured NAT gateway rules become invalid. You need to delete the rules and reconfigure them.