질문
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
'Windows' 카테고리의 다른 글
Windows에서 디스크 용량 보기 명령어 (0) | 2013.01.09 |
---|---|
windows server 2008 제품군별 기능 차이 (0) | 2013.01.02 |
Windows Server 2008 Active directory 설치 실패 (0) | 2012.06.01 |
Windows 2008 R2 서버 이벤트로그 메일 보내기 (0) | 2012.05.08 |
windows NTP 시간 동기화 (0) | 2012.05.03 |