Share via


desktop2:Rule

定義防火牆例外狀況規則。

元素階層

<套件>

    <擴充功能>

         <desktop2:Extension>

              <desktop2:FirewallRules>

                   <desktop2:Rule>

Syntax

<desktop2:Rule
  Direction = 'A string that can have one of the following values: "in" or "out".'
  IPProtocol = 'A string that can have one of the following values: "ICMPv4", "ICMPv6", "TCP", "UDP", "GRE", "AH", "ESP", "EGP", "GGP", "HMP", "IGMP", "RVD", "OSPFIGP", "PUP", "RDP", or "RSVP".'
  Profile = 'A string that can have one of the following values: "domain", "private", "domainAndPrivate", "public", or "all".'
  LocalPortMin = 'An optional integer with a value between 1 and 65535 (inclusive).'
  LocalPortMax = 'An optional integer with a value between 1 and 65535.'
  RemotePortMin = 'An optional integer with a value between 1 and 65535.'
  RemotePortMax = 'An optional integer with a value between 1 and 65535.' />

屬性和元素

屬性

屬性 描述 資料類型 必要 預設值
方向 規則的方向。 具有下列其中一個值的字串:「in」 或 「out」。 Yes
IPProtocol 規則的 IP 通訊協定。 具有下列其中一個值的字串:ICMPv4、ICMPv6TCPUDPGREAHESPEGPGGPHMPIGMPRVDOSPFIGPPUPRDPRSVP Yes
設定檔 然後,網路的屬性。 可具有下列其中一個值的字串: domainprivatedomainAndPrivatepublicall Yes
LocalPortMin 本機埠的最小值。 選擇性整數,其值為介於 1 到 65535 (內含) 。 No
LocalPortMax 本機埠的最大值。 選擇性整數,其值為 1 到 65535。 No
RemotePortMin 遠端埠的最小值。 選擇性整數,其值為 1 到 65535。 No
RemotePortMax 遠端埠的最大值。 選擇性整數,其值為 1 到 65535。 No

子元素

無。

父元素

父元素 描述
desktop2:FirewallRules 指定 Windows 傳統型橋接器應用程式所使用的防火牆例外規則。

規格需求

Item
命名空間 http://schemas.microsoft.com/appx/manifest/desktop/windows10/2
OS 最低版本 Windows 10版本 1703 (組建 15063)