This section provides an example for configuring NAPT and NAT Server for Internet users to access intranet servers.
An enterprise has deployed a FW as a security gateway on the intranet border. Static mapping is configured on the FW for the intranet web and File Transfer Protocol (FTP) servers to provide services for Internet users. The enterprise is allocated a public address 1.1.1.10 by an Internet service provider (ISP). Public address 1.1.1.10 is mapped to the intranet server addresses. 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 static mapping 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. |
|
NAT Server |
Name: policy_web Public IP address: 1.1.1.10 Private IP address: 10.2.0.7 Public port: 8080 Private port: 80 |
When Internet users send traffic to 1.1.1.10 through port 8080, the FW can forward the traffic to the web server based on this mapping entry. On the web server, the private address is 10.2.0.7, and the private port number is 80. |
|
Name: policy_ftp Public IP address: 1.1.1.10 Private IP address: 10.2.0.8 Public port: 21 Private port: 21 |
When Internet users send traffic to 1.1.1.10 through port 21, the FW can forward the traffic to the FTP server based on this mapping entry. On the FTP server, the private address is 10.2.0.8, and the private port number is 21. |
||
NAT address pool |
10.2.0.10-10.2.0.15 |
- |
|
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. |
The configuration roadmap is as follows:
Choose .
In Security Policy List, click Add, select Add Security Policy, and configure a security policy based on the following parameter values.
Name |
policy1 |
|---|---|
Source Zone |
untrust |
Destination Zone |
dmz |
Destination Address/Region |
10.2.0.0/24 |
Action |
Permit |
Click OK.
Choose .

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

Click OK.
Choose .

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

Click OK.
Contact your ISP administrator to perform this step.
Configuration script for the FW:
# sysname FW # nat server policy_web protocol tcp global 1.1.1.10 8080 inside 10.2.0.7 www unr-route nat server policy_ftp protocol tcp global 1.1.1.10 ftp inside 10.2.0.8 ftp unr-route # 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 # nat address-group addressgroup1 0 mode pat section 0 10.2.0.10 10.2.0.15 route enable # 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-zone dmz destination-address range 10.2.0.7 10.2.0.8 service http service ftp action source-nat address-group addressgroup1 # return