All Products
Search
Document Center

NAT Gateway:DescribeForwardTableEntries

Last Updated:Oct 26, 2026

Queries the created DNAT entries.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vpc:DescribeForwardTableEntries

get

*ForwardTable

acs:vpc:{#regionId}:{#accountId}:forwardtable/{#ForwardTableId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the NAT gateway.

You can call the DescribeRegions operation to obtain the region ID.

cn-hangzhou

ForwardTableId

string

No

The ID of the DNAT table.

Note

You must specify at least one of the ForwardTableId and NatGatewayId parameters.

ftb-bp1mbjubq34hlcqpa****

ForwardEntryId

string

No

The ID of the DNAT entry.

fwd-8vbn3bc8roygjp0gy****

ExternalIp

string

No

  • When you query the DNAT entries of an Internet NAT gateway, this parameter specifies the elastic IP address (EIP) that provides public network access in the DNAT entry.

  • When you query the DNAT entries of a VPC NAT gateway, this parameter specifies the NAT IP address that is accessed by external networks.

116.28.XX.XX

ExternalPort

string

No

  • When you query the DNAT entries of an Internet NAT gateway, this parameter specifies the external port or port range used for port forwarding.

    • The port range must be between 1 and 65535.

    • To query a port range, separate the start port and end port with a forward slash (/). Example: 10/20.

    • If the queried ExternalPort is a port range, the queried InternalPort must also be set to a port range, and the number of ports in both ranges must be the same. For example, if ExternalPort is set to 10/20, InternalPort must be set to 80/90.

  • When you query the DNAT entries of a VPC NAT gateway, this parameter specifies the port of the NAT IP address that is accessed by external networks. Valid values: 1 to 65535.

8080

InternalIp

string

No

The private IP address.

  • When you query the DNAT entries of an Internet NAT gateway, this parameter specifies the private IP address of the ECS instance that communicates with the Internet through the DNAT entry.

  • When you query the DNAT entries of a VPC NAT gateway, this parameter specifies the private IP address that needs to communicate through the DNAT rule.

192.168.XX.XX

InternalPort

string

No

  • When you query the DNAT entries of an Internet NAT gateway, this parameter specifies the internal port or port range used for port forwarding. Valid values: 1 to 65535.

  • When you query the DNAT entries of a VPC NAT gateway, this parameter specifies the destination ECS instance port to be mapped. Valid values: 1 to 65535.

80

IpProtocol

string

No

The protocol type. Valid values:

  • tcp: forwards TCP packets.

  • udp: forwards UDP packets.

  • any: forwards packets of all protocols.

tcp

ForwardEntryName

string

No

The name of the DNAT entry.

The name must be 2 to 128 characters in length, and must start with a letter or Chinese character. It can contain digits, underscores (_), and hyphens (-).

ForwardEntry-1

PageNumber

integer

No

The page number of the list. Default value: 1.

1

PageSize

integer

No

The number of entries per page for a paged query. Maximum value: 50. Default value: 10.

10

NatGatewayId

string

No

The ID of the NAT gateway to query.

Note

You must specify at least one of the ForwardTableId and NatGatewayId parameters.

ngw-bp1uewa15k4iy5770****

Response elements

Element

Type

Description

Example

object

PageSize

integer

The number of entries per page.

10

RequestId

string

The request ID.

A6C4A8B1-7561-4509-949C-20DEB40D71E6

PageNumber

integer

The current page number.

1

TotalCount

integer

The total number of entries in the list.

5

ForwardTableEntries

object

ForwardTableEntry

array<object>

The details of the queried DNAT table.

object

The details of the queried DNAT table.

Status

string

The status of the DNAT entry. Valid values:

  • Pending: The entry is being configured. It may be in the process of being created or modified.

  • Available: The entry is available.

  • Deleting: The entry is being deleted.

Available

ForwardEntryId

string

The ID of the DNAT entry.

fwd-119smw5tk****

InternalIp

string

The private IP address.

  • When you query the DNAT entries of an Internet NAT gateway, this response parameter indicates the private IP address of the ECS instance that communicates with the Internet through the DNAT entry.

  • When you query the DNAT entries of a VPC NAT gateway, this response parameter indicates the private IP address that needs to communicate through the DNAT rule.

192.168.XX.XX

InternalPort

string

  • When you query the DNAT entries of an Internet NAT gateway, this parameter indicates the internal port or port range used for port forwarding.

  • When you query the DNAT entries of a VPC NAT gateway, this parameter indicates the destination ECS instance port to be mapped.

25

ForwardEntryName

string

The name of the DNAT entry.

ForwardEntry-1

ForwardTableId

string

The ID of the DNAT table to which the DNAT entry belongs.

ftb-11tc6xgmv****

IpProtocol

string

The protocol type. Valid values:

  • tcp: forwards TCP packets.

  • udp: forwards UDP packets.

  • any: forwards packets of all protocols.

tcp

ExternalPort

string

  • When you query the DNAT entries of an Internet NAT gateway, this response parameter indicates the external port or port range used for port forwarding.

  • When you query the DNAT entries of a VPC NAT gateway, this response parameter indicates the port of the NAT IP address that is accessed by external networks.

80

ExternalIp

string

  • When you query the DNAT entries of an Internet NAT gateway, this response parameter indicates the public IP address that provides public network access in the DNAT entry.

  • When you query the DNAT entries of a VPC NAT gateway, this response parameter indicates the NAT IP address that is accessed by external networks.

139.79.XX.XX

NatGatewayId

string

The ID of the NAT gateway to which the DNAT entry belongs.

ngw-bp1uewa15k4iy5770****

Examples

Success response

JSON format

{
  "PageSize": 10,
  "RequestId": "A6C4A8B1-7561-4509-949C-20DEB40D71E6",
  "PageNumber": 1,
  "TotalCount": 5,
  "ForwardTableEntries": {
    "ForwardTableEntry": [
      {
        "Status": "Available",
        "ForwardEntryId": "fwd-119smw5tk****",
        "InternalIp": "192.168.XX.XX",
        "InternalPort": "25",
        "ForwardEntryName": "ForwardEntry-1",
        "ForwardTableId": "ftb-11tc6xgmv****",
        "IpProtocol": "tcp",
        "ExternalPort": "80",
        "ExternalIp": "139.79.XX.XX",
        "NatGatewayId": "ngw-bp1uewa15k4iy5770****"
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 IncorretForwardEntryStatus Some Forward entry status blocked this operation..
400 DESCRIBE_FORWARD_PARAM_INVALID ForwardTableId and natGatewayId can not both be null
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records.
404 InvalidForwardTableId.NotFound Specified forwardTableId does not exist

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.