In this article we will discuss Configuring Port Forwarding with IOS, will make brief discussion on Configuring Port Forwarding with IOS, In last article we discuss about Wireless Router Example.
Implementing port forwarding with IOS commands is similar to the commands used to configure static NAT. Port forwarding is essentially a static NAT translation with a specified TCP or UDP port number.
Configuring port forwarding using IOS commands on router R2. 192.168.10.254 is the inside local IPv4 address of the web server listening on port 80. Users will access this internal web server using the global IPv4 address 18.104.22.168, a globally unique public IPv4 address. In this case, it is the address of the Serial 0/1/0 interface of R2. The global port is configured as 8080.
This will be the destination port used, along with the global IPv4 address of 22.214.171.124 to access the internal web server. Notice within the NAT configuration, the following command parameters:
local-ip = 192.168.10.254
local-port = 80
global-ip = 126.96.36.199
global-port = 8080
When a well-known port number is not being used, the client must specify the port number in the application.
Like other types of NAT, port forwarding requires the configuration of both the inside and outside NAT interfaces.
In the example, when the router receives the packet with the inside global IPv4 address of 188.8.131.52 and a TCP destination port 8080, the router performs a NAT table lookup using the destination IPv4 address and destination port as the key. The router then translates the address to the inside local address of host 192.168.10.254 and destination port 80. R2 then forwards the packet to the web server. For return packets from the web server back to the client, this process is reversed.