The vast majority of third-party applications on your computer can access the internet – and they tend to do so for different reasons. However, there are times when you do not want a specific app to use the internet. In such moments, you may be looking to make changes to your computer settings to prevent the application from reaching the web. Well, in this guide, we intend to show you how to block a program from connecting to the internet.
Why would I want to stop an application from using my internet?
Since you came to this page, you probably have your reasons for wanting to cut off web access for an app. Or perhaps, you got curious while wondering why anyone would want to block an application from accessing the internet in the first place. If our assumptions on the latter hold true, then you are about to find out why people try to prevent programs from using the internet.
For example, you might encounter or use an application that insists on fetching updates and installing them (automatically), but you do not want the updates because they break some functions or cause the app to perform worse than before. In such a scenario, you would not have much choice but to cut off internet access for the program. If the program won’t listen to your instructions to hold off updating itself, then you have to ensure it never gets the updates in the first place.
Here’s another scenario: You might have a game that is suitable for your child only in offline mode, or you do not feel comfortable with your ward getting exposed to online (and unsupervised) multiplayer elements. In that case, you are better off instructing Windows to block internet access for that specific game application to ensure the game remains offline.
Or you might be using an application that spams you with obnoxious ads and are looking for a way to stop the ads from showing up in the first place. Well, since the application needs the internet to fetch the ad data, you can prevent the ad spam by cutting off web access for the app.
In some scenarios, you might come across an application that you suspect to be malicious or harmful. To minimize the risks, it makes sense for you to block such an app from using the internet on your computer. A malicious program that is dependent on the internet to work will struggle to do damage on your computer if it is prevented from reaching the web (and contacting its creators or controllers).
How to block an application from accessing the internet in Windows 10?
Regardless of the reasons you have in mind for wanting to stop an application from using the internet on your computer, the procedure involving the Windows Firewall provides the ideal path for you to achieve your goal. Here, you get to tell Windows what it must do when the application tries to connect to the internet by creating a rule.
Since you want Windows to stop the application from reaching the web, you will have to create an outbound rule to enforce the internet blockage. We will now show you how to do that.
Create a Windows Firewall rule to block internet access for the application:
Go through these steps carefully:
- First, you have to get to the Windows Start menu or screen. You can do it by clicking on the Windows icon in the bottom-left corner of your device’s display.
Alternatively, you can get to the Windows Start menu by hitting the Windows logo icon on your machine’s keyboard.
- Now, you must type Control Panel into the text box (that comes up the moment you begin to type) to perform a search task using those keywords as the query.
- Assuming Control Panel (App) has now emerged as the main entry on the results list, you have to click on it to open the needed application.
- Once the Control Panel window comes up, you have to set the View by parameter (in the top-right corner) to Large icons.
- Now, you have to click on Windows Firewall.
- Assuming you are now on the Windows Firewall menu, you have to look at the list in the top-left corner of the window and then click on the Advanced settings link.
The Windows Firewall with Advanced Security utility window is supposed to come up now.
- Look to the top-left corner of the application window. Click or double-click on Outbound rules.
- Now, you must look to the top-right corner of the program window. Under the Actions panel, you have to click on New rule.
- Click on the radio button for Program (to select this option).
(You are looking to block a program from reaching the internet, after all).
- Now, you have to navigate to the folder where the application you are looking to block is installed. Click on the Browse button and continue the work from there.
Once you specify the application’s folder, the app file path will be displayed automatically. The application path in Windows is usually in the form “C:\Program Files\NameOfApp.exe” or “C:\Program Files(x86)\NameOfApp.exe”, where NameOfApp is the name of the application for which you want to block internet access.
- Once the file path for the program gets specified, you have to click on the Next button to proceed to the next stage.
- On the screen that follows, which should be Action, you have to click on the radio button for Block the connection.
- Click on the Next button.
- On the Profile screen, you have to select all the parameters there (Domain, Private, and Public).
Domain is the rule that applies when your computer gets connected to a domain; Private is the rule that applies when your PC is connected to a private network, which could be your home or office network; Public is the rule that applies when your system is connected a public network, such as the WIFI in a coffee shop or airport.
Well, you need Windows to apply the proposed rule for all the profiles, networks, and setups used by the application. Therefore, all the parameters there have to be selected.
- Click on the Next button.
- Assuming you are now on the Name screen, you have to fill the box for Name with your preferred name for the rule.
Ideally, you should use an easily identifiable name.
- You can also fill the text box for Description – if you like. The task here is optional.
- Click on the Finish button.
The rule you just created is supposed to appear on the list under Outbound Rules now. You can check for it there to confirm things.
If you did everything correctly, then Windows will have configured a layer to block all outbound communications from the application for which you want to cut off web access. In most cases, this is usually enough to prevent the app from reaching the web.
Nevertheless, if you want to tighten your grip on the application, then you can go a step further to repeat the same process using Inbound Rules to provide specific instructions to Windows to block all inbound communications for the app. The new rule will be quite identical to the previous one (that you already created), but it will govern inbound traffic for the application in view.
If Windows is already configured to stop an application from sending out data packets in the first place, then the application is unlikely to receive anything from the web. In other words, when the rule for Outbound communication is already configured, the one for Inbound communication is probably overkill (and not needed).
If you want to see how effective the firewall rules can be, then you can run a simple test. You can create an outbound rule to block connections for your browser application to see what happens. After you create the rule, you must open your browser and then try to surf the web (by going to a site or page). If the operation fails and your browser informs you that it cannot connect to the website or internet, then you will know the rule you created has had the effect it should.
You are always free to disable or delete a rule – if you change your mind on the blocking of internet access for a specific application. All you have to do is go through the same steps above to open the Windows Defender Firewall with Advanced Security application, locate the rule under the required section (Inbound or Outbound list), and then perform the required task on the rule.
Other ways of blocking programs from connecting to the internet
Here, we intend to describe alternative methods through which you get to stop an application from reaching the internet. There are scenarios where the proposed procedure involving the creation of rules (in Windows Firewall) just doesn’t cut it.
Take certain games, for example. It might seem that all you need to do is create a blocking rule for NameOfGame.exe, but in reality, that NameOfGame.exe is simply the launcher (executable used to open the application) and the actual connection operations are executed through Java.
In the described scenario, you will need to create a rule to instruct Windows to block connections for Javaw.exe (and not NameOfGame.exe). Or perhaps, you do not even know if the game runs through Java or any similar component, which means you have to start worrying about variables that you failed to account for because you know nothing about them.
problem yourself, you can
ask our certified PC technicians for immediate assistance in the chat right on this page.
Well, given the situation of things (in any of the descriptions provided), you might be better off blocking internet access for the application through one of the following methods.
Alter the system host file to block internet access for a specific address or IP:
Here, we intend to show you how to block a program from reaching the internet when the web address or IP address that it connects to is known. For example, if you want your kids to surf the web on a specific browser but do not want them visiting certain sites, then you are likely to find the procedure here useful.
The Windows hosts file is the file that the operating system (running on your machine) employs to manage hostnames and IP addresses. You can add websites to the entries there, and Windows will get specific instructions to block access to those sites automatically.
Anyway, these are the instructions you must follow to do the work here:
- First, you have to open the File Explorer application by clicking on the program icon (which is probably on your taskbar).
Alternatively, you can use the Windows logo button + letter E keyboard shortcut to open the File Explorer app quickly.
- Once the File Explorer window comes up, you have to click or double-click on This PC to see its contents.
- At this point, you have to navigate through the directories on this path:
- Now, in your current location, you have to locate the hosts file and then double-click on it to open it.
Windows is supposed to bring up a small window or dialog asking you which application you want to use to open the file.
- From the list programs displayed, you have to choose Notepad.
The hosts – Notepad window will be displayed.
You are supposed to see something like this:
# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
# For example:
# 18.104.22.168 testwebpageorsite.com # source server
# 22.214.171.124 testwebpageorsite.com # x client host
# localhost name resolution is handled within DNS itself.
- Now, under the last # character, you have to type the website URL and IP address for which you want to block internet access.
- Assuming you are done modifying the hosts file, you now have to save the changes you made.
- Look at the top-left corner of the Notepad window, click on the File button there (to see the menu options), and then click on Save.
Alternatively, you can use the Ctrl + letter S keyboard shortcut to instruct Windows to save the changes made to the hosts file.
Block internet access for an app using Parental Control:
Here, you get to block web access for specific applications or websites through the Parental Control feature in Windows. The internet blockage procedure here is suitable for parents who are looking to restrict the applications (especially games) used by their kids or to stop children from accessing certain websites.
These are the instructions you must follow to implement and use Parental Control (to block internet access):
- First, you have to open the Settings application. The Windows logo button + letter I keyboard shortcut will come in handy here.
- Once the Settings window appears, you have to click on Account (to enter the menu for this option).
- Look at the menu list on the left border of the window and then click on Other people.
- Now, you must look to the pane on the right border of the window and then click on the Add a family member option.
- Click on the radio button for Add a child (to select this option) and then click on the Next button.
The new profile for the child will appear now (under the Your family section).
- Click on the Manage family settings online link.
You will be directed to the webpage for the Microsoft parental control for your account. There, you will see all the adult and child accounts that exist on your computer.
- Now, you have to check the top-right corner of the page for Check recent activity. Click on this link.
You will now be directed to the Content Restriction tab or screen. There, you will be able to specify or apply different restriction settings to parameters for the internet and applications.
- Now, you have to specify the games and websites you want to block.
- Save the changes – if this step applies.
Block internet access by disabling the network adapter:
If you are hell-bent on stopping an application from connecting to the internet and do not mind cutting off web access for other programs, then the procedure here is ideal for you. In fact, the proposed method of blocking internet access is probably the most effective of the lot since it requires you to put down the internet connectivity components.
By disabling your computer’s network adapters, you get to block internet access for all utilities or setups on your computer. This method is as fool-proof as it gets.
Go through these steps to disable the network adapter:
- Open the Run app by right-clicking on the taskbar (at the bottom of your display) and then selecting Run.
Alternatively, you can use the Windows logo button + letter R keyboard shortcut to do the same thing.
- Once the Run window comes up, you have to fill the field there with msc and then hit the Enter button on your PC’s keyboard (to run the code).
The Device Manager application window will come up.
- Now, you must go through the list of categories, locate Network adapters, and then click on the expansion icon for that category.
The devices inside the Network adapters category will be visible now.
- At this point, you must locate the device through which your computer connects to the internet.
If your PC connects to the web through a WIFI network, then you have to disable the WAN ports. If you use an ethernet cable to connect your computer to the web, then you have to disable the Ethernet connection device. Ideally, you should disable all the devices under the Network adapters category to ensure nothing gets left out.
- To disable a network device, you have to click on it (to get it highlighted), do a right-click on it to see the options available, and then choose Disable device.
- Perform the disabling task on the appropriate devices (or on all the devices, preferably).
If you change your mind on the internet restrictions you imposed on your computer and decide to do away with them, then you have to do this: go through the same steps above to locate the network devices, right-click on a device to see the standard options list, and then choose Enable device. Basically, to regain internet access, you will have to perform the enabling task for all the devices you disabled earlier. If your internet does not come back on immediately, then you have to restart your PC.
Protect PC from Threats with Anti-Malware
Check your PC for malware your antivirus may miss and get threats safely removed with Auslogics Anti-MalwareDOWNLOAD NOW
Since you are looking to restrict internet access on your computer, we have reasons to believe your goals are centered around keeping your computer safe or protecting someone from harm. To this end, you may want to beef up your PC’s security by installing Auslogics Anti-Malware.
With the recommended application, you get to force through improvements in your computer’s defense apparatus, regardless of its state currently (whether you have an antivirus running or not). With the projected improvements, the chances of your system falling to malicious programs (or you becoming a victim of a cyberattack) get reduced considerably.