How to open a port using Windows Firewall in Windows 10

How to open a port using Windows Firewall in Windows 10

If an app or program requires a specific port to be opened, here’s how you can use Windows Firewall to open a port in Windows 10.

Note: You need admin rights to create, delete, or edit Windows Firewall rules.

Why do you need to open a port on your PC?

Firewalls are an essential aspect of the computer and no computer does not need a firewall. Firewalls are designed to protect the network from threats, be it external or internal threats. It does this by blocking ports that support the network.

Every time a program tries to communicate over this port, the firewall checks the rules database to see if the application is allowed. If not, you’ll be asked to confirm (which is why you sometimes see a prompt asking you if a particular program is allowed to access the Internet).

There are cases where you should open the network port and let the traffic flow to the application

Cloud and network applications that run on a computer are designed to communicate over a specific network port (or set of ports). And the machine on the other end of that connection will also send and receive data over the specified ports.

But the problem is that most operating systems, especially “consumer” operating systems, can be set to deny some or all of incoming network communication. So you may experience an application sending something to a cloud service and the service is resending something, but a firewall built into the router or operating system is blocking the data. there. In this case, you should open the network port and let the traffic flow to your application.

Open a port on the router

Before you proceed with your PC, you should make sure that the traffic can go through the network’s router. In this case, you not only open a port, but also tell the router where to send this data on the local network. To do that, you need to set up Port Forwarding. But whether you need to forward or not, the first step is to open the corresponding port (s) on your PC as instructed below.

Steps to open a port in Windows Firewall

To open a port in Windows 10, you need to create a custom rule in Windows Firewall. Follow the steps below to create a rule to open ports using Windows Firewall.

Open the port for Inbound Traffic (traffic is generated from the Internet to the server)

1. Open Start by pressing the Win key.

Search and open “Windows Defender Firewall” .

3. Click the “Advanced Settings” link on the left.

4. Select the option “Inbound Rules” on the left side.

Select the option “Inbound Rules”

5. In the new window, select the Port option and click Next.

Select the Port option and click Next

6. Depending on which port you want to open, select “TCP” or “UDP” and click Next. In my case, I will choose the TCP option .

7. Select the Specific local ports option and enter the port number you want to open in the empty field. Click Next.

Select the Specific local ports option

8. Select Allow the connection and click Next.

9. Select the type of network you want to apply the rule to and click Next.

Select the type of network you want to apply the rule to

10. Give a meaningful name and click Finish.

Name the rule

You will see the newly configured rule in the Windows Firewall rules window.

You will see the newly configured rule in the Windows Firewall rules window

Open the port for Outbound Traffic (traffic is generated from the server to the Internet)

To open a portal for Outbound Traffic, follow the steps listed below.

1. Open Start.

Find and open Windows Defender Firewall .

3. Click Advanced Settings.

4. Select Outbound Rules.

5. Select the Port option and click Next.

6. Depending on which port you want to open, select “TCP” or “UDP” and click Next.

7. Select the Specific local ports option and enter the port number in the empty field. Click Next.

8. Select Allow the connection and click Next.

9. Select the type of network you want to apply the rule to and click Next.

10. Give a meaningful name and click Finish.

Disable to delete port opening rule in Windows Firewall

If you no longer need a dedicated rule to open the port, you can disable or delete the rule.

To disable the open port firewall rule, right-click on the rule in the Windows Firewall settings and select the Disable Rule option .

Disable firewall rules for opening ports

To delete the rule, right-click on it and choose the Delete option .

Remove the firewall rule to open ports
3