How to Block a Program From Accessing Internet in Windows 11

Published by Nyau Wai Hoe - Updated on

If there is an application, software, program or game you wish to block from accessing the internet, you can block the app using Windows Firewall so that no traffic can go in or out of the program. This tutorial will show you how to block a program from connecting to the internet using Windows Defender Firewall in Windows 11.

Block an app from using the internet with Windows 11 Firewall

To block an app from accessing the internet, we will use Windows Defender Firewall with Advanced Security to set up inbound and outbound rules to block incoming and outgoing connections for the app.

How does it work? – By blocking incoming connections for a program, connections from outside of your computer to that particular program cannot be initiated. Thus, traffic and data cannot flow inward by the program to your computer. In the contrary, by blocking outbound connections for a program, that particular program will not be able to initiate any connection going-out of your computer, thus, blocking the program from sending any traffic or data to the internet.

Follow the steps below to block both incoming and outgoing connections for a program (to completely block the program from connecting to the internet).

  1. On the Windows desktop screen, go to Start, then search for and open “Windows Defender Firewall with Advanced Security“.Open Windows Defender Firewall with Advanced Security Windows 11
  2. In the Advanced Security window, on the left pane, click on Inbound Rules.
  3. On the right pane, click on New Rule (in the “Actions” column).Add new inbound rules to block program from internet Windows 11
  4. In the wizard window, select Program and then click Next.Create inbound rule to block program Windows 11 Firewall
  5. Next, under “This program path“, enter the path to the program, or click on Browse to browse to the program you want to block. Click Next to continue.Program path Inbound Rule Wizard Windows 11 Firewall
  6. On the next screen, select “Block the connection“.Block an app from using the internet Windows 11
  7. When prompted for “When does this rule apply”, select the network profile which when connected you want the program to be blocked. If you are not sure, select all three Domain, Private and Public to block the program when you are connected to any of these network profiles.Inbound Outbound rules domain private public Windows Firewall
  8. Next, enter a name for this rule. It can be any name you like. The name and description is to make it easier for you to identify this rule among the list of all added rules.Specify the name and description of this inbound outbound rule Firewall
  9. Click Finish to add the rule.
  10. Then, back to the Advanced Security window, on the left pane, click on Outbound Rules.
  11. In the “Actions” column, click on New Rule.How to Block a program from accessing internet Windows 11
  12. Repeat step 4 to 9 to add an outbound rule to block outgoing connection for the program.

After adding both inbound and outbound rules to block connections to or from a program with Windows Defender Firewall, that program will no longer be able to access the internet.

Block only inbound or outbound connection for a program

Optionally, you can partially block a program by blocking only its inbound or outbound connections depending on what you want to achieve. You can set up only one rule on either of the inbound or outbound rules for a program to block only one way connection instead of both.

For example, if you block only the incoming connections for a program, the program will not be able to receive any traffic from the internet, but it can still send traffic out to the internet.

Windows Defender Firewall need to be turned on in order for this feature to work. In Windows 11, Windows Firewall is enabled by default and should always stay on to protect your PC from potential threats. To check if Windows Firewall is properly turned on on your PC, go to Start > search for and open “Windows Security” > Firewall & network protection. Make sure “Firewall is on” is displayed on all three network profiles.

Description for sharing: This tutorial will show you how to block an application from using the internet with Windows Defender Firewall in Windows 11.

Categories: NetworkWindows 11