是否了解如何配置 Windows 防火墙以阻止 IP 地址范围? 在本教程中,我们将向您展示如何配置 Windows 防火墙以阻止运行 Windows 的计算机上的多个 IP 地址。
• Windows 2019
• Windows 2016
• Windows 2012 R2
• Windows 10
• Windows 7
设备列表
在这里,您可以找到用于创建本教程的设备列表。
此链接还将显示用于创建本教程的软件列表。
与 Windows 相关的教程:
在此页上,我们提供对与 Windows 相关的教程列表的快速访问。
教程 Windows 防火墙 – 阻止 IP 地址列表
作为管理员,启动提升的命令提示符。

将 Windows 防火墙服务配置为自动启动。
启动 Windows 防火墙服务。
启用 Windows 防火墙配置文件。
作为管理员,使用高级安全性启动名为 Windows 防御者防火墙的应用程序。

创建新的入站防火墙规则。

选择”自定义”选项。

选择所有程序。

单击”下一步”按钮。

选择名为”这些 IP 地址”的选项,然后单击”添加”按钮。

创建防火墙规则以拒绝从特定 IP 地址输入数据包。

重复此过程以添加多个 IP 地址或 IP 地址范围。

选择阻止连接的选项。

选择”域”选项。
选择”专用”选项。
选择”公共”选项。

输入防火墙规则的说明。

在我们的示例中,我们配置了 Windows 防火墙以阻止来自多个 IP 地址的数据包的输入。
祝贺! 您配置了 Windows 防火墙以阻止 IP 地址列表。
Windows – 使用命令行阻止 IP 地址列表
作为管理员,启动提升的命令提示符。

将 Windows 防火墙服务配置为自动启动。
启动 Windows 防火墙服务。
启用 Windows 防火墙配置文件。
创建防火墙规则以拒绝从特定 IP 地址输入数据包。
创建防火墙规则以拒绝从 IP 地址列表中输入数据包。
在我们的示例中,我们配置了 Windows 防火墙以阻止来自 IP 地址 10.10.10.10 和 20.20.20.20.20 的数据包的输入。
祝贺! 您配置了 Windows 防火墙以阻止 IP 地址列表。
教程 Windows – 验证防火墙配置
作为管理员,启动提升的命令提示符。

验证防火墙配置文件的配置。
下面是命令输出。
验证名为 BLACKLIST 的防火墙规则的配置。
下面是命令输出。
使用高级安全性启动名为 Windows 防御者防火墙的应用程序。

验证您的防火墙规则是否列在入站规则上。

您可以验证防火墙配置。