Cannot use a network port in Windows? Windows Firewall might be blocking it. Here is how to check if a port is blocked by Windows Firewall.
Windows Firewall is enabled by default to manage network connections and protect your computer from unwanted traffic. In its default configuration, Windows Firewall allows all outgoing connections and incoming connections that directly respond to the outgoing connections.
Often, specific programs require specific ports to be open and functional. For example, if you are running a media server, it needs a particular port to be open. If the port is blocked for any reason, the media server cannot transmit data. There are two main reasons why a port is blocked. First, the port is already in use by a different program. Second, Windows Firewall is actively blocking the port, preventing any program from using it.
Generally, Windows Firewall doesn’t arbitrarily block a port. However, Windows Firewall can block a port if it is misconfigured or if a program has changed the Firewall settings. Thankfully, you can enable logging in Windows Firewall to check if it is blocking any connections from specific ports. In this quick and easy guide, I will show you how to check whether a specific port is blocked by Windows Firewall on Windows 11 and 10. Let’s get started.
Before You Start
- Administrator rights are required to enable logging in Windows Firewall and check the pfirewall.log file.
- The steps below have been verified and tested to work on Windows 11 and Windows 10.
Check if a Port Is Blocked by Windows Firewall
Before you can check the logs to find if Windows Firewall is blocking a port, you need to enable dropped packets logging. Here’s how to do it.
Enable Logging in Windows Firewall
First, we need to open Advanced Firewall Settings. To do that, press the “Windows key + R” to open the Run dialog. Type “wf.msc” and click “OK” to open “Windows Defender Firewall with Advanced Security”.
In this window, select the “Windows Defender Firewall with Advanced Security on Local Computer” option on the sidebar.

Next, select the “Action” > “Properties” option from the top command bar. This will open the Windows Firewall properties window.

In the Properties window, select your active profile tab. In my case, it is the “Private Profile”. Here, click the “Customize” button under the “Logging” section.
Note: If you don’t know your active profile, make the same changes for “Public Profile” and “Domain Profile”.

In the “Customize” window, select “Yes” from the “Log dropped packets” dropdown menu. Click the “OK” button to save the changes. Click “OK” in the main window.

That is it. With that, you’ve enabled logging in Windows Firewall. From now on, Windows Firewall will automatically log blocked connections.
Check Firewall Log (pfirewall.log) To Check if a Port Is Blocked
Now, try using the application or performing the task you suspect Windows Firewall is blocking. Next, open the Run dialog by pressing the “Windows key + R” shortcut. In the Run dialog, type the following path, and click “OK“.
Note: If you see a prompt asking for admin rights, click “Continue” or “Yes“.
%systemroot%\system32\LogFiles\Firewall\
Now, copy (Ctrl + C) the “pfirewall.log” file and paste (Ctrl + V) it on your desktop. Click “Continue” in the “File Access Denied” dialog.

Now, right-click the “pfirewall.log” file and select the “Edit in Notepad” option. This will open the Windows Firewall log file in Notepad. Scroll to the end to find recent entries. Look through it, and if Windows Firewall blocked any port, you will see it in the recent logs. In my case, Windows Firewall is blocking port 8080 because there is an explicit rule to block that port.

If you don’t see an entry here, Windows Firewall is not actively blocking that port.
If Windows Firewall is blocking a port, you need to identify the specific rule responsible for blocking and either modify it or delete it.
That is all. It is that simple to check whether Windows Firewall is blocking a port in Windows 11 and Windows 10. If you have any questions or need help, comment below. I’ll be happy to assist.