Configure NAT on the AR router to enable external users to access the internal server

The NAT server can be configured on a Huawei AR router to enable external users to access internal servers. A company's network provides the web server for external users. The web server uses internal IP address 192.168.20.2/24 and port 8080. The web server's IP address advertised to external users is 202.169.10.5/24, and external users are on the network segment 202.169.10.2/24. The configuration details are as follows: 1. Assign IP addresses to interfaces on the router.
[Huawei] vlan 100
[Huawei-vlan100] quit
[Huawei] interface vlanif 100
[Huawei-Vlanif100] ip address 192.168.20.1 24
[Huawei-Vlanif100] quit
[Huawei] interface ethernet 2/0/0
[Huawei-Ethernet2/0/0] port link-type access
[Huawei-Ethernet2/0/0] port default vlan 100
[Huawei-Ethernet2/0/0] quit
[Huawei] interface gigabitethernet 3/0/0
[Huawei-GigabitEthernet3/0/0] ip address 202.169.10.1 24
[Huawei-GigabitEthernet3/0/0] quit

2. Configure a default route on the router and specify the next hop address as 202.169.10.2
[Huawei] ip route-static 0.0.0.0 0.0.0.0 202.169.10.2

3. Configure the NAT server on Gigabitethernet 3/0/0 of the router to allow external users to access internal servers.
[Huawei] interface gigabitethernet 3/0/0
[Huawei-GigabitEthernet3/0/0] nat server protocol tcp global 202.169.10.5 www inside 192.168.20.2 8080
[Huawei-GigabitEthernet3/0/0] quit

Scroll to top