Я создал следующий скрипт, чтобы заблокировать абсолютно все и разрешить только то, что я хочу, однако он не пропускает то, что мне нравится в отношении Интернета. Может ли кто-нибудь увидеть проблему с моими правилами? В настоящее время они довольно общие.
@ECHO OFF
ECHO ========================================= Brendan Thompson - Firewall Policy - v1.0 =========================================
ECHO ----------------------------------------- Removing All Firewall Rules -----------------------------------------
ECHO Deleting all Incoming Firewall Rules
netsh advfirewall firewall delete rule name=all dir=in profile=any
ECHO Deleting all Outgoing Firewall Rules
netsh advfirewall firewall delete rule name=all dir=out profile=any
ECHO Delete all Remaining Firewall Rules
netsh advfirewall firewall delete rule name=all
ECHO ----------------------------------------- Initial Profile Setup -----------------------------------------
ECHO Block all Incoming and Outgoing Traffic on Domain Profile
netsh advfirewall set domainprofile firewallpolicy blockinbound,blockoutbound
ECHO Block all Incoming and Outgoing Traffic on Private Profile
netsh advfirewall set privateprofile firewallpolicy blockinbound,blockoutbound
ECHO Block all Incoming and Outgoing Traffic on Public Profile
netsh advfirewall set publicprofile firewallpolicy blockinbound,blockoutbound
ECHO ----------------------------------------- Domain and Private Profile - Incoming Application Exceptions -----------------------------------------
netsh advfirewall firewall add rule name="APP - BROWSER - Internet Explorer" dir=in action=allow profile=domain,private program="C:\Program Files\Internet Explorer\iexplore.exe"
ECHO ----------------------------------------- Domain and Private Profile - Outgoing Application Exceptions -----------------------------------------
netsh advfirewall firewall add rule name="APP - BROWSER - Internet Explorer" dir=out action=allow profile=domain,private program="C:\Program Files\Internet Explorer\iexplore.exe"
ECHO ----------------------------------------- Domain and Private Profile - Incoming Port Exceptions -----------------------------------------
netsh advfirewall firewall add rule name="PORT - GENERAL - HTTP (80) - TCP" dir=in action=allow protocol=TCP localport=80
netsh advfirewall firewall add rule name="PORT - GENERAL - HTTP (80) - UDP" dir=in action=allow protocol=UDP localport=80
ECHO ----------------------------------------- Domain and Private Profile - Outgoing Port Exceptions -----------------------------------------
netsh advfirewall firewall add rule name="PORT - GENERAL - HTTP (80) - TCP" dir=out action=allow protocol=TCP localport=80
netsh advfirewall firewall add rule name="PORT - GENERAL - HTTP (80) - UDP" dir=out action=allow protocol=UDP localport=80
Есть идеи, что происходит не так, из-за чего я не могу просматривать веб-страницы? : S
- Брендан
Вам необходимо разрешить исходящий DNS-трафик (dst udp / 53). Я бы посоветовал включить ведение журнала брандмауэра Windows для всех профилей и просмотреть журнал «c: \ windows \ system32 \ logfiles \ pfirewall.log», чтобы увидеть, что блокируется.
Для исходящих правил IE также необходимо переключение "localport" на "remoteport".
Ваши правила неверны. Для Incoming Port Exceptions
, вы должны разрешить трафик из порта 80 к Высокий порт (1024 - 65535).
И для Outgoing Port Exceptions
, вы должны разрешить трафик из Высокий порт (1024 - 65535) портировать 80
Ваш трафик выглядит так
- Begin: You send HTTP request
YourPC(High port) ----> (80)Webserver
- Then : Webserver send HTTP respone
YourPC(High port) <---- (80)Webserver
Ваши правила не разрешают этот трафик, они разрешают трафик только на порт 80 вашей машины.