Computers and laptops
Browser extensions
Home and office network
Manual settings
Smartphones and tablets

What is port forwarding and what is it for

Port forwarding is a technology that allows Internet access to a computer on the internal network behind a NAT (NAPT) router.

September 07, 2020

Port forwarding is a technology that allows Internet access to a computer on the internal network behind a NAT (NAPT) router.

Many users have heard the concept of "port forwarding" more than once. It is an easy-to-configure, but sometimes indispensable tool. Knowledge of port forwarding will be useful to those who are going to deploy servers in games, set up video surveillance systems. We will talk about the different ports, the purpose of port forwarding and how the system works.

A little about the types of ports

Port is an integer recorded in the protocol. It is needed to define the sender process.

Port forwarding (forwarding) is an operation that is part of the network address translation function.

To establish a connection and transfer data, the following information is used:

  • 2 IP addresses (sender-receiver).
  • Protocol number.
  • The port number of the processes in the sender-receiver relationship.

When to use port forwarding

The factory settings of the router automatically encrypt the addresses of devices that are beyond its lines. If the router catches the original signal from the network devices, then it directly opens the port and delivers data with a change in the sender's IP address to its local address.

If the port receives a response, it forwards them to the end device. What do we end up with? The IP address is shown from the external network, the devices behind it are invisible.

The technology effectively works in conditions of a decrease in free addresses. But this has a drawback: the router only accepts data packets over a connection.

When to use port forwarding

There are several cases of this operation. Here are the main ones:

  • In the process of organizing a game server.
  • For remote control of computers.
  • For connection to a video camera or a device that records video from a surveillance camera.
  • During the organization of WEB / FTP servers.

How port forwarding works

The concept of port forwarding means a command to a router to reserve one port, and the data that comes to it is transmitted to another device. For this purpose, a rule is set to redirect a free WAN port to another port of a user-specified device.

After creating a redirection rule, requests addressed to the first port will directly come to the new one.

Some ports have specific applications that are industry-wide standards. For example, when you load a web page, it uses port 80. The receiving computer's software knows that port 80 is used to serve http documents, so it listens on it and responds accordingly. If you send an HTTP request on a different port such as 143, the web server won't recognize it because it isn't listening on it. Configuring port forwarding using the example of a Totolink router

1. We connect the router to the computer using a cable.
2. Go to Advanced Settings - Port Forwarding.
3. Select the Rule Type: User defined.
4. Let's come up with a name for the rule.
5. Choose a protocol like TCP.
6. Specify the recipient's IP address (important: this works for Totolink, other models may ask for the sender and recipient address).
7. Assign external and internal communication ports.
8. Add button.

Using this scheme, you can easily set up a rule that will personalize to work on all devices and perform the desired function.