How to block a program from accessing the internet in Windows 10

This tutorial will show you step by step how to block a program from accessing the internet in Windows 10.

How to block a program with the firewall in Windows 10

1. Click on the small 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

This will open “Windows Defender Firewall with Advanced Security”.

You can also type firewall in the Windows 10 search bar, and then click on Windows Defender Firewall with Advanced Security when it appears.

Open Windows Defender Firewall with Advanced Security via the search bar

Or you can click on the Windows 10 start menu button > Windows Administrative Tools > Windows Defender Firewall with Advanced Security.

4. When the “User Account Control” window appears, you click on Yes. If you're not using an administrator account (which you shouldn't use for daily use anyway), you first need to enter the administrator password and then click on 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

A “New Outbound Rule Wizard” window will appear.

7. Check the Program option.

Windows Firewall new outbound rule program option

8. Click on the Next button in the bottom right corner of the window.

9. Make sure the This program path option is checked.

10. You can enter the full path of the program (e.g., C:\Program Files\Mozilla Firefox\firefox.exe) or you can click on the Browse button to browse for the program.

Windows Firewall program path

If you clicked on the Browse button, a small window appears. And within this small window, you will have to navigate to the program you want to block from accessing the internet.

Usually, 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.

One thing to keep in mind is that, 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. Just to be sure.

11. Click on the Next button at the bottom of the window.

12. Make sure the Block the connection option is checked.

Windows Firewall Block the connection option

13. Click on the Next button.

14. Make sure the Domain, Private, and Public options are checked.

Windows Firewall Domain Private and Public options

15. Click on the Next button.

16. In the name field, you type a name for the rule (e.g., Block Firefox).

Windows Firewall rule name

17. Click on the Finish button.

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, step for step.

Windows Firewall inbound rules

If the program is still connecting to the internet, you may need to create one or more rules for other EXE files from the program's folder, or you may need to edit the program's path in the rule you created. To do so, you double-click on the newly created outbound rule > Click the Programs and Services tab > In the This program field, you enter the full path of the program. Like for example, %ProgramFiles%\Mozilla Firefox\firefox.exe becomes C:\Program Files\Mozilla Firefox\firefox.exe > Click on the Apply button > Click on the OK button.


How to block all outgoing connections with firewall in Windows 10