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

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.

Steps to 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”.
  5. In the Administrative Tools window, open Windows Defender Firewall with Advanced Security.
  6. Click on Actions and select Properties.
  7. Now select your preferred Profile (Domain, Private, Publick).
  8. In the Logging section, click on the Customize button.
  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.
  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”.
  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“.
  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.