????? ??????? ???? "netsh advfirewall firewall" ????? ?? ???? "netsh firewall" ?????? ?? ???? ???? ????? Windows ?? ????? ??????? Windows Server 2008 ? Windows Vista

?????? ????????? ?????? ?????????
???? ???????: 947709 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

?????

????? ???? ??? ????? netsh advfirewall firewall ?? ????? ??????? Windows Server 2008 ? Windows Vista. ???? ??? ?????? ??????? ???? ????? ?? ???? ???? ????? Windows ????? ??? ?????? ?? ???? ???? netsh firewall ?? ????? ??????? Windows ???????.

???? ??? ?????? ???? ????? ???? ??? ?????? ?? ????? ???? ??????? ????? ?? ?????. ????? ??? ??????? ????????? ??????? ?????? ??? ??? ?????:
  • ??????
  • ???
  • ???
?? ??? ????? ???? ??? ??????? netsh firewall ?? ????? ??????? ?? ???? ??????? Windows. ???? ???????? ???? netsh advfirewall firewall ?????? ?? ???? ???? ???????.

?????? ?? ????? ???????? ??? ??????? netsh firewall ?? ???? ??????? Windows Vista.

??? ??? ??????? ????? ??????? ???? netsh advfirewall firewall ????? ?? ???? netsh firewall ?????? ?? ???? ???? ????? Windows ?? ????? ??????? Windows Server 2008 ? Windows Vista.

??????? ????

??? ??? ??? ????? ?? ?????? ?????????? ???? ?? ?? ????? "?????? ?? ???? ????????" ??? ???? ????????? ????? ??? ?? ?????? ??????? ?? ???? ??????? ??????? ??? ?????. ???? ????? ???? ????? ?? ?????? ??? ?????? ???? ?? ????? ?? ????? ????? ???? ???? ??????? ???? ???? ???? ????? ????? ??? ?????? ?????? ???? ?? ???? ??? ????? ??????.

????? ????? ??????? ????????? ????? ?????? ?? ??????? ???????. ????? ??????? ??? ??????? ???????? ?? ????? ?? ???? netsh firewall ?????? ??? ???? netsh advfirewall firewall ??????.

???????? ??? ???? ????? ????? netsh advfirewall ???? ????? ????????? ?????? ??? ??????? ????? ?????.

?????? ?????: ????? ?????? ??

?? ??? ??????????? ??? ??????
??? ??????? ????
netsh firewall add allowedprogram C:\MyApp\MyApp.exe "My Application" ENABLEnetsh advfirewall firewall add rule name="My Application" dir=in action=allow program="C:\MyApp\MyApp.exe" enable=yes
netsh firewall add allowedprogram program=C:\MyApp\MyApp.exe name="My Application" mode=ENABLE scope=CUSTOM addresses=157.60.0.1,172.16.0.0/16,LocalSubnet profile=Domainnetsh advfirewall firewall add rule name="My Application" dir=in action=allow program="C:\MyApp\MyApp.exe" enable=yes remoteip=157.60.0.1,172.16.0.0/16,LocalSubnet profile=domain
netsh firewall add allowedprogram program=C:\MyApp\MyApp.exe name="My Application" mode=ENABLE scope=CUSTOM addresses=157.60.0.1,172.16.0.0/16,LocalSubnet profile=ALL?? ?????? ??????? ???????:

netsh advfirewall firewall add rule name="My Application" dir=in action=allow program="C:\MyApp\MyApp.exe" enable=yes remoteip=157.60.0.1,172.16.0.0/16,LocalSubnet profile=domain

netsh advfirewall firewall add rule name="My Application" dir=in action=allow program="C:\MyApp\MyApp.exe" enable=yes remoteip=157.60.0.1,172.16.0.0/16,LocalSubnet profile=private
?????? ??? ???? ?? ????????? ??? ????? ????? ????? ???? ???????? ?? ?????? ????? ??????:
netsh advfirewall firewall add rule ?

?????? ??????: ????? ???? ??

?? ??? ??????????? ??? ??????
??? ??????? ????
netsh firewall add portopening TCP 80 "Open Port 80"netsh advfirewall firewall add rule name="Open Port 80" dir=in action=allow protocol=TCP localport=80
?????? ??? ???? ?? ????????? ??? ????? ????? ????? ???? ???????? ?? ?????? ????? ??????:
netsh advfirewall firewall add rule ?

?????? ??????: ??? ????? ?? ????? ???????

?? ??? ??????????? ??? ??????
??? ??????? ????
netsh firewall delete allowedprogram C:\MyApp\MyApp.exenetsh advfirewall firewall delete rule name=rule name program="C:\MyApp\MyApp.exe"
delete portopening protocol=UDP port=500netsh advfirewall firewall delete rule name=rule name protocol=udp localport=500
?????? ??? ???? ?? ????????? ??? ????? ??? ????? ???? ???????? ?? ?????? ????? ??????:
netsh advfirewall firewall delete rule ?

