Network2013. 8. 30. 09:31


net advfirewall firewall 사용 방법


http://social.technet.microsoft.com/Forums/ko-KR/58a02324-fb88-4c33-a678-460827c7ae5e/net-advfirewall-firewall-
http://support.microsoft.com/kb/947709/en-us

Vista이상의 상위 버전 윈도우에서는 netsh firewall 대신에 netsh advfirewall firewall 명령어를 사용을 추천 합니다.

대답

 

1.     프로그램 허용

 

a.     netsh advfirewall firewall add rule name=”My Application” dir=in action=allow program=”C:\MyApp\MyApp.exe” enable=yes

 

b.     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

 

2.     포트 허용

 

a.     netsh advfirewall firewall add rule name=”Open Port 80” dir=in action=allow protocol=TCP localport=80

 

3.     허용된 프로그램과 포트 룰 제거 하기

 

a.     netsh advfirewall firewall delete rule name=”rulename” program=”C:\MyApp\MyApp.exe”

 

b.     netsh advfirewall firewall delete rule name=”rulename” protocol=udp localport=500

 

4.     ICMP 설정 하기

 

a.     netsh advfirewall  firewall add rule name=”ICMP Allow incoming V4 echo request” protocol=icmpv4:8,any dir=in action=allow

 

b.     netsh advfirewall firewall add rule name=”All  ICMP V4” protocol=icmpv4:any,any dir=in action=allow

 

 

5.     로깅 설정

 

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

 

b.     netsh advfirewall set currentprofile logging maxfilesize 4096

 

c.     netsh advfirewall set currentprofile logging droppedconnections enable

 

d.     netsh advfirewall set currentprofile logging allowedconnections enable

 

 

 

6.     방화벽 On/Off

 

a.     netsh advfirewall set currentprofile state on

 

b.     netsh advfirewall set currentprofile state on
netsh advfirewall set currentprofile firewallpolicy blockinboundalways,allowoutbound

 

c.     netsh advfirewall set domainprofile state on
netsh advfirewall set domainprofile firewallpolicy blockinbound,allowoutbound

 

d.     netsh advfirewall set domainprofile state on
netsh advfirewall set private profile state on

 

 

7.     방화벽 설정 초기화

 

a.     Netsh advfirewall reset

 

 

8.     특정 서비스 허용

 

a.     netsh  advfirewall firewall set rule group=”File and Printer Sharing” new enable=yes

 

b.     netsh  advfirewall firewall set rule group=”remote desktop” new enable=yes

 

c.     netsh  advfirewall firewall set rule group=”remote desktop” new enable=yes profile=domain

 

d.     netsh advfirewall firewall set rule group=”remote desktop” new enable=yes profile=private



적용 대상

 

Windows Vista

Windows 7

Windows 2008

Windows 2008 R2

2011년 8월 10일 수요일 오전 2:05
Posted by Julyus