How to Block a Program in a Firewall (Windows & Mac)

eSecurity Planet content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Blocking a program in a firewall is a security measure that protects systems from unwanted access. This process monitors resource consumption, limits internet access, blocks inbound access from malicious sources, and prevents outbound access from installed apps. Learn how to block a program in a firewall by exploring when to allow or block programs, methods to permanently or temporarily block in Windows or MacOS, and the common troubleshooting tips.

When to Allow or Block a Program in a Firewall

When deciding whether to allow or block a program in a firewall, assess its legitimacy and potential risks of controlled system access. Your network firewall automatically prevents unauthorized access, but new apps may require manual or prompted exception additions to manage communication and handle blocking issues.

Consider the following:

  • Automatic allowance: If the program is a system service or app automatically recognized by Windows, then allow it through the firewall to maintain seamless system functionality. If not recognized, then block it to prevent potential network security risks.
  • New app installation: If the program is a newly installed app verified by the user, enable its intended functionalities by allowing the app. Block it if it’s not verified or deemed suspicious.
  • Manual exception: If the program requires internet access for legitimate purposes and has been manually approved by the user, allow it to facilitate its communication. If not approved or its purpose is unclear, block it to prevent unauthorized access.
  • User verification: If the program prompts the user for internet access and is confirmed as legitimate by the user, then enable its functionality by allowing it through the firewall. Block it if it’s not confirmed or if you’re not sure of its legitimacy.
  • Customized network settings: If the program needs internet access while connected to a trusted network (private), then maintain its functionality. If connected to a public network, block it to prevent potential security threats.

7 Steps to Block a Program in a Firewall on Windows

This method for blocking a program in the firewall works for Windows 11, but the process is similar for Windows 10 and previous versions. You can successfully restrict a specific software from accessing the internet by navigating to the advanced settings of Windows Defender Firewall. Follow the steps below.

1. Access the Windows Defender Firewall

There are various ways to open Windows Defender Firewall. To get started, go to System and Security in the Control Panel and pick Windows Defender Firewall. You can also type Windows Defender Firewall in the search bar or locate it in the Windows Security folder in the Start menu. Another method is to find it in Settings under Update and Security, or by using the command control firewall.cpl.

Windows System and Security interface.

2. Launch the Windows Defender Firewall’s Advanced Security

Click Advanced settings to pull up the Windows Defender Firewall with the Advanced Security panel. This provides detailed configuration choices for managing firewall rules. You can use this to establish rules that allow or restrict individual programs or services, giving you fine-grained control over network access. This interface allows you to customize firewall settings based on your security requirements.

Windows Defender Firewall interface.

3. Select Outbound Rules

In the Windows Defender Firewall with Advanced Security console, select Outbound Rules from the left pane. This section contains a comprehensive set of outbound firewall rules that control the outgoing traffic from your machine. You can access these rules to monitor and change the permissions issued to programs and services for outbound communication.

Outbound Rules interface.

4. Click New Rule

Under Outbound Rules Actions, select New Rule. This action initiates the outbound rule development process, allowing you to provide the criteria and conditions for managing outgoing traffic. With this step, you can modify firewall settings to your security preferences.

Selecting a rule type on the New Outbound Rule Wizard window.

5. Select a Program

In the New Outbound Rule Wizard, select Create a Rule Based on a Program. Use the Browse button to find the program’s executable (.exe) file on your system. You can set the program’s path to define precise firewall regulations, permitting or prohibiting outbound network communication based on your security protocols and preferences.

Specifying programs on the New Outbound Rule Wizard window.

6. Proceed Through the Next Pages

Once the program has been selected, proceed through the New Outbound Rule Wizard by clicking Next on each successive page. These procedures can involve adding conditions or parameters for the new firewall rule, such as defining when the rule applies or creating exceptions, to ensure exact control over outbound traffic management and firewall security setups.

Selecting an action type on the the New Outbound Rule Wizard.

7. Enter the Rule Name & Click Finish

Provide the new firewall rule a descriptive name that clearly identifies its purpose. After naming, click the Finish button to complete the rule creation process. This step effectively enforces the rule by blocking the selected program from making outbound connections to the Internet.

Specifying the name and description on the New Outbound Rule Wizard window.

Once you’ve created a rule, confirm that your new rule is included in the list. Then, repeat the process above if you need to block more programs. To unblock a program, simply select and delete the rule in the Advanced Security box lists.

Temporarily Blocking a Program via Windows Firewall

