Windows

How to block an app from accessing the internet on Windows

Updated

Short answer

Create an outbound rule in Windows Defender Firewall: open wf.msc, choose Outbound Rules › New Rule › Program, pick the app’s .exe, select “Block the connection” and apply it to all profiles. The same rule can be created with one PowerShell command, or in one click from a per-app firewall such as PacketShield.

Option 1: Windows Defender Firewall with Advanced Security

  1. Press Win+R, type wf.msc and press Enter.
  2. Click Outbound Rules in the left panel, then New Rule… on the right.
  3. Choose Program and click Next.
  4. Select “This program path” and browse to the app’s .exe file (for example C:\Program Files\App\app.exe).
  5. Choose “Block the connection”.
  6. Keep Domain, Private and Public checked so the rule applies on every network.
  7. Give the rule a name you will recognize later and click Finish.

Many apps run helper processes or updaters from other folders. If the app still connects, look for its other .exe files and add a rule for each one.

Option 2: PowerShell (one command)

New-NetFirewallRule -DisplayName "Block MyApp" -Direction Outbound `
  -Program "C:\Program Files\MyApp\myapp.exe" -Action Block

# Remove it later
Remove-NetFirewallRule -DisplayName "Block MyApp"

Run PowerShell as administrator and replace the path with the app you want to block:

With PacketShield: block from the list of apps that are online

  1. Open PacketShield and find the app in the live list (it appears as soon as it connects).
  2. Click Block on the app’s row.
  3. To undo it, click Allow on the same row. Rules are kept when you restart.

PacketShield creates the rule in the Windows Filtering Platform (WFP), the same layer Windows Firewall uses, and you can see right away that the app has stopped sending traffic. The free version includes 1 active block rule; PRO (one-time $19) removes the limit.

Frequently asked questions

Does blocking an app in the firewall also block its updates?

Only if the updater runs from the same .exe. Many apps use a separate updater process, which needs its own rule if you want to stop updates too.

Inbound or outbound rule: which one blocks internet access?

Outbound. Outbound rules stop the app from opening connections to the internet; inbound rules only stop other computers from connecting to it.

How do I undo the block?

Disable or delete the rule under Outbound Rules in wf.msc, run Remove-NetFirewallRule, or click Allow on the app in PacketShield.