How To Block Programs From Accessing Internet?

How To Block Programs From Accessing Internet In Windows 

Windows has a built-in Windows Firewall (also known as Windows Defender Firewall) installed on the operating system. Windows Firewall is a security tool created by Microsoft that runs in the background and keeps the operating system safe from various network threats. It is essentially an application designed to filter network data transmissions and block programs that are initiating harmful communications.

Windows Firewall provides protection against attacks from the Internet or your local network, but does not prevent you from accessing the web. It can also prevent malicious software from attacking your computer via the Internet. It filters incoming and outgoing connections and blocks any that are unsafe. There is a predefined set of rules for private and public networks, which can be edited by the user or the software that the user installs.

Windows Firewall is fine for basic use, protects against various threats, and allows you to configure settings depending on how you use your computer. This includes blocking a program in Windows Firewall. Many programs have elements that require an Internet connection to download updates, allow online purchases, and so on. These can upload your data without your knowledge. Windows Firewall is useful in this respect, since it allows you to take control over how and when programs can connect to the Internet, thus providing more security for your computer. In this guide we  show how to block both inbound (incoming data) and outbound traffic (outgoing data) for any given program.

how to block programs from accesing internet

Table of Contents:

How To Block A Program From Accessing The Internet

First, type "firewall" in Search and select the "Windows Defender Firewall" result.

block programs from accessing internet step 1

In the Windows Defender Firewall window, find and click the "Advanced settings" option on the left pane.

 block programs from accessing internet step 2

In the Windows Defender Firewall with Advanced Security window, find the "Outbound rules" option in the left pane. Click it to display a list of generated entries. Click "New Rule..." in the right pane to create a new outbound traffic rule.

block programs from accessing internet step 3

The New Outbound Rule Wizard window will appear. Ensure that the "Program" option is selected and click "Next".

block programs from accessing internet step 4

You will be moved to the next step called "Program". Select the "This program path" option and type the path to the program you wish to block or browse for it. Most applications can be blocked by selecting the .exe (executable) file that launches the program. In some cases, apps or programs can be launched through the executable file, but network connectivity is applied through some other file. If this is the case, you need to select a file that is used to connect to the Internet. For most applications, the main .exe file is the one you should block. In our example, we chose the firefox.exe executable file. Once you have selected the file, click "Next".

block programs from accessing internet step 5

In the "Action" section you will see three options: "Allow the connection", "Allow the connection if it is secure", and "Block the connection". Select "Block the connection" and click "Next".

block programs from accessing internet step 6

In the "Profile" section you will be asked when you wish to apply this rule: when a computer is connected to its corporate domain, when a computer is connected to a private network, such as a home or work place, and when a computer is connected to a public network location. Select the preferred option (or options) and click "Next".

block programs from accessing internet step 7

You will be directed to the last section called "Name". Here, you need to name your rule - we recommend you give it a name that you can recognise and remember if needed in future. If you wish, you can add a more detailed description to it. Once finished, click "Finish".

block programs from accessing internet step 8

You will see the newly created rule at the top of the "Outbound Rules" list. Now, all outbound communication from this particular application will be turned off. If you want to create an "Inbound Rule" for the same program or application, go select the "Inbound Rules" option in the left pane and repeat the steps described above. If you want to make any changes to newly created rules, simply double-click any of them and start editing.

block programs from accessing internet step 9

Now that you have created a new rule in Windows Firewall, you can test it. In our example, we chose to block Mozilla Firefox from accessing the Internet and you can see that we are now unable to connect to the Internet using the Mozilla Firefox browser. As you can see, it informs us that our computer or network could be protected by a firewall or proxy and we have to make sure that Firefox is permitted to access the Web. Therefore, we have achieved our goal and blocked this particular program from accessing the Internet.

block programs from accessing internet step 10

We hope this guide was helpful and you are now able to block programs from accessing the Internet by making changes to the Windows Firewall settings. If you know of other methods not mentioned in our guide, please share them with us by leaving a comment in the section below.

[Back to Table of Contents]

Video Showing How To Block Programs From Accessing Internet:

[Back to Top]

About the author:

Tomas Meskauskas

I am passionate about computer security and technology. I have an experience of 10 years working in various companies related to computer technical issue solving and Internet security. I have been working as an editor for since 2010. Follow me on Twitter to stay informed about the latest tech news or online security threats. Contact Tomas Meskauskas.

Our guides are free. However, if you want to support us you can send us a donation.