Windows Firewall acts as a wall between the network traffic and Windows. It is used to enhance system security, blocking and allowing incoming and outgoing network requests. Due to security reasons, configuring the Firewall becomes more important on Windows systems.
The users can configure the Firewall settings as per their requirements to open and block ports. However, misconfiguring the Firewall settings may block the port or program. It is likely that if the program is not allowed to listen to the request on a specific port, your program may not receive the data from the internet over the specific port.
If you want to know which port or program is blocked by Firewall, you need to check your Firewall settings. This guide will show you how to check if Windows Firewall is blocking a port or a program.
How do I check if Windows Firewall is blocking a port?
To check if Windows Firewall is blocking a port, follow the below steps.
1. Check Firewall Settings
- In the Taskbar seach box, type Windows Tools.
- This shows a Windows Tools app in the search result.
- Click on it to open it.
- This opens a new window where you can find some administrator tools.
- Open the Windows Defender Firewall with Advanced Security.
- Click the Action and then select properties.
- Now select the profile (Domain,Private,Public). You can check the profile in the connected network properties.
- Under the Logging section, click the Customize button.
- Select the Yes from the Log dropped packets dropdown menu.
- Note the Logging file address from the Name section.
- Click the OK to save changes.
- Open the File Explorer.
- Go to the location where you saved the Log file. It should be the following:
C > Windows > System32 > LogFiles > Firewall
- Click the pfirewall.log file to check the blocked ports.
2. Check Blocked ports using Command Prompt
- In the Tasbar search box, type CMD.
- You should see the Command Prompt in the search result.
- Right-click the command prompt and select run as administrator.
- In the command prompt, type the following command then hit the enter button.
netsh firewall show state
- This command will list all the opened and blocked ports.
However, this command is deprecated, but still, you can use it.
Related article: How to change default RDP port for Remote Desktop Connection
How to check if Firewall if blocking a program
If Windows Firewall is blocking a program, the program may not receive the data over the internet. To check if the Firewall blacks any program, follow the below steps.
- Open the Control Panel.
- Select the System and Security.
- Under the Windows Defender Firewall, you get an link Allow an app through Windows Firewall.
- Click the link.
- This opens a new window.
- Click the Change settings.
- Scroll the app and features list, and find the one you want to check if it is blocked by Firewall.
- If it is unchecked, then it is blocked by firewall.
- Check the App or Feature you want to allow through Firewall on public or private or both networks.
This is all about Windows Firewall blocking a port or program. I hope this guide is helpful for you. Also, feel free to comment below if you have any feedback.