WiseCleaner Think Tank

Encounter difficult computer problems?
All about maintenance and optimization of your Windows System.

Home > Think Tank > How to Block Apps from Accessing the Internet in Windows 11

How to Block Apps from Accessing the Internet in Windows 11

Nov 7, 2024

Blocking apps from accessing the internet in Windows 11 can be useful for various reasons, such as conserving bandwidth, improving privacy, or controlling how certain programs use the network. In this article, we’ll walk you through different methods for blocking apps from accessing the internet in Windows 11.

Method 1: Using Windows Defender Firewall

One of the most effective ways to block an app from accessing the internet in Windows 11 is to use the built-in Windows Firewall. The Firewall lets you create rules that prevent certain apps from sending or receiving data.

Step 1. Open Windows Defender Firewall

Press Win+ S and type Windows Defender Firewall in the search bar. Click the top result to open it.

Step 2. Access Advanced Settings

Click on the Advanced settings from the left panel.

Click on the Advanced settings

Step 3. Create a New Outbound Rule

  • In the Advanced Settings window, click on Outbound Rules in the left pane.
  • Select New Rule on the right pane.
Create a New Outbound Rule
  • In the Rule Type, select Program and click Next.
select Program
  • Choose This program path and click Browse to select the executable file of the app you want to block, and then Next to proceed. 
select the executable file

Step 4. Block the Connection

  • Select Block the connection and click Next.
Select Block the connection
  • Choose when the rule applies (Domain, Private, and Public). If you want the rule to apply at all times, select all three and click Next.
Choose when the rule applies
  • Give the rule a name and click Finish.
Give the rule a name

Method 2: Using Command Prompt

If you prefer using the Command Prompt, you can also block apps by adding specific firewall rules through the netsh command. 

Step 1. Open Command Prompt as Administrator

Press Win + S and type cmd in the search box and select Run as administrator to open it.

Step 2. Create a Firewall Rule to Block the App

netsh advfirewall firewall add rule name="Block App Name" dir=out action=block program="path" enable=yes

Here’s a breakdown of the command:

  • name="Block App Name": This is the name of your rule. Replace Block App Name with the name you give to the rule (e.g., “Block Edge”).
  • dir=out: Specifies the rule is for outbound connections (internet access).
  • action=block: Tells the firewall to block the connection.
  • program="path": Replace this with the full path to the app’s executable file you wish to block.
  • enable=yes: Ensures the rule is active.

For example:

netsh advfirewall firewall add rule name="Block Edge" dir=out action=block program="C:program files (x86)MicrosoftEdgeApplicationmsedge.exe" enable=yes

type command

Conclusion

By following these steps, you can control over the apps that can communicate with external servers, enhancing your privacy and security. Whether you are managing your own system or setting up a secure environment, these techniques will help you prevent unwanted connections.

Latest
How to Change Your Hotspot Name and Password on iPhoneHow to Find Your Lost iPhoneHow to Use Windows Reliability Monitor to Diagnose Crashes
Read more >>
Recommend
Understanding Windows Power Plans: Balanced, Battery Saver, High Performance, and Ultimate PerformanceWindows Update Delivery Optimization: How It Works & How to Disable It (2025 Guide)Should I enable or disable Trim of SSD?
Read more >>
Hottest
How to Install a macOS in VMware Workstation PRO 17How to Enable Task Manager Option in Taskbar Menu on Windows 11How to Fix Office Application Error 0xc0000142
Read more >>