How to open ports in Windows 10 for certain programs and configure port forwarding on the Windows Defender Firewall
Occasionally it may happen that you come across a program or game that requires, in order to function well, open certain doors network, i.e. to configure the so-called port forwarding. Without port forwarding, traffic and data "input" from the Internet they are not able to communicate with the app or game and are unable to function properly in the functions that require you to download data from the internet. We already talked about this in the article on how to configure port forwarding on a router also explaining what does "door" mean when it comes to computers. Put in super simple terms, in the area of ??computer networks, it bears a number that represents the address of a specific program. A bit like with home addresses, if a computer has to send data to another computer, it must know what its address is called IP address in a network. Furthermore, if that data packet is to be sent to a particular program, it also asks to know the listening port of that program. The port is identified with a simple number (for example the port of the browser to load the data of the http websites has always been the number 80 by convention). Opening a door in Windows 10 means tell the system to allow inbound connections for a particular program, which has been configured to receive data on that address. Windows ports (Windows 10, Windows 7 and 8) are configured within the Firewall settings, following these steps.
First, press the Windows logo key (Start button) and try firewall. When found, press on "Windows Defender Firewall". In the left pane, press"Advanced settings"to open the Rules. Since port forwarding generally involves authorizing incoming traffic (i.e. data traffic to the PC, coming from data centers or external servers), press "Incoming connection rules"in the left pane. Keep in mind that the Windows firewall, for security reasons, blocks all incoming traffic unless expressly authorized. We have probably noticed that when you start a new game or a software to download torrents Windows does a warning appears asking to authorize the connection on the firewall. When this happens, you authorize incoming traffic. If, therefore, we have been using the PC for some time, we should already see some rules set in the traffic rules column incoming. If you have had your PC for a while, you should see a long list of "Rules"in the central pane, which apply to the various apps, services and software that allow you to send traffic to your PC. By enlarging the window you can also notice that one of the columns local port, Which in many cases set to "Any". You can also see that the rule is valid for a specific type of protocol (usually TCP or UDP, although there are various alternatives).
The really important column in this rules table, however, the "Remote port", which is the port that uses software that is trying to connect with our computer. With most applications, the remote port is assigned randomly or on Any.
How to Open the Door on Windows
If necessary open a door for a specific software or game, click on "New rule"in the right pane and then, in the new window, press on Door. Choose if the connection uses a TCP or UDP protocol (depending on the app that requires port forwarding) and then choose the ports you want to open. can allow "All local ports"or specify which local ports to open; you can specify a single port, a range of ports or choose multiple ports separated by commas. The ports to be opened are usually indicated in the settings of the software or game for which you want to allow incoming connections. Once done, press Forward and then on "Allow connection". Then select whether to apply the connection on the domain, on the private network or on a public network path (not recommended for security reasons). On the next screen, write the name of the rule. Once created, it will be added to the large list Incoming rules in the window of the Advanced security. You can edit it at any time with a double click or select it to delete it (from the menu on the right). In the edit tab, you can choose to apply the rule only to certain programs and services. You can also press on the rule with the right mouse button and select "Disable" or "Delete".
The same procedure can also be used to block incoming connections to a particular program or app, as explained in the guide for block internet access for a program with the Windows Firewall.
NOTE: There is also another, simpler, way to open ports on the Windows firewall. When the Windows defender Firewall configuration screen opens, instead of clicking on Advanced settings, click the link Allow apps or features through Windows Defender Firewall. In the following screen, just press the cross next to the program name to allow the apps to communicate externally.
Finally, remember that after opening the port on the Windows PC, it may be necessary to open the same port on the router. To do this, I refer to the guide on how to open the router doors