Версия сквида: squid 2.7 stable9
Опции сборки:
Код: Выделить всё
_OPTIONS_READ=squid-2.7.9_1
WITH_SQUID_KERB_AUTH=true
WITH_SQUID_LDAP_AUTH=true
WITH_SQUID_NIS_AUTH=true
WITH_SQUID_SASL_AUTH=true
WITH_SQUID_DELAY_POOLS=true
WITH_SQUID_SNMP=true
WITH_SQUID_CARP=true
WITH_SQUID_SSL=true
WITH_SQUID_PINGER=true
WITH_SQUID_DNS_HELPER=true
WITH_SQUID_HTCP=true
WITH_SQUID_VIA_DB=true
WITH_SQUID_CACHE_DIGESTS=true
WITH_SQUID_WCCP=true
WITH_SQUID_WCCPV2=true
WITH_SQUID_STRICT_HTTP=true
WITH_SQUID_IDENT=true
WITH_SQUID_REFERER_LOG=true
WITH_SQUID_USERAGENT_LOG=true
WITH_SQUID_ARP_ACL=true
WITH_SQUID_PF=true
WITH_SQUID_IPFILTER=true
WITH_SQUID_FOLLOW_XFF=true
WITH_SQUID_AUFS=true
WITH_SQUID_COSS=true
WITH_SQUID_KQUEUE=true
WITH_SQUID_LARGEFILE=true
WITH_SQUID_STACKTRACES=trueКонфиг сквида:
Код: Выделить всё
# squid conf
visible_hostname proxy.uni-altai.ru
http_port 3128
#not working
#https_port 3128 key=/usr/local/etc/squid/ssl/key.pm cert=/usr/local/etc/squid/ssl/certificate.pm
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
dns_nameservers 10.250.4.1 10.250.4.2 8.8.8.8
no_cache deny QUERY
cache_mem 1024 MB
cache_dir ufs /shares/squid/cache 5000 64 512
access_log /var/squid/logs/access.log squid
cache_store_log none
hosts_file /etc/hosts
append_domain .general.uni-altai.ru
error_directory /usr/local/etc/squid/errors/Russian-1251
auth_param ntlm program /usr/local/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp
auth_param ntlm children 25
auth_param basic program /usr/local/bin/ntlm_auth --helper-protocol=squid-2.5-basic
auth_param basic children 3
#auth_param basic realm Squid proxy-caching web server
auth_param basic realm User:anonymous Password:none
auth_param basic credentialsttl 2 hours
external_acl_type nt_group %LOGIN /usr/local/libexec/squid/wbinfo_group.pl
acl stud external nt_group stud_proxy
acl user external nt_group user_proxy
acl unlim external nt_group unlim_proxy
acl test external nt_group test_proxy
# access ports
acl safe_ports port "/usr/local/etc/squid/db/port.txt"
acl port_ssl port 443
acl manager proto cache_object
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
acl allow_sites dstdomain "/usr/local/etc/squid/db/allow_all.txt"
acl extremizm url_regex "/usr/local/etc/squid/db/extremizm.txt"
acl deny_stud dstdomain "/usr/local/etc/squid/db/deny_stud.txt"
acl banner url_regex "/usr/local/etc/squid/db/banner.txt"
acl allow_test dstdomain "/usr/local/etc/squid/db/test.txt"
acl not_autorized src "/usr/local/etc/squid/db/not_autorized.txt"
acl CONNECT method CONNECT
#acl local-servers dstdom_regex microsoft\.com
#always_direct allow local-servers
#no_cache deny local-servers
#acl SSL method CONNECT
#always_direct allow SSL
deny_info ERR_EXTREMIZM extremizm
deny_info ERR_STUD deny_stud
deny_info ERR_TEST allow_test
http_access allow manager localhost
http_access deny manager
http_access allow CONNECT
#http_access deny CONNECT port_ssl
#http_access deny port_ssl
http_access allow allow_sites
#http_access deny test !allow_test
http_access deny test
http_access deny extremizm
http_access allow unlim
http_access deny !safe_ports
http_access deny banner
http_access allow user
http_access deny deny_stud
http_access allow stud
http_access deny all
delay_pools 3
delay_class 1 2
delay_parameters 1 1000000/1000000 400000/400000
delay_access 1 allow stud
delay_access 1 deny all
delay_class 2 2
delay_parameters 2 3000000/3000000 1000000/1000000
delay_access 2 allow user
delay_access 2 deny all
delay_class 3 1
delay_parameters 3 -1/-1
delay_access 3 allow unlim
delay_access 3 allow test
delay_access 3 deny allфайл с портами (acl safe_ports):
Код: Выделить всё
407 # HZ. Require www.alean.ru
#443 # https
563 # snews
873 # rsync
80 # http
21 # ftp
#443 # https
70 # gopher
210 # wais
1025-65535 # unregistered ports
280 # http-mgmt
488 # gss-http
591 # filemaker
777 # multiling http
631 # cups
873 # rsync
901 # SWAT
1001 # AST test
8080 # SWAT
1935 # webcam
5222 # webcamКак вы поняли из конфига:
Запрашиваются логин и пароль которые потом проферяются в AD на контроллере домена. После этого применяются ACL в зависимости от того к какой группе пользователей принадлежит юзер. Все работает хорошо.
НО! Если открыть браузер, отказаться от авторизации (в браузере пытается грузиться стартовая страничка) и ввести например не http://vk.com, а httpS://vk.com, то прокся без всяких там окошек с запросом логина пароля пускает нас в просторы соц сети. То де самое касается любых стайтов использующих https. Например какие нибудь web-морды банков и платежных систем.
И в access.log обращения по https не логируются!!! Как будто бы все идет мимо! ))) Но NAT'a нет! Другой прокси нет... ничего нет. Это так данная прокся "страдает".
Нужно чтобы был запрос (в идеале). На данный момент я даже закрыть https не могу.
Я убрал его из файла ports.txt (закомментил).
Там по правилу http_access deny !safe_ports должно по идее лочить все что не указано в файле.
Ан нет! Пускает!...
Пытался явно блокировать. Писал отдельную ACL для 443 порта. Писал deny.
Тщетно.
У кого нибудь есть какие либо мысли по этому поводу?