Open Port on Windows Firewall with 3 Easy Steps – OrcaCore
This tutorial provides a comprehensive guide on How To Open Port on Windows Firewall. To enable communication through the Windows Firewall, it’s essential to configure either an inbound or outbound rule, or potentially both, depending on the direction of the network traffic.
Inbound traffic refers to connections initiated from outside your computer to your computer. This means that external sources are requesting access to services or applications running on your machine, with data flowing inward. A typical example is a web server receiving requests from users on the internet.
Outbound traffic, conversely, describes connections that you initiate from your computer to an external destination. In this scenario, your computer is requesting data or services from another server, and the traffic flows outward. For instance, when you browse a website, your computer establishes an outbound connection to the web server hosting the site.
Follow the steps below to learn how to Open Port on Windows Firewall on Windows 10/11, as demonstrated on the Orcacore website.
To begin, log in to your Windows client machine and proceed with the following instructions.
1. Open a Specific Port for Inbound Traffic
First, locate the Windows Defender Firewall by searching for it in the Windows search bar and click on the application to open it.

Within the Windows Defender Firewall window, click on Advanced Settings.

Next, select the Inbound Rules option from the left-hand pane.

On the right sidebar, click New Rule. This action will launch a new window to guide you through the rule creation process.

Choose the Port option as the rule type and click Next.

Select either TCP or UDP, depending on the protocol required for your application. TCP (Transmission Control Protocol) is connection-oriented and provides reliable data transfer, while UDP (User Datagram Protocol) is connectionless and offers faster but less reliable communication. For this example, we’ll choose TCP. Then, select Specific local ports and enter the port number you wish to open. Click Next to proceed.

In the Action window, select Allow the connection. This tells the firewall to permit traffic on the specified port. Click Next.

Choose the network types to which you want the rule to apply (Domain, Private, Public). Selecting all three provides the broadest coverage. Click Next.

Assign a descriptive name to your rule and click Finish.

You should now see your newly created inbound rule listed in the Inbound Rules window.

You have successfully opened a port in Windows Firewall for inbound traffic. This is how you Open Port on Windows Firewall.
2. Open a Specific Port for Outbound Traffic
The process for opening a specific port for outbound traffic mirrors that of inbound traffic. You simply select Outbound Rules in the Advanced Settings of the Windows Defender Firewall and follow the same steps.
First, you need to search for the Windows Defender Firewall from your search bar and click on it.
From the Windows Defender firewall click Advanced Settings.
Then, click the Outbound Rules option.
On the right sidebar, click New Rule. This will open a new window for you.
Then, choose the Port option and click Next.
Next, you need to choose a TCP or UDP port depending on your needs. Here we choose TCP. Select the Specific local ports option and type the port number you want to open. Click Next.
On the Action window, select Allow the connection and click Next.
Then, select the network types you want the rule to apply and click Next.
Finally, give a name for your rule and click Finish.
3. Disable and Delete Open Port on Windows Firewall
If you need to disable or delete a firewall rule, follow these instructions.
First, search for Windows Defender Firewall and open it.
From the Windows Defender Firewall, click Advanced Settings.
Select either Inbound Rules or Outbound Rules, depending on the rule you want to modify. Locate the rule in the list, right-click on it, and choose either Disable Rule to temporarily deactivate the rule or Delete to permanently remove it.

You have successfully disabled or deleted the firewall rule. Now you’ve learned how to Open Port on Windows Firewall.
Conclusion
You have now learned how to Open a Specific Port (Inbound or Outbound) on Windows Firewall using the GUI.
Here are some further reading suggestions:
Windows 12 Download
ClamAV Antivirus For Windows
Winget command-line package manager for Windows
Set up XPS Viewer For Windows 11
Alternative Methods for Opening Ports on Windows Firewall
While the GUI method described above is straightforward, alternative approaches exist for managing Windows Firewall rules. Here are two such methods: using PowerShell and using the netsh
command-line tool.
1. Using PowerShell
PowerShell provides a powerful and scriptable interface for managing Windows Firewall. It’s particularly useful for automating the process of opening or closing ports, especially across multiple machines.
Example: Opening Port 8080 for Inbound TCP Traffic
New-NetFirewallRule -DisplayName "Allow Inbound TCP Port 8080" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 8080
Explanation:
New-NetFirewallRule
: This cmdlet creates a new firewall rule.-DisplayName
: Sets a descriptive name for the rule.-Direction
: Specifies the direction of traffic (Inbound or Outbound).-Action
: Defines the action to take (Allow or Block).-Protocol
: Indicates the protocol (TCP or UDP).-LocalPort
: Sets the local port number to open.
Example: Opening Port 8080 for Outbound TCP Traffic
New-NetFirewallRule -DisplayName "Allow Outbound TCP Port 8080" -Direction Outbound -Action Allow -Protocol TCP -RemotePort 8080
To remove this rule, you would use the Remove-NetFirewallRule
cmdlet.
Remove-NetFirewallRule -DisplayName "Allow Outbound TCP Port 8080"
Benefits of using PowerShell:
- Automation: PowerShell scripts can be easily automated and deployed across multiple systems.
- Flexibility: Offers more granular control over firewall rules, including advanced settings.
- Remote Management: Can be used for remote firewall management.
2. Using the netsh
Command-Line Tool
The netsh
(Network Shell) command-line utility is another way to configure Windows Firewall rules. While PowerShell is generally preferred for its scripting capabilities, netsh
remains a viable option, especially in environments where PowerShell scripting is restricted or unavailable.
Example: Opening Port 8080 for Inbound TCP Traffic
netsh advfirewall firewall add rule name="Allow Inbound TCP Port 8080" dir=in action=allow protocol=TCP localport=8080
Explanation:
netsh advfirewall firewall
: Invokes the advanced firewall context.add rule
: Adds a new firewall rule.name
: Specifies the rule name.dir
: Sets the traffic direction (in for inbound, out for outbound).action
: Defines the action (allow or block).protocol
: Specifies the protocol (TCP or UDP).localport
: Sets the local port number.
Example: Opening Port 8080 for Outbound TCP Traffic
netsh advfirewall firewall add rule name="Allow Outbound TCP Port 8080" dir=out action=allow protocol=TCP remoteport=8080
To delete this rule, you would use the delete rule
command.
netsh advfirewall firewall delete rule name="Allow Outbound TCP Port 8080"
Benefits of using netsh
:
- Availability:
netsh
is a built-in command-line tool available on all Windows systems. - Simplicity: Relatively simple syntax for basic firewall rule management.
- Batch Scripting: Can be used in batch scripts for automation.
These alternative methods, using PowerShell and netsh
, offer administrators greater flexibility and control over Windows Firewall configuration, particularly in automated or large-scale deployment scenarios. Remember to always carefully consider the security implications before opening ports on your firewall. Now you have some extra knowledge to Open Port on Windows Firewall.