?????? ??????: ????? ??????? ICMP

?? ??? ??????????? ??? ??????
??? ??????? ????
netsh firewall set icmpsetting 8netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
netsh firewall set icmpsetting type=ALL mode=enablenetsh advfirewall firewall add rule name="All ICMP V4" protocol=icmpv4:any,any dir=in action=allow
netsh firewall set icmpsetting 13 disable allnetsh advfirewall firewall add rule name="Block Type 13 ICMP V4" protocol=icmpv4:13,any dir=in action=block
?????? ??? ???? ?? ????????? ??? ????? ????? ??????? ICMP? ?? ?????? ????? ??????:
netsh advfirewall firewall add rule ?

?????? ??????: ????? ???????

?? ??? ??????????? ??? ??????
??? ??????? ????
netsh firewall set logging %systemroot%\system32\LogFiles\Firewall\pfirewall.log 4096 ENABLE ENABLE?? ?????? ??????? ???????:

netsh advfirewall set currentprofile logging filename %systemroot%\system32\LogFiles\Firewall\pfirewall.log

netsh advfirewall set currentprofile logging maxfilesize 4096
netsh advfirewall set currentprofile logging droppedconnections enable

netsh advfirewall set currentprofile logging allowedconnections enable
?????? ??? ???? ?? ?????????? ?? ?????? ????? ??????:
netsh advfirewall set currentprofile ?
??? ???? ????? ??????? ???? ????? ????? ?????? ???? ???????? ??????? ????? ?? ?????? "currentprofile":
  • Domainprofile
  • Privateprofile
  • Publicprofile

?????? ??????: ????? ???? ????? Windows

?? ??? ??????????? ??? ??????
??? ??????? ????
netsh firewall set opmode ENABLEnetsh advfirewall set currentprofile state on
netsh firewall set opmode mode=ENABLE exceptions=enable?? ?????? ??????? ???????:

Netsh advfirewall set currentprofile state on

netsh advfirewall set currentprofile firewallpolicy blockinboundalways,allowoutbound
netsh firewall set opmode mode=enable exceptions=disable profile=domain?? ?????? ??????? ???????:

Netsh advfirewall set domainprofile state on

netsh advfirewall set domainprofile firewallpolicy blockinbound,allowoutbound
netsh firewall set opmode mode=enable profile=ALL?? ?????? ??????? ???????:

netsh advfirewall set domainprofile state on

netsh advfirewall set privateprofile state on
?????? ??? ???? ?? ?????????? ?? ?????? ????? ??????:
netsh advfirewall set currentprofile ?
??? ???? ????? ???? ???? ??????? ???? ????? ????? ?????? ???? ???????? ??????? ????? ?? ?????? "currentprofile":
  • Domainprofile
  • Privateprofile
  • Publicprofile

?????? ??????: ??????? ????????? ?????

?? ??? ??????????? ??? ??????
??? ??????? ????
netsh firewall resetnetsh advfirewall reset
?????? ??? ???? ?? ?????????? ?? ?????? ????? ??????:
netsh advfirewall reset ?

?????? ??????: ????? ????? ?????

?? ??? ??????????? ??? ??????
??? ??????? ????
netsh firewall set service FileAndPrintnetsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes
netsh firewall set service RemoteDesktop enablenetsh advfirewall firewall set rule group="remote desktop" new enable=Yes
netsh firewall set service RemoteDesktop enable profile=ALL?? ?????? ??????? ???????:

netsh advfirewall firewall set rule group="remote desktop" new enable=Yes profile=domain

netsh advfirewall firewall set rule group="remote desktop" new enable=Yes profile=private

???????

???? ???????: 947709 - ????? ??? ??????: 26/????/1435 - ??????: 4.0
????? ???
  • Windows Server 2008 Enterprise
  • Windows Server 2008 Datacenter
  • Windows Server 2008 Standard
  • Windows Server 2008 for Itanium-Based Systems
  • Windows Web Server 2008
  • Windows Vista Ultimate
  • Windows Vista Ultimate 64-bit edition
  • Windows Vista Enterprise
  • Windows Vista Enterprise 64-bit edition
  • Windows Vista Business
  • Windows Vista Business 64-bit edition
  • Windows Vista Home Premium
  • Windows Vista Home Premium 64-bit edition
  • Windows Vista Home Basic
  • Windows Vista Home Basic 64-bit edition
  • Windows 7 Enterprise
  • Windows 7 Home Basic
  • Windows 7 Professional
  • Windows 7 Starter
  • Windows 7 Ultimate
  • Windows 7 Home Premium
  • Windows Server 2008 R2 Datacenter
  • Windows Server 2008 R2 Enterprise
  • Windows Server 2008 R2 Standard
????? ??????: 
kbPubTypeKC kbinfo kbhowto KB947709

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com