This section provides an example for configuring destination NAT for Internet users to access intranet servers.
An enterprise has deployed a FW as a security gateway on the intranet border. Destination NAT 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.10.10 by an Internet service provider (ISP). In addition to the IP addresses of Internet interfaces, the enterprise applies for public IP addresses (1.1.10.10 and 1.1.10.11) for the intranet server to provide services. 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. |
|
Destination NAT |
Destination address pool: 10.2.0.7 to 10.2.0.8 |
When an Internet user accesses an intranet server, the FW that has the destination NAT function enabled can send traffic to the intranet server. Public and destination addresses are in one-to-one mapping in sequence. The FW translates destination address 1.1.10.10 to 10.2.0.7, and the FW translates destination address 1.1.10.11 to 10.2.0.8. |
|
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:
Configure the destination NAT function so that when an Internet user accesses an intranet server, the FW can send traffic to the intranet server.
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 ip route-static 1.1.10.11 255.255.255.255 NULL0 # destination-nat address-group addressgroup1 0 section 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 range 1.1.10.10 1.1.10.11 service http service ftp action destination-nat static address-to-address address-group addressgroup1 # return