R3166-R3206-HP High-End Firewalls NAT and ALG Command Reference-6PW101
14
View
System view
Default level
2: System level
Parameters
acl-number: Number of an ACL, in the range of 2000 to 3999. You can use an ACL to specify the
destination addresses that internal hosts can access.
local-ip: Internal IP address.
vpn-instance local-name: Specifies the VPN to which the internal IP address belongs. The local-name
argument is a case-sensitive string of 1 to 31 characters. Without this keyword and argument
combination, the internal IP address does not belong to any VPN.
global-ip: External IP address.
Description
Use the nat static command to configure a one-to-one static NAT mapping.
Use the undo nat static command to remove a one-to-one static NAT mapping.
Related commands: display nat static.
Examples
# In system view, configure static NAT mapping between internal IP address 192.168.1.1 and external IP
address 2.2.2.2.
<Sysname> system-view
[Sysname] nat static 192.168.1.1 2.2.2.2
# Configure static NAT to allow the internal host 192.168.1.1 to access only the external network
3.3.3.0/24 by using the external IP address 2.2.2.2.
<Sysname> system-view
[Sysname] acl number 3001
[Sysname-acl-adv-3001] rule permit ip destination 3.3.3.0 0.0.0.255
[Sysname-acl-adv-3001] quit
[Sysname] nat static 3001 192.168.1.1 2.2.2.2