FacebookTwitterLinkedIn

How to Block Programs From Accessing Internet Using Windows Firewall?

How to Block Programs From Accessing Internet in Windows 10

Windows has a built-in Windows Firewall (also known as Windows Defender Firewall) installed on the operating system. It is essentially an application designed to filter network data transmissions and block programs that initiate harmful communications.

how to block programs from accesing internet

Windows Firewall protects against attacks from the Internet or your local network but does not prevent you from accessing the web. It filters incoming and outgoing connections and blocks any that are unsafe. Windows Firewall has 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 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 programs 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. This guide shows how to block both inbound (incoming data) and outbound traffic (outgoing data) for any given program.

Video Showing How to Block Programs From Accessing 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 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 workplace, 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 recognize and remember if needed in the 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, 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. 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 can now 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 Top]

▼ Show Discussion

About the author:

Rimvydas Iliavicius

Rimvydas is a researcher with over four years of experience in the cybersecurity industry. He attended Kaunas University of Technology and graduated with a Master's degree in Translation and Localization of Technical texts. His interests in computers and technology led him to become a versatile author in the IT industry. At PCrisk, he's responsible for writing in-depth how-to articles for Microsoft Windows. Contact Rimvydas Iliavicius.

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

About PCrisk

PCrisk is a cyber security portal, informing Internet users about the latest digital threats. Our content is provided by security experts and professional malware researchers. Read more about us.

Malware activity

Global malware activity level today:

Medium threat activity

Increased attack rate of infections detected within the last 24 hours.