Alvares писал(а):Ну тады давай с нуля

Конфиг в студию.
Ну раз с нуля тогда вот конфиг сквида:
Код: Выделить всё
auth_param ntlm program /usr/local/bin/ntlm_auth --require-membership-of=S-1-5-21-163083392-1867935466-2816259149-1116 --helper-protocol=squid-2.5-ntlmssp --domain=MMM
auth_param ntlm children 30
auth_param ntlm keep_alive on
auth_param basic program /usr/local/bin/ntlm_auth --require-membership-of=S-1-5-21-163083392-1867935466-2816259149-1116 --helper-protocol=squid-2.5-basic --domain=MMM
auth_param basic children 30
auth_param basic realm Proxy server
auth_param basic credentialsttl 2 minutes
auth_param basic casesensitive on
authenticate_ip_ttl 0
authenticate_ttl 5 minutes
external_acl_type win_group %LOGIN /usr/local/libexec/squid/ext_wbinfo_group_acl
acl windowsupdate dstdomain -i "/usr/local/etc/squid/lan_conf/windowsupdate"
acl allow_domain_none_auth dstdomain -i "/usr/local/etc/squid/lan_conf/domain_none_auth"
acl none_auth_host src "/usr/local/etc/squid/lan_conf/host_none_auth"
acl localdomain dstdomain -i .mmm.local
acl no_avir urlpath_regex -i \.avi$ \.jpg$ \.gif$ \.mp3$ \.mpg4$
acl inet_all external win_group proxy_access_full
acl inet_small external win_group proxy_speed_small
acl inet_normal external win_group proxy_speed_normal
acl inet_fast external win_group proxy_speed_fast
acl inet_unlim external win_group proxy_speed_unlim
# acl manager proto cache_object
# acl localhost src 127.0.0.1/32 192.168.20.250/32
# acl localhost src 192.168.10.250/32
# acl to_localhost dst 127.0.0.0/8
acl localnet src 192.168.20.0/24 192.168.21.0/24
acl SSL_ports port 443
acl Safe_ports port 21 20 80 443 8080 8180
# acl Safe_ports port 70
# acl Safe_ports port 210
# acl Safe_ports port 280
# acl Safe_ports port 488
# acl Safe_ports port 591
# acl Safe_ports port 777
# acl Safe_ports port 1025-65535
acl FTP_ports port 21 20
acl CONNECT method CONNECT
acl squidusers proxy_auth REQUIRED
ftp_user anonymous@
# ftp_list_width 50
ftp_passive on
# ftp_epsv_all off
# ftp_epsv on
ftp_sanitycheck on
ftp_telnet_protocol off
no_cache deny windowsupdate
no_cache deny localdomain
no_cache deny FTP_ports
# http_access allow all
http_access allow manager localhost
http_access allow localhost
http_access allow manager
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
icp_access allow localnet squidusers inet_all
icp_access deny all
http_access allow localnet allow_domain_none_auth
http_access deny allow_domain_none_auth
http_access allow none_auth_host windowsupdate
http_access deny none_auth_host windowsupdate
http_access allow localdomain
http_access deny localdomain
http_access allow localnet squidusers inet_all inet_small
http_access deny localnet squidusers inet_all inet_small
http_access allow localnet squidusers inet_all inet_normal
http_access deny localnet squidusers inet_all inet_normal
http_access allow localnet squidusers inet_all inet_fast
http_access deny localnet squidusers inet_all inet_fast
http_access allow localnet squidusers inet_all inet_unlim
http_access deny all
http_port 192.168.20.250:3128
hierarchy_stoplist cgi-bin ?
cache_mem 128 MB
maximum_object_size_in_memory 10 KB
cache_dir ufs /usr/local/squid/cache 5012 64 256
minimum_object_size 600 KB
maximum_object_size 1240 KB
buffered_logs on
cache_swap_low 92
cache_swap_high 96
## cache_peer 127.0.0.1 parent 3127 0 default no-query
# cache_peer 127.0.0.1 parent 3127 0 default no-query no-digest no-netdb-exchange default
# always_direct allow SSL_ports
# always_direct allow FTP_ports
# always_direct allow no_avir
# never_direct allow all
logformat squid %ts.%03tu %6tr %dt %>a %>A %>p %<A %Ss %>Hs %<st %>st %st %ru %un %mt %rv %rm
logfile_rotate 3
access_log /usr/local/squid/logs/access.log squid
cache_log /usr/local/squid/logs/cache.log
cache_store_log /usr/local/squid/logs/store.log
coredump_dir /usr/local/squid/logs
pid_filename /var/run/squid/squid.pid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern . 0 80% 10080
cache_effective_user squid
cache_effective_group squid
# cachemgr_passwd pass123
visible_hostname ProxyServer
email_err_data on
cache_mgr root@mkh.pp.ua
httpd_suppress_version_string on
# nonhierarchical_direct on
delay_pool_uses_indirect_client On
delay_pools 5
delay_class 1 4
delay_access 1 allow squidusers inet_small
delay_access 1 deny all
delay_class 2 4
delay_access 2 allow squidusers inet_normal
delay_access 2 deny all
delay_class 3 4
delay_access 3 allow squidusers inet_fast
delay_access 3 deny all
delay_class 4 4
delay_access 4 allow squidusers inet_unlim
delay_access 4 deny all
delay_class 5 4
delay_access 5 allow windowsupdate none_auth_host
delay_access 5 deny all
# 40Mbit/sec -> ((40*1024)/8)*1000=5120000
# Small sped for user 1Bbit/sec
delay_parameters 1 -1/-1 -1/-1 -1/-1 128000/600000
# Normal speed for User 10Mbit/sec
delay_parameters 2 -1/-1 -1/-1 -1/-1 1280000/600000
# Fast speed for Users 40Mbit/sec
delay_parameters 3 -1/-1 -1/-1 -1/-1 5120000/600000
# Unlim speed for Users
delay_parameters 4 -1/-1 -1/-1 -1/-1 10240000/600000
# For Wsus
delay_parameters 5 -1/-1 -1/-1 -1/-1 10240000/600000
delay_initial_bucket_level 50
forwarded_for off
# check_hostnames on
dns_nameservers 192.168.20.250
hosts_file /etc/hosts
positive_dns_ttl 1 hours
negative_dns_ttl 5 minutes
icon_directory /usr/local/etc/squid/icons/
error_directory /usr/local/etc/squid/errors/ru-ru/
Внимание !!!
Не работает только из portupgrade из консоли из локалки все работает.
Сам сервер тоже пускаю обновляться через Squid, на сервере несколько jail - тоже через squid. Почему - мне так удобнее резать скорость.
Можно конечно и ipfw подкрутить, но хочется именно так.
Если пускаю portupgrade через прокси без авторизации - все работает.
Если с авторизацией и это portupgrade в лог попадает логин пользователя но squid футболит обращение и не пускает.
Squid33 последний из портов, downgrade не пробовал ибо пока не понятно почему так происходит именно с portupgrade.
Ну и спасибо забудущие советы...