Firewalls are there to protect you from threats on the internet (both traffic from the internet and from local applications trying to gain access when they shouldn’t). Sometimes, though, you’ll want to allow otherwise restricted traffic through your firewall. To do so, you’ll have to open a port.
When a device connects to another device on a network (including the internet), it specifies a port number that lets the receiving device know how to handle the traffic. Where an IP address shows traffic how to get to a particular device on a network, the port number lets the receiving device know which program gets that traffic. By default, most unsolicited traffic from the internet is blocked by Windows Firewall. If you’re running something like a game server, you might need to open a port to allow that specific kind of traffic through the firewall.
Note: This article shows you how to open a port on a particular PC’s firewall to let traffic in. If you have a router on your network (which you likely do), you will also need to allow the same traffic through that router by forwarding the port there.
How to Open a Port on Windows 10
Clicking Start, type “Windows Firewall” into the search box, and then click on “Windows Defender Firewall.”
Once Windows Firewall opens, click on “Advanced Settings.”
This launches Windows Defender Firewall with Advanced Security. Click the “Inbound Rules” category on the left. In the far right pane, click the “New Rule” command.
Read the remaining 23 paragraphs
Source: How-To Geek