How to block a program with Windows 10 firewall

At first, why we have to block a program with a firewall from access the Internet? There are several reason to do that:

Let's start. Open the Windows 10 firewall. There are two ways to open the firewall:

In the "Run" window, type wf.msc:

the "Run" window in Windows 10

Or open the "Control Panel", click on the "System and Security", then click on the "Windows Firewall". Click on the "Advances settings".

Windows Firewall settings window

It will open the "Windows Firewall with Advanced Security" windows.

Windows Firewall with Advanced Security windows

There is "Inbound Rules" and "Outbound Rules" in the left part of the panel. The "Inbound Rules" are used to control data received by a program, and the "Outbound Rules" control the data that the program sends out. Click on the "Inbound Rules", then in the right panel, click on the "New Rule...".

Create a new rule in the Inbound Rules

You'll see the "New Inbound Rule Wizard"

New Inbound Rule Wizard in the Windows 10 firewall

Select "Program" and click on the "Next" button. You'll see the window in which you can select a program you want to block.

Select a program to block in the Windows 10 firewall

Select the "This program path" end enter the program you want to block.

Warning! If you select a program in a directory where the path includes an environmental variable such as %ProgramFiles%, %APPDATA%, %LOCALAPPDATA% and so on, rules will not work! To fix it, you have to replace environmental variables with a normal path!

Let's consider an example. We'd like to block this program:

c:\Program Files (x86)\Google\Chrome\Application\chrome.exe

Navigate to this program using the button "Browse" and open the program:

A program path with the environmental variable

You can see the path with the environmental variable %ProgramFiles%. Replace it with the normal path:

A full program path

Now it will work.

Press the "Next" button, and select the "Block the connection" in the next screen:

Block the connection in the Windows 10 firewall dialog

Click the "Next" button again, and you see the page with profiles:

Domain, private and Public profiles in the Windows 10 Firewall

Check all of them, it will block the program over "Public" and "Private" networks. Click "Next". You'll see the last screen of the "New Inbound Rule Wizard".

Specify the name and description for a new rule in windows 10 firewall

Enter there any name you want, and click on the "Finish". Now in the central panel of the firewall you can see the new rule for the inbound connection. It will block any connection from the Internet to the program.

New Inbound Rule in the central panel of the Windows 10 firewall

But this is not enough. You have also setup "Outbound Rules" for the program you want to block from sending data to the Internet. Click on the "Outbound Rules" and then click on the "New Rule...". You'll see the wizard, use it the same way as described above.

New Outbound Rule in the central panel of the Windows 10 firewall

At the and, the "Outbound Rules" will contains the blocked item. Now test the program for both rules to be sure that it works.

How to delete a rule in the Windows 10 firewall

If you want to unblock a blocked program, select it in the firewall, click "Delete" on the right panel. You have to do this for both "Inbound Rules" and "Outbound Rules".

You can watch this tutorial on youtube: How to block a program with Windows 10 firewall

BACK