While dealing with certain apps and features on your Admin RDP,  you might have experienced errors regarding “Port is not Open” or “The Connection is being blocked by Windows Firewall”. By default, the Windows firewall only works with the rules that are defined in Outbound and Inbound connection rules. This is a problem that can arise in different situations. However, with this tutorial, we will learn how to open & close ports for incoming & outgoing connections.

How to Open Ports for Incoming Connections In Windows Firewall

Windows Firewall On Admin RDP, Private RDP,  ensures that only the services necessary for the chosen function are exposed to the outside world (the firewall will automatically configure itself for new server roles, for instance, and when certain server applications are installed).  In simple words, a firewall analyzes the incoming and outgoing traffics of a connection for threats.  Now let’s see how to open a port for incoming traffic.:-

  • Using Run ( Windows Key + R) and then enter the following command “firewall.cpl” to open Windows Defender Firewall settings dashboard and then click on Advanced Settings to Open Windows Firewall with Advanced Security.

You can also turn off the firewall from the dashboard but turning off Microsoft Defender Firewall could make your device more vulnerable to unauthorized access. If there’s an app you need to use that’s being blocked, you can allow it through the firewall, instead of turning the firewall off.

  • Now to allow an incoming connection select the Inbound Rule and then click on New rules

  • Now Select your Rule type In this example we are looking to open a port so we will choose Port, click on next

  • Choose the connection protocol TCP/UDP based on your requirement, click next. Type in specific port ranges to open or open all remote ports,  In this case, We are opening port 25 so we will go with a specific local port selection. Type the port number. In our case, it will be 25.

We can also set a range of ports to be opened: “50-90”. This will open all ports between 50 and 90.

  • Click Allow the connection.

  • Select the network types that you would allow the connection over.

  • Click on next specify a name for your rule (port 25). Name your Rule something. Click Finish.

 

How to open a port for outgoing connection in Windows Firewall

The same set of steps listed above can be used to create a rule for outgoing traffic. In step No. 6, instead of clicking Inbound Rules, you’ll want to click Outbound Rules. The rest of the steps are the same, and you can enable the connection in the same manner by using the steps in the next section.

How to close a port for Outgoing connection in Windows Firewall

Want to disable the rule you created to open a port in the Windows Firewall? Here’s how:

  • Using Run ( Windows Key + R) and then enter the following command “firewall.cpl” to open Windows Defender Firewall settings dashboard and then click on Advanced Settings to Open Windows Firewall with Advanced Security.

  • Click on Inbound Rules or Outbound Rules, depending on what type of rule you created. In our case, we will disable an Outbound port for FTP. Choose the rule you created. Now in the dialogue box mark block the connection option. Click on apply and tye OK. This will close the Outgoing connection for Remote Port 21.

You can also check the port status by using many online port checker tools. Order now and manage your Windows Firewall with Admin RDP/Private RDP as you want.