Procedure
# Configure NAT server on a public network interface to map public IP address 1.1.1.1 with all TCP ports to private IP address 192.168.0.1 with all ports.
<Huawei> system-view
[Huawei] interface gigabitethernet 1/0/0
[Huawei-GigabitEthernet1/0/0] nat server protocol tcp global 1.1.1.1 inside 192.168.0.1
More information
If an enterprise has two or more allocatable public IP addresses and an internal server needs to provide services to public network users, all-port mapping can be configured for one of public IP addresses. If you do not specify the range of port numbers opened to public network users in the nat server command, all ports of the internal server are mapped to the same public IP address. That is, the server provides all types of services to public network users using the public IP address with all port numbers.
If the IP address of a public network interface is used to provide services to public network users, configuring all-port mapping on this interface will cause failures of public network users to access the web pages or other services on the AR router, because all port numbers associated with the IP address are mapped to the internal server. Therefore, if only one public IP address is available, you are advised to configure mapping of specific port numbers.
All-port mapping configuration enables you to map multiple ports at one time, but this configuration lowers the network security because all ports are opened to the public network.