Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::VPC::ForwardEntry

Última atualização: Jun 27, 2026

Adiciona uma entrada DNAT a uma tabela DNAT.

Sintaxe

{
  "Type": "ALIYUN::VPC::ForwardEntry",
  "Properties": {
    "ExternalPort": String,
    "ExternalIp": String,
    "IpProtocol": String,
    "PortBreak": Boolean,
    "InternalPort": String,
    "ForwardEntryName": String,
    "InternalIp": String,
    "ForwardTableId": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

ExternalPort

String

Sim

Não

Porta externa ou intervalo de portas.

  • Porta externa ou intervalo usado para encaminhamento ao configurar uma entrada DNAT em um gateway NAT da Internet.

    • Valores válidos: 1 a 65535.

    • Para especificar um intervalo, separe a porta inicial e a final com uma barra (/), por exemplo, 10/20.

    • Se você definir ExternalPort como um intervalo, também deverá definir InternalPort como um intervalo. A quantidade de portas em ambos deve ser idêntica. Por exemplo, se ExternalPort for 10/20, defina InternalPort como 80/90.

  • Porta acessível via redes externas ao configurar uma entrada DNAT em um gateway NAT de VPC. Valores válidos: 1 a 65535.

ExternalIp

String

Sim

Não

Endereço IP.

  • Endereço IP elástico (EIP) acessível pela Internet ao configurar uma entrada DNAT em um gateway NAT da Internet.

  • Endereço IP do NAT acessível por redes externas ao configurar uma entrada DNAT em um gateway NAT de VPC.

IpProtocol

String

Sim

Não

Tipo de protocolo.

Valores válidos:

  • TCP: encaminha pacotes TCP.

  • UDP: encaminha pacotes udp.

  • Any: encaminha pacotes de todos os protocolos. Se você definir IpProtocol como Any, também deverá definir ExternalPort e InternalPort como Any para implementar o mapeamento de IP DNAT.

PortBreak

Boolean

Não

Não

Indica se os limites do intervalo de portas devem ser removidos.

Valores válidos:

  • true

  • false (padrão)

Nota

Se uma entrada SNAT e uma entrada DNAT utilizarem o mesmo endereço IP público e você precisar especificar um número de porta maior que 1024, defina PortBreak como true.

InternalPort

String

Sim

Não

Porta interna ou intervalo de portas.

  • Porta interna ou intervalo utilizado no encaminhamento ao configurar uma entrada DNAT em um gateway NAT da Internet. Valores válidos: 1 a 65535.

  • Porta da instância ECS de destino a ser mapeada ao configurar uma entrada DNAT em um gateway NAT de VPC. Valores válidos: 1 a 65535.

ForwardEntryName

String

Não

Não

Nome da entrada DNAT.

Nenhuma.

InternalIp

String

Sim

Não

Endereço IP privado.

  • Endereço IP privado da instância ECS que se comunica com a Internet ao configurar uma entrada DNAT em um gateway NAT da Internet. Os seguintes requisitos devem ser atendidos:

    • O endereço IP privado deve pertencer ao bloco CIDR da VPC onde o gateway NAT está localizado.

    • A entrada DNAT entra em vigor apenas quando o endereço IP privado estiver em uso por uma instância ECS e essa instância não estiver associada a um EIP.

  • Endereço IP privado que utiliza DNAT para comunicação ao configurar uma entrada DNAT em um gateway NAT de VPC.

ForwardTableId

String

Sim

Não

ID da tabela DNAT.

Nenhuma.

Valores de retorno

Fn::GetAtt

ForwardEntryId: o ID da entrada DNAT.

Exemplos

  • YAML formato

    ROSTemplateFormatVersion: '2015-09-01'
    Metadata:
      ALIYUN::ROS::Interface:
        ParameterGroups:
        - Label:
            default:
              en: DNAT Configure
              zh-cn: "DNAT\u8BBE\u7F6E"
          Parameters:
          - ForwardTableId
          - PortBreak
          - ForwardEntryName
        - Label:
            default:
              en: Network Configure
              zh-cn: "\u7F51\u7EDC\u8BBE\u7F6E"
          Parameters:
          - ExternalIp
          - InternalIp
          - ExternalPort
          - InternalPort
          - IpProtocol
        - Label:
            default:
              en: Other Configure
              zh-cn: "\u5176\u4ED6\u8BBE\u7F6E"
          Parameters: []
    Parameters:
      ExternalIp:
        Description:
          en: Source IP, must belongs to bandwidth package internet IP
        Label:
          zh-cn: "\u516C\u7F51IP\u5730\u5740"
        Required: true
        Type: String
      ExternalPort:
        Description:
          en: Source port, now support [1-65535]|Any|x/y
        Label:
          zh-cn: "\u516C\u7F51\u7AEF\u53E3"
        Required: true
        Type: String
      ForwardEntryName:
        Description:
          en: the name of the DNAT rule is 2-128 characters long and must start with a
            letter or Chinese, but cannot begin with HTTP:// or https://.
        Label:
          zh-cn: "DNAT\u89C4\u5219\u7684\u540D\u79F0"
        Required: false
        Type: String
      ForwardTableId:
        Description:
          en: Create forward entry in specified forward table.
        Label:
          zh-cn: "DNAT\u8868\u7684ID"
        Required: true
        Type: String
      InternalIp:
        Description:
          en: Destination IP, must belong to VPC private IP
        Label:
          zh-cn: "\u79C1\u7F51IP\u5730\u5740"
        Required: true
        Type: String
      InternalPort:
        Description:
          en: Destination port, now support [1-65535]|Any|x/y
        Label:
          zh-cn: "\u79C1\u7F51\u7AEF\u53E3"
        Required: true
        Type: String
      IpProtocol:
        AllowedValues:
        - TCP
        - UDP
        - Any
        Description:
          en: Supported protocol, Now support 'TCP|UDP|Any'
        Label:
          zh-cn: "\u534F\u8BAE\u7C7B\u578B"
        Required: true
        Type: String
      PortBreak:
        Description:
          en: Specifies whether to remove limits on the port range.
        Label:
          zh-cn: "\u662F\u5426\u5F00\u542F\u7AEF\u53E3\u7A81\u7834"
        Required: false
        Type: Boolean
    Resources:
      ForwardTableEntry:
        Properties:
          ExternalIp:
            Ref: ExternalIp
          ExternalPort:
            Ref: ExternalPort
          ForwardEntryName:
            Ref: ForwardEntryName
          ForwardTableId:
            Ref: ForwardTableId
          InternalIp:
            Ref: InternalIp
          InternalPort:
            Ref: InternalPort
          IpProtocol:
            Ref: IpProtocol
          PortBreak:
            Ref: PortBreak
        Type: ALIYUN::VPC::ForwardEntry
    Outputs:
      ForwardEntryId:
        Description: The id of created forward entry.
        Value:
          Fn::GetAtt:
          - ForwardTableEntry
          - ForwardEntryId
                            
  • JSON formato

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Metadata": {
        "ALIYUN::ROS::Interface": {
          "ParameterGroups": [
            {
              "Parameters": [
                "ForwardTableId",
                "PortBreak",
                "ForwardEntryName"
              ],
              "Label": {
                "default": {
                  "en": "DNAT Configure",
                   
                }
              }
            },
            {
              "Parameters": [
                "ExternalIp",
                "InternalIp",
                "ExternalPort",
                "InternalPort",
                "IpProtocol"
              ],
              "Label": {
                "default": {
                  "en": "Network Configure",
                   
                }
              }
            },
            {
              "Parameters": [],
              "Label": {
                "default": {
                  "en": "Other Configure",
                   
                }
              }
            }
          ]
        }
      },
      "Parameters": {
        "ExternalPort": {
          "Type": "String",
          "Description": {
            "en": "Source port, now support [1-65535]|Any|x/y"
          },
          "Required": true,
          "Label": {
             
          }
        },
        "ExternalIp": {
          "Type": "String",
          "Description": {
            "en": "Source IP, must belongs to bandwidth package internet IP"
          },
          "Required": true,
          "Label": {
             
          }
        },
        "IpProtocol": {
          "Type": "String",
          "AllowedValues": [
            "TCP",
            "UDP",
            "Any"
          ],
          "Description": {
            "en": "Supported protocol, Now support 'TCP|UDP|Any'"
          },
          "Required": true,
          "Label": {
             
          }
        },
        "PortBreak": {
          "Type": "Boolean",
          "Description": {
            "en": "Specifies whether to remove limits on the port range."
          },
          "Required": false,
          "Label": {
             
          }
        },
        "InternalPort": {
          "Type": "String",
          "Description": {
            "en": "Destination port, now support [1-65535]|Any|x/y"
          },
          "Required": true,
          "Label": {
             
          }
        },
        "ForwardEntryName": {
          "Type": "String",
          "Description": {
            "en": "the name of the DNAT rule is 2-128 characters long and must start with a letter or Chinese, but cannot begin with HTTP:// or https://."
          },
          "Required": false,
          "Label": {
             
          }
        },
        "InternalIp": {
          "Type": "String",
          "Description": {
            "en": "Destination IP, must belong to VPC private IP"
          },
          "Required": true,
          "Label": {
             
          }
        },
        "ForwardTableId": {
          "Type": "String",
          "Description": {
            "en": "Create forward entry in specified forward table."
          },
          "Required": true,
          "Label": {
             
          }
        }
      },
      "Resources": {
        "ForwardTableEntry": {
          "Type": "ALIYUN::VPC::ForwardEntry",
          "Properties": {
            "ExternalPort": {
              "Ref": "ExternalPort"
            },
            "ExternalIp": {
              "Ref": "ExternalIp"
            },
            "IpProtocol": {
              "Ref": "IpProtocol"
            },
            "PortBreak": {
              "Ref": "PortBreak"
            },
            "InternalPort": {
              "Ref": "InternalPort"
            },
            "ForwardEntryName": {
              "Ref": "ForwardEntryName"
            },
            "InternalIp": {
              "Ref": "InternalIp"
            },
            "ForwardTableId": {
              "Ref": "ForwardTableId"
            }
          }
        }
      },
      "Outputs": {
        "ForwardEntryId": {
          "Description": "The id of created forward entry.",
          "Value": {
            "Fn::GetAtt": [
              "ForwardTableEntry",
              "ForwardEntryId"
            ]
          }
        }
      }
    }