### Configuracoes ####
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 81 # http
acl Safe_ports port 88 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 809 # SPTRANS
acl Safe_ports port 631 # Cups
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_port 3128
#### DNS Google ####
dns_nameservers 8.8.8.8
dns_nameservers 8.8.8.4
### Configuracoes de cache e memória ####
cache_dir AUFS /var/spool/squid3 8000 64 256
cache_mem 512 MB
cache_swap_low 90
cache_swap_high 95
memory_pools on
memory_pools_limit 64 MB
log_fqdn on
maximum_object_size_in_memory 64 KB
maximum_object_size 600 MB
minimum_object_size 2 KB
quick_abort_min -1
cache_replacement_policy heap GDSF
#memory_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
half_closed_clients off
hierarchy_stoplist cgi-bin ?
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
################################
error_directory /usr/share/squid3/errors/pt-br
coredump_dir /var/spool/squid3
cache_mgr alguem@algo.com.br
access_log /var/log/squid3/access.log squid
##### Cache do Windows Update #####
refresh_pattern msgruser.dlservice.microsoft.com/.*\.(cab|exe|msi|dll|psf) 10080 100% 43200 reload-into-ims
refresh_pattern update.microsoft.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
refresh_pattern windowsupdate.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
refresh_pattern download.microsoft.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
refresh_pattern
www.microsoft.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
refresh_pattern au.download.windowsupdate.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
Regras
#autenticação no WIndows 2003
auth_param ntlm program /usr/bin/ntlm ....
acl rede_local src 192.168.1.0/24
acl liberados url_regex -i "/etc/squid3/acls/sites_liberados"
#obter grupos do AD
acl acesso_completo external grupo_AD Internet_Acesso_Completo
acl acesso_bloqueado external grupo_AD Internet_Acesso_Bloqueado
http_access allow acesso_completo
http_access deny acesso_bloqueado !Liberados
http_access allow rede_local
http_access deny all