Configuring Port Forwarding in Industrial Routers
Port forwarding is an application of network address translation that maps a port of an IP address of a host on the public network to a computer on the internal network to provide the corresponding service. When a user accesses the port of an IP address, the server automatically requests the mapping to the corresponding computer on the LAN.
The port forwarding function can also accomplish some specific proxy functions, such as proxying protocols like POP, SMTP, Telnet, etc. Theoretically, there are 64,511 ports available – 1024 reserved ports are subtracted from 65535 total ports.
The benefits of using port forwarding include:
1) Helps conserve IPv4 address resources and alleviates IPv4 address shortages.
2) Helps to avoid attacks from outside the network, hiding and protecting computers inside the network.
3) Used to block unwanted communication on the network.
Types of Port Forwarding
1) Static Local Port Forwarding
Open a fixed port on the gateway and configure forwarding rules so that all data received through this port will be forwarded to the specified IP and port on the intranet. The forwarding rule will always be maintained regardless of whether the connection is active or not, so hosts on the intranet can be accessed from the public network.
2) Dynamic Port Forwarding
If a computer on the intranet wants to access the public network, it will send a packet to the gateway. The packet header includes the destination IP/port and the local IP/port. The gateway will replace the local IP/port with its public IP and an unused port and record the forwarding relationship for future packet forwarding. The data will then be sent to the destination site, which will respond upon receiving the data and send it to the corresponding port on the gateway. The gateway will then forward the data to the computers in the intranet to realize the communication between the intranet and the public network. When the connection is closed, the gateway will release the assigned port so that future connections can continue to use it.
The local port forwarding configuration interface in Jincan network 4G/5G industrial router is as follows: