Configuring a Route Pointing to the NAT Gateway

Last Updated At: 2025-10-29 15:04:44

After you create a NAT Gateway, you need to configure routing rules to direct subnet traffic to the NAT Gateway.

  1. In the sidebar on the left side of the VPC console, click Route Table.
  2. In the route table list, click the route table ID associated with the subnet that needs to access the internet to enter the route table details page, then click Add Routing Policy in the routing policy.


3. Enter the destination in the pop-up box, select NAT Gateway for the next hop type, and select the created NAT Gateway ID for the next hop.


4. Click Create, and after the above configuration is completed, the traffic from the CVM in the subnet associated with this route table will be directed to the NAT Gateway when the CVM accesses the internet.