检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
Determine the ECS to be used. Query ECSs. API URI format: GET https://{endpoint}/v1/{project_id}/cloudservers/detail For details, see Querying Details About ECSs. Select an ECS based on service requirements and make a note of the port ID of the ECS NIC.
description Parameter Type Description id String Specifies the DNAT rule ID. limit Integer Specifies the number of records on each page. tenant_id String Specifies the project ID. nat_gateway_id String Specifies the public NAT gateway ID. port_id String Specifies the port ID of an ECS
Public services, such as Elastic Cloud Server (ECS), Elastic Volume Service (EVS), Object Storage Service (OBS), Virtual Private Cloud (VPC), Elastic IP (EIP), and Image Management Service (IMS), are shared in the same region.
Table 3 Description of the dnat_rule field Parameter Type Description id String Specifies the DNAT rule ID. tenant_id String Specifies the project ID. nat_gateway_id String Specifies the public NAT gateway ID. port_id String Specifies the port ID of an ECS or BMS. private_ip String
The description can contain up to 255 characters and cannot contain angle brackets (<>). port_id No String Specifies the port ID of an ECS or BMS. This parameter applies to VPC scenarios.
The description can contain up to 255 characters and cannot contain angle brackets (<>). port_id String Specifies the port ID of an ECS or BMS. This parameter applies to VPC scenarios.
Table 2 Description of the dnat_rule field Parameter Mandatory Type Description nat_gateway_id Yes String Specifies the public NAT gateway ID. port_id No String Specifies the port ID of an ECS or BMS.
The description can contain up to 255 characters and cannot contain angle brackets (<>). port_id String Specifies the port ID of an ECS or BMS. This parameter applies to VPC scenarios.
Impact of Expiration If your yearly/monthly ECS is not renewed after it expires, it changes to the Expired state and enters a grace period. If the yearly/monthly NAT gateway is not renewed after the grace period ends, its status turns to Frozen and it enters a retention period.
The description can contain up to 255 characters and cannot contain angle brackets (<>). port_id No String Specifies the port ID of an ECS or BMS. This parameter applies to VPC scenarios.
Figure 1 Verifying that the SNAT rule has been added Step 5: Verify that Server Can Access the Internet Through the NAT Gateway Go to the ECS list page. Log in to the server to be verified. Verify that the server can access the Internet. Figure 2 Verification result
The description can contain up to 255 characters and cannot contain angle brackets (<>). port_id No String Specifies the port ID of an ECS or BMS. This parameter applies to VPC scenarios.
For example, if an EIP has been bound to an ECS, it cannot be bound to a NAT gateway. 400 VPC.2061 Floating Ip %(fip)s has used by nat gateway %(nat_gateway)s. The EIP has been bound to a NAT gateway. Select another EIP. 400 VPC.2062 Floating Ip %(fip)s has been occupied.