HCSCA111 Network Address Translation
HCSCA111 Network Address Translation
HCSCA111 Network Address Translation
Foreword
3 Huawei Confidential
Objectives
4 Huawei Confidential
Contents
1. NAT Principle
2. Source NAT
3. Server Mapping
4. Application Scenarios
5 Huawei Confidential
Background
IPv4 addresses are depleted.
IPv6 cannot completely replace IPv4 immediately.
Technologies to mitigate IPv4 address exhaustion (NAT, for example) continue to emerge.
6 Huawei Confidential
Advantages and Disadvantages
Advantages:
IP addresses can be reused.
The address translation process is transparent to users.
Privacy protection is available to internal users.
Load balancing among internal servers is available.
Disadvantages:
Network monitoring is more difficult.
Some applications are restricted.
7 Huawei Confidential
Basic Principle
NAT translates the source and destination IP addresses in IP packet headers so that numerous
private addresses can access the public network through a limited number of public addresses.
Destination IP address:
Destination IP address: 123.3.2.3
Translates private source
123.3.2.3
Source IP address: addresses into public
Source IP address: 123.3.2.1 addresses
10.1.1.1
Destination IP address:
123.3.2.1
Source IP address:
123.3.2.3
8 Huawei Confidential
NAT Categories
9 Huawei Confidential
Contents
1. NAT Principle
2. Source NAT
3. Server Mapping
4. Application Scenarios
10 Huawei Confidential
Address Pool Mode (1)
Address pool mode without port translation
Trust Untrust
192.168.1.1 155.133.87.1
192.168.1.2 155.133.87.2
192.168.1.3 155.133.87.3
192.168.1.4 Discard
11 Huawei Confidential
Address Pool Mode (2)
Address pool mode with port translation
Source address Source Destination address Translate Source address Source port Destination address
192.168.0.11 port X 1.1.1.1 2.2.2.2 Y 1.1.1.1
Trust Untrust
Different private addresses are mapped to the same public address but different port numbers to
implement many-to-one address translation.
192.168.1.1 155.133.87.1:7111
192.168.1.2 155.133.87.1:7112
192.168.1.3 155.133.87.1:7113
12 Huawei Confidential
Easy IP
Outbound interface address mode (easy IP)
Trust Untrust
192.168.1.1 155.133.87.1:7111
192.168.1.2 155.133.87.1:7112
192.168.1.3 155.133.87.1:7113
13 Huawei Confidential
NAT ALG
The NAT application level gateway (ALG) is a translation proxy used for certain application
protocols and can translate the address and port number carried in application layer data.
?
Information that
can be NATed
14 Huawei Confidential
NAT ALG Implementation Principle
NAT ALG application in FTP active mode
Private network Public network
15 Huawei Confidential
Contents
1. NAT Principle
2. Source NAT
3. Server Mapping
4. Application Scenarios
16 Huawei Confidential
NAT Server - Internal Server
The NAT server function uses a public address to represent the private address of an internal
server.
Source Destination address Source Destination address
address 192.168.1.1 address 202.202.1.1
Translate
Public address
202.202.1.1
WWW server DMZ Untrust
192.168.1.1 Real address External user
On the firewall, a public address is configured to represent the server's private address. External
users access the server through this public address.
17 Huawei Confidential
NAT Server and Server Map Table (1)
After the NAT server is configured, the device automatically generates server map entries that
map public and private addresses.
18 Huawei Confidential
NAT Server and Server Map Table (2)
After no-reverse is specified, the device generates only forward server map entries.
[NGFW]nat server server1 protocol tcp global 202.202.1.1 inside 192.168.1.1 no-reverse
19 Huawei Confidential
Contents
1. NAT Principle
2. Source NAT
3. Server Mapping
4. Application Scenarios
20 Huawei Confidential
Typical NAT Scenario and Configuration Example
Application scenarios
Untrust zone
Source NAT application
NAT server application
202.169.10.1/29
192.168.20.1/24
DMZ 192.168.0.1/24
Trust zone
21 Huawei Confidential
Source NAT Configuration on the Firewall (Web)
Configure a NAT address pool.
22 Huawei Confidential
Source NAT Configuration on the Firewall (Web)
Configure a source NAT policy.
23 Huawei Confidential
NAT Server Configuration on the Firewall (Web)
Configure the internal web and FTP servers.
24 Huawei Confidential
NAT Server Configuration on the Firewall (Web)
Configure an interzone security policy.
25 Huawei Confidential
Source NAT Configuration on the Firewall (CLI)
Configure interzone access rules.
Specify the network segment 192.168.0.0 as the source address. (Detailed configurations are not
described here.)
Configure an address pool.
[NGFW] nat address-group 1
[NGFW -nat-address-group-1] section 202.169.10.2 202.169.10.6
Configure a source NAT policy.
[NGFW] nat-policy
[NGFW-policy-nat] rule name nat1
[NGFW-policy-nat-rule-nat1] source-zone trust
[NGFW-policy-nat-rule-nat1] destination-zone untrust
[NGFW-policy-nat-rule-nat1] source-address 192.168.0.0 24
[NGFW-policy-nat-rule-nat1] action nat address-group 1
26 Huawei Confidential
NAT Server Configuration on the Firewall (CLI)
Configure the internal web and FTP servers.
[USG] nat server wwwserver protocol tcp global 202.169.10.1 80 inside 192.168.20.2 8080
[USG] nat server ftpserver protocol tcp global 202.169.10.1 ftp inside 192.168.20.3 ftp
27 Huawei Confidential
Twice NAT
Application scenarios:
NAT server + source NAT
Intrazone NAT
28 Huawei Confidential
Interzone Twice NAT
To simplify the configuration of the route from a server to a public network, you can configure
source NAT based on the NAT server function.
192.168.1.1 2.2.2.5
192.168.1.5 202.20.1.5
Internal server Internet user
Real address Public address
29 Huawei Confidential
Intrazone Twice NAT
The firewall translates the destination address of the user's request packet into the private address of the FTP server.
In addition, it translates the source address into the public address of the user.
The firewall translates the source address of the response packet from the FTP server into the public address. In
addition, it translates the destination address into the private address of the user.
Trust zone
192.168.1.5 192.168.1.1
Internal user Server
30 Huawei Confidential
Quiz
31 Huawei Confidential
Summary
32 Huawei Confidential
Thank you. 把数字世界带入每个人、每个家庭、
每个组织,构建万物互联的智能世界。
Bring digital to every person, home, and
organization for a fully connected,
intelligent world.