This section provides an example for configuring bidirectional NAT for Internet users to access intranet servers.
The FW serves as a security gateway at the border of an enterprise network. Dynamic destination NAT needs to be configured on the FW to prevent a large number of Internet users for accessing a specific server. In addition to the IP addresses of Internet interfaces, the enterprise applies for another public IP address (1.1.10.10) for the intranet server to provide services. In addition, a source NAT policy is required to simplify the return route configuration for the intranet servers, so that the intranet servers send response packets to the FW by default. Figure 1 illustrates the networking. The router is an access gateway on the ISP network.
| Item | Data | Description | |
|---|---|---|---|
GigabitEthernet 0/0/1 |
IP address: 1.1.1.1/24 Security zone: untrust |
1.1.1.1/24 is a public address provided by the ISP. |
|
GigabitEthernet 0/0/2 |
IP address: 10.2.0.1/24 Security zone: dmz |
Intranet servers use 10.2.0.1 as the default gateway address. |
|
Addresses in the source NAT address pool |
10.10.10.10 to 10.10.10.15 |
- |
|
Addresses in the destination NAT address pool |
10.2.0.7 to 10.2.0.8 |
When dynamic destination NAT is configured, there are no fixed mappings between public and private addresses, and public addresses are randomly translated into addresses in the destination NAT address pool. |
|
Routing information |
Default route |
Destination address: 0.0.0.0 Next hop address: 1.1.1.254 |
Configure a default route defined for the ISP router on the FW to direct intranet traffic to the router. |

In Source Translation Address Pool List, click Add and configure a NAT address pool based on the following parameters.


In Destination Translation Address Pool List, click Add and configure a NAT address pool based on the following parameters.


In NAT Policy List, click Add and configure a NAT policy based on the following parameters.

Contact your ISP administrator to perform this step.
Configuration script for the FW:
# sysname FW # interface GigabitEthernet0/0/1 undo shutdown ip address 1.1.1.1 255.255.255.0 # interface GigabitEthernet0/0/2 undo shutdown ip address 10.2.0.1 255.255.255.0 # firewall zone untrust set priority 5 add interface GigabitEthernet0/0/1 # firewall zone dmz set priority 50 add interface GigabitEthernet0/0/2 # firewall interzone dmz untrust detect ftp # ip route-static 0.0.0.0 0.0.0.0 1.1.1.254 ip route-static 1.1.10.10 255.255.255.255 NULL0 # nat address-group addressgroup1 0 mode pat route enable section 0 10.10.10.10 10.10.10.15 # destination-nat address-group addressgroup2 0 section 0 10.2.0.7 10.2.0.8 # security-policy rule name policy1 source-zone untrust destination-zone dmz destination-address 10.2.0.0 24 action permit # nat-policy rule name policy_nat1 source-zone untrust destination-address 1.1.10.10 32 action source-nat address-group addressgroup1 action destination-nat address-group addressgroup2 # return