Blocking a program in Windows 10 Firewall stops it from sending or receiving data over the network. This is useful for preventing unwanted software from phoning home, limiting a game’s online features, or stopping a known malicious file from connecting. You’ll need to be logged in as an administrator and know the exact file path of the program (usually in Program Files or AppData).
What You’ll Need
- Administrator account on Windows 10
- The full path to the program’s executable (.exe) file – find it by right-clicking the shortcut and selecting “Open file location”
- Basic knowledge of whether the program uses TCP or UDP (not required, as the rule can cover both)
Step-by-Step
- Press Win + R to open the Run dialog, type
wf.msc, and press Enter. This opens the Windows Defender Firewall with Advanced Security console. - In the left pane, click Outbound Rules (to block the program from sending data) or Inbound Rules (to block it from receiving data). For most cases, you’ll want to block both directions, so you’ll create two rules.
- In the right pane, click New Rule… to start the Rule Wizard.
- Select Program and click Next.
- Choose This program path: and click Browse… to locate the executable. Alternatively, paste the full path manually (e.g.,
C:\Program Files\Example\app.exe). Click Next. - Select Block the connection and click Next.
- Leave all three checkboxes (Domain, Private, Public) checked, or uncheck the ones you don’t want the rule to apply to. Click Next.
- Give the rule a descriptive name like “Block Example App Outbound” and optionally add a description. Click Finish.
- Repeat the process for the opposite direction (if you started with Outbound, now create an Inbound rule) to fully block the program.
- To verify, right-click the new rule and select Enable Rule (if it isn’t already enabled). The rule is now active.
Common Mistakes
- Blocking only one direction – A program can still receive data if you only block outbound rules, or send data if you only block inbound. Create both rules.
- Wrong executable path – Some programs load from a different location than the shortcut points to. Use Task Manager (Details tab) to see the actual path of a running program.
- Forgetting to enable the rule – New rules are enabled by default, but if you disabled it during testing, it won’t take effect.
- Blocking the wrong service – Many programs run background services (like a .exe in System32) that are separate from the main app. Check the program’s documentation for which processes need to be blocked.
Tips
- Use scope to limit the rule to specific remote IP addresses if you only want to block certain servers, not all network traffic.
- Export your firewall rules before making changes: right-click the root node in the console, select Export Policy…, and save a backup.
- If the program is a portable app, the path may be on a USB drive. Make sure the drive is connected when the rule is created, and note that the rule will only work when the drive is present.
- For testing, temporarily disable the rule (right-click → Disable Rule) and re-enable it after you confirm the program behaves as expected.
Troubleshooting
Rule doesn’t seem to work: First, verify the rule is enabled and the path is correct. Open the rule’s properties and check the Programs and Services tab – if the path has spaces, make sure it’s quoted correctly. Also, check if the program uses a different executable (e.g., a launcher vs. the actual game). Use Task Manager to see the exact process name and path.
Program still connects: Some programs use system services (like svchost.exe) to communicate. If the program is a service, you may need to block the service instead. In the rule wizard, choose This program path and then select Services… to pick the specific service. Alternatively, block the program’s port or IP range using a custom rule.
Can’t create a rule (access denied): You must be an administrator. If you’re already an admin, right-click the Windows Defender Firewall shortcut and select Run as administrator.
Rule blocks everything: If you accidentally created a rule that blocks all traffic (e.g., by selecting “All programs” instead of a specific path), immediately disable or delete the rule. Check the rule’s scope and ensure it applies only to the intended program.
Frequently Asked Questions
Do I need to block both inbound and outbound?
Yes, to fully prevent a program from communicating, you need to block both directions. A program can still receive data if only outbound is blocked, and vice versa.
Will blocking a program affect Windows updates?
No, unless you block system processes like svchost.exe or Windows Update service. Only block the specific program you want to restrict.
Can I unblock a program later?
Yes, go to the same firewall console, find the rule, right-click it, and select Disable Rule or Delete to remove it entirely.
Does this work for Windows Store apps?
Windows Store apps are sandboxed and use different network isolation. You can’t apply a standard program rule to them. Use the Settings app > Privacy > Background apps to restrict their network access.
What if I don’t know the program’s path?
Open Task Manager (Ctrl+Shift+Esc), go to the Details tab, find the process, right-click and select Open file location. That gives you the exact path.
Will blocking a program make it stop running?
No, blocking network traffic doesn’t stop the program from running. It only prevents it from sending or receiving data. The program may still work offline, but may show errors when trying to connect.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- PowerPoint vs Keynote: Key Differences
- How to Sign Out of OneDrive in Windows 10
- Reduce Memory Use in Windows When RAM Is Low
- How to Set Up and Use Credential Manager on Windows 10
- Fix Microsoft Edge Battery Drain on Windows 11
- Type to Siri Instead of Talking on iPhone (iOS 11)