tangsunhk 當前離線
進階會員
killuazaoldyeck 當前離線
東方茅原実里の主義
WINDOWS 7點係防火牆開TCP PORT位? tangsunhk 發表於 2012-2-2 23:39
TOP
要用Windows 防火牆的進階設定,然後看你需要開放外面入Windows,還是程式出…… ... killuazaoldyeck 發表於 2012-2-2 11:44 PM
提供的引數數目不正確。請檢查說明以取得正確的語法。 使用方式: add rule name=<string> dir=in|out action=allow|block|bypass [program=<program path>] [service=<service short name>|any] [description=<string>] [enable=yes|no (default=yes)] [profile=public|private|domain|any[,...]] [localip=any|<IPv4 address>|<IPv6 address>|<subnet>|<range>|<list>] [remoteip=any|localsubnet|dns|dhcp|wins|defaultgateway| <IPv4 address>|<IPv6 address>|<subnet>|<range>|<list>] [localport=0-65535|<port range>[,...]|RPC|RPC-EPMap|IPHTTPS|any (defaul [remoteport=0-65535|<port range>[,...]|any (default=any)] [protocol=0-255|icmpv4|icmpv6|icmpv4:type,code|icmpv6:type,code| tcp|udp|any (default=any)] [interfacetype=wireless|lan|ras|any] [rmtcomputergrp=<SDDL string>] [rmtusrgrp=<SDDL string>] [edge=yes|deferapp|deferuser|no (default=no)] [security=authenticate|authenc|authdynenc|authnoencap|notrequired (default=notrequired)] 備註: - 將新的輸入規則或輸出規則新增至防火牆原則。 - 規則名稱應該是唯一且不能是 "all"。 - 如果指定了遠端電腦或使用者群組,security 必須是 authenticate、 authenc、authdynenc 或 authnoencap。 - 將安全性設定為 authdynenc 可讓系統為符合指定 Windows 防火牆規則的流 量動態交涉加密的使用。加密是根據現有的連線安全性規則內容來交涉。這個 選項允許電腦能夠接受輸入 IPsec 連線的第一個 TCP 或 UDP 封包,只要它 是安全的,但不會使用 IPsec 來加密。一旦處理第一個封包,伺服器將會重 新交涉連線並升級它,這樣才能完全地加密所有後續的通訊。 - 如果 action=bypass,當 dir=in 時必須指定遠端電腦群組。 - 如果 service=any,此規則僅適用於服務。 - ICMP 類型或代碼可以是 "any"。 - 只有輸入規則才可以指定 Edge。 - AuthEnc 與 authnoencap 不能一起使用。 - 只有當 dir=in 時,Authdynenc 才有效。 - 當設定 authnoencap 時,security=authenticate 選項會變成選擇性參數。 範例: 為 messenger.exe 新增沒有壓縮安全性的輸入規則: netsh advfirewall firewall add rule name="allow messenger" dir=in program="c:\programfiles\messenger\msmsgs.exe" security=authnoencap action=allow 為連接埠 80 新增輸出規則: netsh advfirewall firewall add rule name="allow80" protocol=TCP dir=out localport=80 action=block 為 TCP 連接埠 80 流量新增需要安全性與加密的輸入規則: netsh advfirewall firewall add rule name="Require Encryption for Inbound TCP/80" protocol=TCP dir=in localport=80 security=authdynenc action=allow 為 messenger.exe 新增輸入規則並且需要安全性 netsh advfirewall firewall add rule name="allow messenger" dir=in program="c:\program files\messenger\msmsgs.exe" security=authenticate action=allow 為由 SDDL 字串識別的 acmedomain\scanners 群組新增已驗證的防 火牆略過規則: netsh advfirewall firewall add rule name="allow scanners" dir=in rmtcomputergrp=<SDDL string> action=bypass security=authenticate 為本機連接埠 5000-5010 新增輸出允許規則以用於 udp- Add rule name="Allow port range" dir=out protocol=udp localport=5000- 5010 action=allow