If you need flexible testing or troubleshooting without requiring permanent alterations, temporarily blocking a program is an ideal method for short-term adjustments or diagnostics. This method quickly addresses network security concerns or suspicious activity associated with a program, preventing potential risks until the issue is dealt with. Here’s how to do it:

  1. Access the Windows Defender Firewall.
  2. Select Allow an app or feature through Windows Firewall from the left pane.
  3. Click Change Settings.
  4. If the program in question isn’t listed, select Allow another app instead.
  5. To go to the program, select Browse.
  6. Select the program you want, and then click Add.
  7. Make sure the checkbox next to the program’s name is unchecked.
  8. Click OK to confirm.
  9. To allow the app later, check the box.

3 Steps to Block a Program in a Firewall on MacOS

Due to differences in OS architecture and UI, the method of blocking apps in the macOS firewall differs from that in Windows. Both strive to increase security, but macOS offers a shorter technique that differs from Windows firewall configuration in language, layout, and user experience. To block programs in the firewall on macOS, activate your firewall protection, configure the firewall access settings for the programs, and manage alerts.

1. Turn on Firewall Protection

Start by enabling firewall protection on your Mac. Access System Preferences/System Settings from the Apple menu, then navigate to Network in the sidebar and pick Firewall. Toggle the switch to enable the firewall.

Location of the Firewall settings.

2. Set Firewall Access for Services & Apps

After you’ve enabled the firewall, you can configure its settings to control access to different services and applications. To access advanced settings, click on Options. If the option is disabled, turn on the firewall first. Then, click Add to indicate which apps or services the firewall should protect. Adjust their access rights with the given toggles, allowing or blocking programs as needed, then click OK.

macOS firewall settings interface.

3. Manage Alerts

Limiting an app’s access through the firewall may have an impact on its performance and functioning, as well as any other software that relies on it. In addition, certain apps, such as system apps and digitally signed applications, may have firewall access by default. As a best practice while using firewalls, respond promptly to any alert messages that come up, as they indicate attempts by unrecognized apps to connect to the network.

Confirmation window on macOS.

Confirm if you’ve successfully added the blocked programs under Block all incoming connections. To add more programs in the list, simply click the + button, then select Allow or Block incoming connections.

Common Issues in Blocking Programs & Troubleshooting Tips

When encountering common issues like unlisted programs, features blocking, third party software interference, group policy blocking, and competing firewall rules, you may have to perform manual checking. Below are some troubleshooting tips so you can guarantee a proper management of the important programs within your firewall.

Unlisted Programs

If you can’t locate the program you want to block, browse the available options in the firewall settings, then add the program. The system allows users to identify and restrict certain programs to provide them exact control over firewall configurations.

Automatically Blocked Program Features

When an alert appears indicating that Windows Defender Firewall has disabled specific features of an application, go to Settings and select the Privacy and Security tab. From there, navigate to Windows Security and select Firewall and Network Protection. Users can enable the program via the Firewall by modifying the appropriate settings.

Third-Party Software Interference with the Firewall Rules

If a third-party software, such as an antivirus product, interferes with firewall rules, reset them to their default settings. Disable any third-party software modules that have an impact on firewall functionality. This enables appropriate firewall operation and resolves conflicts caused by intervention from external applications, preserving system security and stability.

Group Policy Blockage

If a software is being blocked by group policy, check the registry settings and disable any software restriction policies causing the blockage. Adjusting these settings allows you to fix issues caused by group policy constraints, ensuring unlimited access to desired programs while retaining system operation.

Firewall Rules Not Running Properly

To diagnose firewall rules that aren’t working properly, prioritize knowing their precedence and checking the settings. When a network packet matches several firewall rules, the rule selection is done in a certain order of precedence. First, the firewall prioritizes rules using the Allow if Secure and Block Override actions. Next, it considers rules that include Block actions. Finally, it applies rules with Allow actions if no competing rules exist.

Bottom Line: Boost Your Network Defense with Firewall Blocking

Firewall configuration and rule setups optimize network security defense techniques. However, this is only the first measure for securing your network. To achieve holistic protection, combine these procedures with advanced tools like intrusion detection systems, antivirus software, and next-generation firewalls. Using many layers of defense improves overall security against cyber threats.

Explore how next-generation firewalls (NGFWs) complement your network security strategies by offering advanced threat detection capabilities.

Get the Free Cybersecurity Newsletter

Strengthen your organization’s IT security defenses by keeping up to date on the latest cybersecurity news, solutions, and best practices. Delivered every Monday, Tuesday and Thursday

Maine Basan Avatar

Subscribe to Cybersecurity Insider

Strengthen your organization’s IT security defenses by keeping abreast of the latest cybersecurity news, solutions, and best practices.




Top Cybersecurity Companies

Get the Free Newsletter!

Subscribe to Cybersecurity Insider for top news, trends & analysis