Most of the times, we would want our programs/applications to continue being connected to the internet. However, there might come times when we wish if we could prevent a program from accessing the Internet without turning off the wifi or even going as far as unplugging the network cable.
This guide will teach you how to use Windows 10's built-in firewall to deny access to the Internet for any program of your choice. Some people tend to get frightened by the word "firewall" thinking it's complicated and shouldn't be messed with. Like anything else, as long as you don't rush and read before clicking on things, everything will be fine.
- Windows Defender Firewall with Advanced Security
Note: To launch "Windows Defender Firewall with Advanced Security", search for it in the Windows 10 start menu. Or better, do Win + R, type in
wf.msc, and hit enter or click the "OK" button.
CREATE AND ENABLE BLOCK RULE
Okay, to demonstrate the process involved to achieve this, I will go ahead and make use of Google Chrome as an example.
We begin by creating a new outbound rule. On the "Windows Defender Firewall with Advanced Security" window, click on
Outbound Rules on the left pane and then
New Rule... on the right pane.
On the Wizard that appears, choose Program and click on Next. Since we are trying to create a firewall rule that is going to target a specific program.
On the next step (step 2/5), we need to browse and select the program's executable file (.exe file). In my case, Google Chrome's executable file was located at C:\Program Files\Google\Chrome\Application\chrome.exe. After choosing the path to the program, click on Next
On the next step (step 3/5), choose Block the connection, and click on Next
On the next step (step 4/5), we get to choose when this new rule gets applied. By default, all the 3 available choices will be ticked, leave it like that and click on Next.
On the last step of the creation of our new firewall rule, we can give it a name and description. Though it's completely optional, try to name it something meaningful so that we won't get lost trying to find it on a later date. And ofcourse, click on Finish.
Our new outbound firewall rule will be added and enabled now. We can confirm this from the outbound rules list as shown on the picture below,
Now, if we try to access the Internet on Google Chrome, we will be getting the following error.
DISABLING THE RULE
To disable any rule, all we have to do is, right-click it and choose Disable Rule.
After that, everything should be back to normal. You can also choose to delete the rule completely if you wish to.