Shield with keyhole icon on circuit board.
Learn how to block a program in Windows Firewall. This step-by-step guide shows you how to block programs from running on your system.
Like all other firewalls, Windows Defender Firewall acts as a barrier and gatekeeper, monitoring incoming and outgoing network traffic and allowing or blocking it based on security rules. Through its advanced security features, users can also configure the firewall to block a program.
Blocking a program with Windows Firewall is straightforward if you have the right steps. The process is very similar for Windows 10 and 11. Here is how to block a program in six simple steps.
The first step involves accessing the Windows Firewall Advanced Setting configuration, where you will make the necessary adjustments and configure the firewall to block a program of your choice.
There are many ways to open the Windows Defender Firewall. You can open it through the search bar at the bottom left of your screen or open the Run window by pressing the Windows + R keys and typing in WF.msc.
To access Windows Defender Advanced Settings:

As previously mentioned, Windows Firewall works through a set of security rules. While most users keep the default settings, the Windows Defender Firewall is much more sophisticated and can be customized.
Creating inbound and outbound (network traffic) rules is one of the main features that can strengthen security and create isolated digital architectures.
In this step, you will access the outbound rules to block a program with the firewall.
To do this, click on Outbound Rules in the left pane of the Windows Firewall window (Figure B).

Creating firewall rules may seem overwhelmingly technical for nonadvanced users. However, if you follow the following steps, it can be a simple and effective way to block programs.
To create a new outbound rule, click on New Rule… under Actions in the right pane of the Windows Firewall window (Figure C).

This step is essential, as it defines what type of rule you want to create. Once you click New Rule…, you will see four options: Program, Port, Predefined, and Custom. Each option serves a different function:
Because you are trying to block a program, select Program from the four types of rules (Figure D) and click Next.

You will now have two options: To either select All programs or to block a specific program.
To block a specific program, select This program path: and click Browse (Figure E). The directory will open for you to search for the program you want to block. You’ll need to locate the .exe program file of the program you wish to block.

Once you have located and selected the program you want to block, click Next.
At this stage, Windows Firewall will move on to Action. You will then have three options:
Select Block the connection and click Next (Figure F).

The final step involves setting the profile and choosing a name for your rule so you can quickly identify it in the future.
On the New Outbound Rule Wizard window, you must answer the question, “When does this rule apply?”
You can select one, two, or all three options listed:
Select the type of profile or profiles you want the rule to apply to, and click Next (Figure G).

Finally, you must choose a name for your rule and add a description.
Do not type in a generic name. It will only make it difficult to find when you need to deactivate or delete the rule.
Even though it’s optional, adding a description is important, especially if you are creating several rules, as it may help you remember the rule’s specifics and why you created it.
Once you’ve entered your name and description (Figure H), click Next.

You should now see the new rule under the list of all Outbound Rules in the Windows Firewall Advanced Settings center panel (Figure I).

You can temporarily block a program using Windows Defender Firewall’s Allowed Apps and Features tool.
To temporarily block a program:
Note that you can decide whether to block the program on Private networks, Public networks, or both.

Firewalls are essential for data privacy and security, and Microsoft Windows Firewall Defender has an excellent performance rate.
Though customizing firewalls may seem to be something only the most advanced users should be doing, nothing is further from the truth.
If you need to block a program, an app, or a feature, all you need to do is follow the simple steps outlined in this guide.
Thinking about moving on from Windows Firewall? We reviewed the best firewall software to protect your network.
Ray is a Content and Communications Specialist with more than 15 years of experience. He currently works at Publicize and as a contributing writer for TechRepublic, eSecurityPlanet, and ServerWatch in addition to Enterprise Networking Planet. His work has also been published in Microsoft, Venture Beat, Forbes, Entrepreneur, The Sunday Mail, FinTech Times, Spiceworks, Dice Insights, Horasis, the Nature Conservancy, and other leading publications.
Enterprise Networking Planet aims to educate and assist IT administrators in building strong network infrastructures for their enterprise companies. Enterprise Networking Planet contributors write about relevant and useful topics on the cutting edge of enterprise networking based on years of personal experience in the field.
Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved
Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.