默认情况下,您在Windows(Windows)中安装的大多数应用程序和游戏(apps and games)都可以不受限制地访问 Internet。但是,您可以通过Windows 防火墙控制他们的(Windows Firewall)Internet 访问(internet access)。有了它,您可以阻止特定应用程序和游戏(apps and games)、所有类型的网络连接或特定类型的网络连接访问互联网。以下是如何使用Windows内置的防火墙来阻止应用程序和游戏(apps and games)访问互联网,只需三个步骤:
注意:(NOTE:)本指南涵盖Windows 10、Windows 7 和 Windows 8.1。内置防火墙在 Windows 10中称为Windows Defender 防火墙(Windows Defender Firewall),(Windows Firewall)在旧版本的Windows中称为 Windows 防火墙。但是,它在所有版本中都一样。如果您不知道您拥有的Windows版本,请阅读:我安装了哪个版本的Windows ?。
步骤 1(Step 1)。确定需要在Windows Defender 防火墙中阻止的文件(Windows Defender Firewall)
为了能够控制应用程序或游戏访问互联网,您需要找到启动或接收互联网访问的可执行文件。对于大多数应用程序,可执行文件的位置位于"C:Program Files"和"C:Program Files (x86)"的子文件夹中。
但是,游戏可能安装在其他地方,例如不同的分区或文件夹(partition or folder)。例如,我们将游戏安装在“ D:”驱动器的“ D:Games”文件夹中。我们最近安装了著名的游戏Metro Exodus,并且在本教程中,我们阻止了它的互联网访问(internet access),以便您了解整个过程是如何工作的。用于玩游戏的可执行文件是MetroExodus.exe。您可以将另一个可执行文件用于您感兴趣的应用程序或游戏(app or game)。
记住要阻止的文件的位置和名称。为了让生活更轻松,您可以将“文件资源管理器(File Explorer)”窗口直接保留在您找到该文件的位置。
步骤 2(Step 2)。打开Windows Defender 防火墙(Windows Defender Firewall)
Windows Defender 防火墙(Windows Defender Firewall)使用入站和出站规则(inbound and outbound rules)控制进出您的Windows PC的访问。允许用户管理这些规则的工具称为具有高级安全性的 Windows Defender 防火墙(Windows Defender Firewall with Advanced Security)。在搜索框中(search box)键入“wf.msc”,然后单击或点击具有相同名称的结果。
有关如何打开此应用程序的更多方法,请阅读本指南具有高级安全性的(Advanced Security)Windows Defender 防火墙(Windows Defender Firewall):它是什么?如何打开它?你能用它做什么?
步骤 3(Step 3)。创建规则以阻止您感兴趣的应用或游戏(app or game)访问互联网
在具有高级安全性的 Windows Defender 防火墙(Windows Defender Firewall with Advanced Security)窗口中,单击或点击左侧导航面板(navigation panel)中的出站规则。(Outbound Rules)然后,单击或点击(click or tap)右侧“操作(Actions)”面板中的“新建规则”。(New Rule)
“新建出站规则向导”将指导您完成创建(New Outbound Rule Wizard")出站规则(outbound rule)所需的步骤。首先(First),选择规则类型(Rule Type)。由于我们要阻止特定的应用程序或游戏(app or game),请选择“程序”(Program)。单击或点击下一步(Next)。
您需要输入要阻止的可执行文件的位置和名称。
按浏览(Browse),然后在打开(Open)窗口中,转到要阻止的可执行文件的位置,选择它,然后按打开(Open)。然后,单击或点击下一步(Next)。
现在您需要选择您希望防火墙采取的操作。选择“阻止连接”(Block the connection,"),然后按下一步(Next)。
您可以选择阻止特定网络位置的应用程序或游戏。选项包括Domain、Private和Public。私人位置是您的家庭网络。(Private)公共(Public)位置可以是餐厅中的WiFi连接(WiFi connection)。要确保始终阻止 Internet 访问,请选择所有网络位置并按Next。
现在您需要为您创建的规则命名。键入一个名称,以便于记住规则的作用,然后按Finish。
新规则显示在出站规则列表中,其名称左侧显示一个停止标志。
我们创建的出站规则会阻止(outbound rule)应用或游戏(app or game)到达互联网上的其他地方。该规则会立即激活,并在您运行您选择的应用程序或游戏(app or game)时阻止访问互联网。
注意:(NOTE:)如果您的应用或游戏(app or game)有多个可执行文件,并且您不确定哪个可以访问互联网,我们建议您全部屏蔽。
您要阻止什么应用程序或游戏?
阻止应用程序或游戏可以帮助您保护您的隐私、摆脱不需要的广告或保护您的孩子不玩在线游戏。Windows提供了一个可靠的内置防火墙(built-in firewall)来帮助控制这些情况。您要阻止什么应用程序或游戏?在下面的评论中告诉我们。
Block apps and games from accessing the internet, with Windows Defender Firewall
Most apps and games you install in Windowѕ have, by default, unrestricted access to the internet. However, you can control their internеt access through the Windows Firewall. With it, you can block access to the internet for specific apps and games, on all types of network connections, or on specific types of network connections. Here is how to use the firewall built into Windows, to block apps and games from accessing the internet, in just three steps:
NOTE: This guide covers Windows 10, Windows 7, and Windows 8.1. The built-in firewall is named Windows Defender Firewall in Windows 10, and Windows Firewall in the older versions of Windows. However, it works the same in all versions. If you do not know the version of Windows that you have, read: What version of Windows do I have installed?.
Step 1. Identify the file that you need to block in the Windows Defender Firewall
To be able to control an app or a game from accessing the internet, you need to find the executable file that initiates or receives internet access. For most apps, the location of the executable files is in a subfolder in "C:Program Files" and "C:Program Files (x86)".
However, games may be installed in other places, like on a different partition or folder. For example, we install our games on the "D:" drive, in the "D:Games" folder. We recently installed the famous game Metro Exodus, and, in this tutorial, we block its internet access, so that you can see how the whole process works. The executable file used to play the game is MetroExodus.exe. You can use another executable file for an app or game that interests you.
Remember the location and the name of the file that you want to block. To make life easier, you may keep the File Explorer window, directly at the location where you find that file.
Step 2. Open the Windows Defender Firewall
Windows Defender Firewall controls the access into and out of your Windows PC using inbound and outbound rules. The tool that allows users to manage these rules is called Windows Defender Firewall with Advanced Security. Type "wf.msc" in the search box, and click or tap the result with the same name.
For more methods on how to open this app, read this guide Windows Defender Firewall with Advanced Security: What is it? How to open it? What can you do with it?.
Step 3. Create a rule to block internet access for the app or game that interests you
In the Windows Defender Firewall with Advanced Security window, click or tap Outbound Rules in the navigation panel on the left. Then, click or tap New Rule in the Actions panel on the right.
The "New Outbound Rule Wizard" guides you through the steps needed to create the outbound rule. First, choose the Rule Type. Since we want to block a specific app or game, select Program. Click or tap Next.
You need to enter the location and the name of the executable file that you want to block.
Press Browse and, in the Open window, go to the location of the executable file that you want to block, select it, and press Open. Then, click or tap Next.
Now you need to choose the action that you want the firewall to take. Select "Block the connection," and press Next.
You are given the option to block the app or the game for specific network locations. The options are Domain, Private, and Public. A Private location is your home network. A Public location can be a WiFi connection in a restaurant. To make sure that internet access is blocked at all times, select all network locations and press Next.
Now you need to give a name to the rule that you create. Type a name that makes it easy to remember what the rule is doing, and press Finish.
The new rule is displayed in the list of outbound rules, with a stop sign showing on the left side of its name.
The outbound rule we have created blocks the app or game from reaching out to other places on the internet. The rule is activated immediately, and it blocks access to the internet the moment you run the app or game that you have chosen.
NOTE: If your app or game has several executable files, and you are not sure which one accesses the internet, we recommend blocking all of them.
What app or game are you trying to block?
Blocking an app or a game can help you protect your privacy, get rid of unwanted advertising, or protect your children from playing online games. Windows provides a solid built-in firewall that helps control these situations. What app or game are you trying to block? Let us know in a comment below.