如何禁用“隐藏”Windows 防火墙过​​滤器?

JNa*_*dal 7 windows-7 windows-firewall

我使用命令“netsh WFP Show State”将所有活动 Windows 过滤器的列表转储到磁盘(wfpsate.xml),并找到一个名为“端口扫描预防过滤器”的过滤器。出于诊断目的,我需要测试禁用此特定过滤器,但我在 Windows 防火墙 (Windows 7 Ultimate x64 Sp1) 的 UI 中找不到此过滤器。下面是相关过滤器的完整 XML 表示。

如何禁用这个特定的过滤器?我如何重新启用此过滤器?

<item>
    <filterKey>{c06945c4-54f1-4b79-9523-71ad3ba2e3be}</filterKey>
    <displayData>
        <name>Port Scanning Prevention Filter</name>
        <description>This filter prevents port scanning.</description>
    </displayData>
    <flags/>
    <providerKey>{decc16ca-3f33-4346-be1e-8fb4ae0f3d62}</providerKey>
    <providerData>
        <data>ffffffffffffffff</data>
        <asString>........</asString>
    </providerData>
    <layerKey>FWPM_LAYER_INBOUND_TRANSPORT_V4_DISCARD</layerKey>
    <subLayerKey>{b3cdd441-af90-41ba-a745-7c6008ff2301}</subLayerKey>
    <weight>
        <type>FWP_UINT8</type>
        <uint8>12</uint8>
    </weight>
    <filterCondition numItems="1">
        <item>
            <fieldKey>FWPM_CONDITION_FLAGS</fieldKey>
            <matchType>FWP_MATCH_FLAGS_NONE_SET</matchType>
            <conditionValue>
                <type>FWP_UINT32</type>
                <uint32>1</uint32>
            </conditionValue>
        </item>
    </filterCondition>
    <action>
        <type>FWP_ACTION_CALLOUT_TERMINATING</type>
        <calloutKey>FWPM_CALLOUT_WFP_TRANSPORT_LAYER_V4_SILENT_DROP</calloutKey>
    </action>
    <rawContext>0</rawContext>
    <reserved/>
    <filterId>230591</filterId>
    <effectiveWeight>
        <type>FWP_UINT64</type>
        <uint64>13835058055315718144</uint64>
    </effectiveWeight>
</item>
Run Code Online (Sandbox Code Playgroud)

Shr*_*ut1 3

好吧,所以你不能关闭那个特定的规则;这是系统默认的!

请参阅这篇有关 Windows 扫描预防过滤器的 TechNet 文章。

默认情况下,防火墙显式打开但没有应用程序侦听该端口的任何端口仍将静默丢弃其数据包。这有助于强化 Windows 安装。

要查看哪些端口具有活动侦听器,请在管理命令提示符中键入以下命令:

netstat -ab
Run Code Online (Sandbox Code Playgroud)

如果您尝试打开的目标端口没有活动侦听器,那么您将看到数据包被静默丢弃(IE 不会添加到防火墙日志中)。您可能已经注意到,丢弃的数据包仍会显示在 Netsh 诊断日志中。有关详细信息,请参阅这篇有关 Netsh 诊断日志记录的 technet 文章。

因此,请查看您的应用程序是否正在侦听适当的端口或是否正常运行!