< Home

port-forwarding resource

Function

The port-forwarding resource command adds port-forwarding resources.

The undo port-forwarding resource command deletes port-forwarding resources.

Format

port-forwarding resource resource-alias { host-ip ip | host-name hostname | any } port [ resource-description ]

undo port-forwarding resource resource-alias

Parameters

Parameter Description Value
resource-alias Specifies the alias of resources. The value is a string of 1 to 31 case-sensitive characters.
NOTE:
In dual-system hot backup networking, "%" cannot be included.
ip Specifies the resource IP address. The value is in dotted decimal notation.
hostname Specifies the name of resources. It is a string of 1 to 127 case-sensitive characters. The name of resource can be set as a domain name or a device name of resources For example: www.example.com or example123.
NOTE:
  • When hostname is used as the domain name, the length of the string in every "." cannot be greater than 63 characters. The string is only composed of letters, numbers and en-dash "-". The domain name cannot begin with and end with the en-dash "-"; the domain name cannot begin with ".", and the character string after the last "." must contain at least one letter.

  • When hostname is used as a device name, the name is only composed of letters, numbers and en-dash"-". The name cannot be composed only by number.

any Indicates all resources. -
port Specifies a port. The value is an integer that ranges from 0 to 65535.
resource-description Specifies the description of resources. The value is a string of 1 to 53 case-sensitive characters.

Views

Function service view

Default Level

2: Configuration level

Usage Guidelines

After any is selected, the following situations arise:
  • If no DNS server is configured on the virtual gateway, you cannot access intranet or extranet resources through domain names.

  • If the DNS server is configured on the virtual gateway, you can use domain names to access specified port resources on the intranet, but not extranet resources.

Example

# Add a port-forwarding resource with the alias as cuckoo, the IP address as 10.0.0.10, and the port as 88.

<sysname> system-view
[sysname] v-gateway abc
[sysname-abc] service
[sysname-abc-service] port-forwarding resource cuckoo host-ip 10.0.0.10 88
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic