canhotojam
(usa CentOS)
Enviado em 08/05/2013 - 10:20h
Bom galera, sei que demorei a responder o tópico, mas consegui resolver o problema. Abaixo, o squid.conf que está rodando aqui:
===================================================================================================
http_port 3128
cache_mem 1024 MB
cache_swap_low 90
cache_swap_high 95
cache_dir aufs /var/spool/squid 30000 32 256
dns_nameservers 8.8.8.8 4.2.2.2
icp_port 0
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
#Memória
maximum_object_size 80000 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 100000 KB
#Log's
log_icp_queries off
log_fqdn off
buffered_logs on
emulate_httpd_log on
client_db off
strip_query_terms off
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
mime_table /etc/squid/mime.conf
#debug_options 28,3
#Atualização dos objetos
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
# Autenticação no AD
auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp --domain=DOMINIO
auth_param ntlm children 30
auth_param ntlm keep_alive on
auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic --domain=DOMINIO
auth_param basic children 5
auth_param basic realm Acesso controlado
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
acl ntlm-auth proxy_auth REQUIRED
external_acl_type testRecepcao %LOGIN /usr/lib64/squid/squid_ldap_group -R -b "dc=dominio,dc=com" -D "CN=usuario,OU=ti,DC=dominio,DC=com" -w "123456" -f "(&(objectclass=person)(sAMAccountName=%v)(memberof=cn=%a,OU=recepcao,DC=dominio,DC=com))" -h 192.168.X.X
external_acl_type testFaturamento %LOGIN /usr/lib64/squid/squid_ldap_group -R -b "dc=dominio,dc=com" -D "CN=usuario,OU=ti,DC=dominio,DC=com" -w "123456" -f "(&(objectclass=person)(sAMAccountName=%v)(memberof=cn=%a,OU=faturamento,DC=dominio,DC=com))" -h 192.168.X.X
#ACL dos grupos do AD
acl recep external testRecepcao recepcao
acl fat external testFaturamento faturamento
#ACL's Recomendadas
acl SSL_ports port 443 563
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443 563 1863
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl CONNECT method CONNECT
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
#Bloqueio de extensões
acl download url_regex -i .*\.avi$
acl download url_regex -i .*\.mpg$
acl download url_regex -i .*\.mpeg$
acl download url_regex -i .*\.asx$
acl download url_regex -i .*\.ppt$
acl download url_regex -i .*\.pps$
acl download url_regex -i .*\.mov$
acl download url_regex -i .*\.mp3$
acl download url_regex -i .*\.zip$
acl download url_regex -i .*\.rar$
acl download url_regex -i .*\.asf$
acl download url_regex -i .*\.wmv$
acl download url_regex -i .*\.rm$
acl download url_regex -i .*\.mid$
#Acesso Localhost
acl manager proto cache_object
acl localhost src 127.0.0.1/32
http_access allow manager localhost
http_access deny manager
http_access allow localhost
#ACL para Proibir/Liberar
acl negado url_regex -i "/etc/squid/restrito"
acl convenios url_regex -i "/etc/squid/convenios"
acl faturamento url_regex -i "/etc/squid/faturamento"
acl rede src 192.168.0.0/24
#Endereços Bloqueados
http_access deny negado
http_access deny download
#Validando autenticação
http_access deny ntlm-auth !recep !fat
#Liberados com Restrição (Primeira Camada)
http_access allow fat
#Restringindo (Segunda Camada)
http_access deny recep !convenios
http_access allow rede
http_access deny all
httpd_suppress_version_string on
visible_hostname SQUID
cache_mgr ti@dominio.com
error_directory /usr/share/squid/errors/pt-br
============================================================================================================
Incluindo esses parâmetros na conf do squid, resolveu a questão de autenticação no AD, e as regras começou a funcionar:
# Autenticação no AD
auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp --domain=DOMINIO
auth_param ntlm children 30
auth_param ntlm keep_alive on
auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic --domain=DOMINIO
auth_param basic children 5
auth_param basic realm Acesso controlado
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
acl ntlm-auth proxy_auth REQUIRED
Bom, fica a dica, aqui está ok!
Valew Galera!!!