How to see if Windows Firewall is blocking a port or program

Tashreef Shareef
by Tashreef Shareef
Windows & Software Expert
Loading Comments
Download PDF
Affiliate Disclosure

  • The Windows Firewall is a built-in security application that comes with Windows OS.
  • Unfortunately, Windows Firewall has a bad habit of sometimes blocking Internet access.
  • Plenty of other articles such as this one can be found in our Internet connection errors Hub.
  • You can also take a look at our Windows 10 Fix page for more great guides.
How to check if Windows Firewall is blocking a port

The Windows Firewall is a built-in security application that comes with Windows OS since the beginning. The software is built to filter network data transmission to and from your Windows system.

The Firewall will block any suspicious and harmful connection depending on the threat level.

The users can configure the Windows Firewall settings as per their need to block or open port in Windows 10 and other versions. However, at times the Firewall may block ports or programs accidentally by user’s or administrator’s misconfiguration.

Now, if you want to know if the Windows Firewall is blocking a port or program on your system, here is how to do it.


How do I check if Windows Firewall is blocking a port

  1. Press Windows Key + R to open Run.
  2. Type control and press OK to open Control Panel.
  3. Click on System and Security.
  4. Scroll down and open Administrative Tools.
    Windows Defender Firewall with Advanced Security
  5. In the Administrative Tools window, open Windows Defender Firewall with Advanced Security.
  6. Click on Actions and select Properties.
    Action - Properties
  7. Now select your preferred Profile (Domain, Private, Publick).
  8. In the Logging section, click on the Customize button.
    Windows Defender Firewall with Advanced Security - Properties
  9. Click on the drop-down menu for Log dropped packets: and select Yes.
  10. Take note of the pfirewall.log path in the Name section.
  11. Click OK to save the changes.
    Customize Loggin Settings for the Domain Profile
  12. Open File Explorer and go to the path where the log file is saved.
    • It should look something like this:

      • %systemroot%system32LogFilesFirewall
  13. Click on the pfirewall.log file and check for any blocked ports.

Check for Blocked Port using the Command Prompt

  1. Type cmd in the search bar.
  2. Right-click on the Command Prompt and select Run as Administrator.
    Windows Firewall Blocked Port
  3. In the command prompt, type the following command and hit enter.
    • netsh firewall show state
  4. This will display all the blocked and active port configured in the firewall.

How to check if Windows Firewall is blocking a program

  1. Press Windows Key + R to open Run.
  2. Type control and press OK to open Control Panel.
  3. Click on System and Security.
  4. Click on Windows Defender Firewall. 
  5. From the left pane Allow an app or feature through Windows Defender Firewall.
    Check Blocked Programs in Windows Firewall
  6. In the allowed app window, scroll through all the apps.
  7. Locate the app you want to check and see if the app is checked.
    • If it is unchecked, the app is blocked on the Firewall.
  8. If your program is blocked, simply uncheck the app and click OK.

FAQ: Learn more about the Windows Defender Firewall

  • What is the Windows Firewall?

The Windows Firewall serves the purpose of filtering information coming to your system from the Internet, and it also blocks potentially harmful programs. Unfortunately, issues can cause it to block programs that are harmless.

  • Why does Windows firewall block programs?

By default, the Windows Firewall will block all programs that are trying to send or receive data over the Internet in order to prevent malware from doing so as well. These settings can later be changed by the user.

  • Do I really need the Windows Firewall?

Not necessarily. For better protective measures, you could also opt for a third-party firewall and antivirus tools.


In the Customize Settings window, click the circle(s) next to Turn off Windows Defender Firewall for public networks, private networks, or both.

Editor’s Note: This post was originally published in June 2019 and has been since revamped and updated in April 2020 for freshness, accuracy, and comprehensiveness.

Was this page helpful?
Thanks for letting us know! You can also help us by leaving a review on MyWOT or Trustpillot.
Get the most from your tech with our daily tips
Tell us why!