How to block a program from accessing the internet on Windows

This step-by-step tutorial will show you how to block a program from accessing the internet on Windows 10 and 11 with Windows Firewall.

How to block a program from accessing the internet on Windows 10 and 11

  1. Click on the Windows Security icon located in the system tray to open Windows Security.
    Windows Security system tray icon
  2. Click on Firewall & network protection.
    Windows Security Firewall and network protection
  3. Click on Advanced settings located at the bottom.
    Advanced Firewall settings
  4. When the User Account Control window appears, you click Yes. Depending on your settings, you may also need to enter the admin password and click Yes.
  5. In the 'Windows Defender Firewall with Advanced Security' window, you click on Outbound Rules located in the top left corner.
    Windows Firewall outbound rules
  6. Click on New Rule located in the top right corner.
    Windows Firewall New Rule
  7. In the next window, you select the Program option.
    Windows Firewall new outbound rule program option
  8. Click Next in the bottom right corner of the window.
  9. Make sure the This program path option is checked.
  10. Click Browse.
    Windows Firewall Browse button
  11. In the next window, you go to the location on your PC of the program you want to block from accessing the internet. You can find a program in the Program Files or Program Files (x86) folder on the (C:) drive. Like for example: C:\Program Files\Mozilla Firefox\firefox.exe.
  12. Select the EXE file. For most programs, the main EXE file is the file you want to block. But there are programs for which you have to block another EXE file. You can also block multiple EXE files from the program's folder.
  13. Click Open.
    Select a program in Windows Firewall
  14. Click Next at the bottom of the window.
  15. Make sure the Block the connection option is checked.
    Windows Firewall Block the connection option
  16. Click Next.
  17. Make sure the Domain, Private, and Public options are checked.
    Windows Firewall Domain Private and Public options
  18. Click Next.
  19. Type a name for the rule in the name field (e.g., Block Firefox).
    Windows Firewall rule name
  20. Click Finish.

Now all outbound connections from the program in question are blocked.

If you want to completely block the program from accessing the internet, you click on Inbound Rules in the top left corner and repeat the process you used to create the outbound rule.

Windows Firewall inbound rules

If the program still has a connection to the internet, you may need to create one or more rules for other EXE files from the program's folder.

For most programs, the main EXE file is the one to block. But there are programs for which you have to block another EXE file. You can also block multiple EXE files from the program's folder.


Windows


Related:

How to block a website in Windows 10 and 11 (step by step)


References:

https://www.laptopmag.com/articles/block-windows-10-programs-connecting-to-internet

https://www.wikihow.com/Block-a-Program-with-Windows-Firewall

https://www.howtogeek.com/227093/how-to-block-an-application-from-accessing-the-internet-with-windows-firewall/

https://www.thewindowsclub.com/how-to-block-an-application-from-accessing-the-internet

https://www.makeuseof.com/windows-11-block-apps-from-accessing-internet/