nat dns-map
Function
The nat dns-map command configures a mapping entry from the domain name to the public IP address, port number, and protocol type.
The undo nat dns-map command deletes a mapping entry from the domain name to the public IP address, port number, and protocol type.
By default, no mapping entry is configured.
Format
nat dns-map domain-name { global-address | interface interface-type interface-number } global-port protocol-name
undo nat dns-map domain-name { global-address | interface interface-type interface-number } global-port protocol-name
Parameters
Parameter |
Description |
Value |
---|---|---|
domain-name |
Specifies a valid domain name that can be resolved by the DNS server. |
The value is a string of 1 to 255 case-insensitive characters without spaces. The domain name of each level contains a maximum of 63 characters. Domain names of different levels are separated by periods (.) and contain a maximum of 255 characters. The string cannot contain the following characters: / : < > @ \ | % ' ". |
global-address |
Specifies a valid IP address provided for external access. |
The value is in dotted decimal notation. |
interface interface-type interface-number |
Specifies the type and number of an interface. |
- |
global-port |
Specifies the port number of the service provided for external access. |
The value is an integer that ranges from 1 to 65535. |
protocol-name | Specifies the protocol carried over IP. |
The value can be tcp and udp. |
Usage Guidelines
Usage Scenario
You can use this command to configure the mapping from the domain name to the public IP address, port number, and protocol type for internal hosts. In this manner, internal hosts can differentiate and access corresponding internal servers according to domain names when no DNS server is deployed on the private network.
By default, DNS mapping is not configured. In this case, after the external DNS server resolves public IP addresses from domain name requests of internal hosts, the internal hosts can be mapped to only one internal server. In addition, internal hosts cannot differentiate and access corresponding internal servers according to domain names.
Follow-up Procedure
Run the nat alg dns enable command to enable the DNS NAT ALG function. The NAT ALG function allows hosts on a private network to access servers on the private network through the external DNS server.