How to block a program from accessing the internet in Windows 10 & 11
Blocking a program from accessing the internet improves security, protects privacy, and saves bandwidth. Windows allows all programs to connect to the internet. You can block outbound connections using Windows Defender Firewall or a PowerShell command. This guide shows how to create an outbound rule in Windows Firewall in Windows 10 and 11 to block a program from connecting to the internet.
Method 1: Windows Firewall (GUI shortcut)
- Press the Windows + R keyboard keys.
- Type
wf.msc. - Press Enter.
- Click Outbound Rules in the top-left menu.
- Click New Rule in the top-right menu.

- Make sure Program is selected.
- Click Next.
- Make sure This program path is selected.
- Click Browse.
- Select the program's .exe file (e.g., C:\Program Files\ProgramName\program.exe).
- Click Open.

- Click Next.
- Make sure Block the connection is selected.

- Click Next.
- Make sure Domain, Private, and Public are checked.
- Click Next.
- Type a name for the rule (e.g., Block AppName).
- Click Finish.
All outbound connections from the selected program are now blocked.
An outbound rule is usually enough to block a program from accessing the internet.
Note: Blocking a program's internet access may affect program features such as software updates, cloud syncing, license checks, or remote data access.
Optional: Block inbound connections
To block incoming traffic as well, click Inbound Rules in the top-left menu and repeat the same steps.
Check for other executables (.exe)
If the program still accesses the internet, check its installation folder for helper executables like updater.exe or service.exe. Repeat the steps above to block all additional .exe files in that directory.
Method 2: PowerShell (Quick CLI command)
- Right-click the Start button (Windows logo) on the taskbar and select Terminal (Admin) or PowerShell (Admin).
-
Type (or copy and paste) the following command (replace "C:\Program Files\ProgramName\program.exe" with the full path to your program's executable):
New-NetFirewallRule -DisplayName "Block Program Internet Access" -Direction Outbound -Program "C:\Program Files\ProgramName\program.exe" -Action Block - Press Enter.

All outbound connections from the selected program are now blocked.
An outbound rule is usually enough to block a program from accessing the internet.
Note: Blocking a program's internet access may affect program features such as software updates, cloud syncing, license checks, or remote data access.
Why Is the program still accessing the Internet?
If the program is still connecting to the internet after creating an outbound rule, check for these common causes:
- Other executables: Many modern programs use helper executables (e.g., updaterservice.exe or helper.exe) located in subfolders. You must also create firewall rules for these secondary .exe files.
- Third-party antivirus/firewall: If you're using third-party security software (like Bitdefender, Norton, or Kaspersky), its firewall overrides Windows Defender Firewall. You must configure the block rule inside your antivirus firewall software.
- Inbound traffic required: Some programs act as servers or listen for connections. Repeat the steps in Method 1 under Inbound Rules to block incoming connections as well.
How to unblock a program
To restore internet access for the program:
- Press the Windows + R keyboard keys.
- Type
wf.msc. - Press Enter.
- Click Outbound Rules in the top-left menu.
- Right-click the rule you created and select Disable Rule (to temporarily allow access) or Delete (to remove the block permanently).
Related:
How to block a website in Windows 10 and 11 (step by step)
References: