TioRoni
(usa Debian)
Enviado em 15/04/2013 - 13:31h
Segue meu squid.conf.
#################################################################################
http_port 192.168.1.4:3128
#always_direct allow all
visible_hostname
www.grupomastermt.com.br
# Tamanho da cache para obejtos
cache_mem 512 MB
# tamanho maximo dos objetos guardados na cache
maximum_object_size_in_memory 4 MB
# Tamanho maximo dos objetos que serao salvos em disco
maximum_object_size 102400 kb
# Tamanho minimo dos objetos que serao salvos em disco
minimum_object_size 0 kb
# Percentagem de cache baixa
cache_swap_low 80
# Percentagem de cache alta
cache_swap_high 85
# manter memoria alocada e nao usada, para nao precisar realocar quando for usar
memory_pools on
# Como tratar o X-Forwared-For no cabecalho HTTP
forwarded_for off
#logar parametros das URL's
strip_query_terms on
# Forca 5.5 ou anteior a buscar novas paginas do servidor em caso de refresh
ie_refresh on
#Detecta respostas quebradas de conexoes persistnes e assuma que o reply foi enviado apos 10 segundos
detect_broken_pconn on
# comportamento para espaco branco nas URLs
uri_whitespace allow
half_closed_clients off
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
cache_dir aufs /var/spool/squid3/squid_1 1024 16 256
cache_dir aufs /var/spool/squid3/squid_2 1024 16 256
cache_dir aufs /var/spool/squid3/squid_3 1024 16 256
cache_dir aufs /var/spool/squid3/squid_4 1024 16 256
cache_dir aufs /var/spool/squid3/squid_5 1024 16 256
####Provoca um ganho de performance ao usar conexoes pipeline (Requicoes em paralelo)
pipeline_prefetch on
#################################### Autenticao ########################################
auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/squid_passwd
auth_param basic children 20
auth_param basic realm Usuario e Senha - GRUPO MASTER
auth_param basic credentialsttl 6 hours
auth_param basic casesensitive off
########################### Controles de Acesso (ACL) ##################################
acl usuarios proxy_auth REQUIRED
acl all src
acl localhost src 127.0.0.1/32
acl redelocal src 192.168.1.0/32
acl SSL_ports port 443 563 1863
acl Safe_ports port 80 21 22 443 563 280 488 591 777 1025-65535
acl CONNECT method CONNECT
########################### Meus Controles de Acesso ###################################
acl sitesbloqueados dstdom_regex -i "/etc/squid3/sitesbloqueados"
acl palavrasbloqueadas url_regex -i "/etc/squid3/palavrasbloqueadas"
acl palavrasliberadas url_regex -i "/etc/squid3/palavrasliberadas"
acl sitesliberados dstdom_regex -i "/etc/squid3/sitesliberados"
acl radiosonline urlpath_regex -i "/etc/squid3/radiosonline"
acl streaming rep_mime_type ^video/x-ms-asf
acl chefes src 192.168.1.253 192.168.1.95
################################## HTTP_ACCESS ########################################
http_access allow chefes
http_access allow palavrasliberadas
http_access allow sitesliberados
http_access deny sitesbloqueados
http_access deny palavrasbloqueadas
http_access deny radiosonline
http_reply_access deny radiosonline
http_access deny streaming
http_reply_access deny streaming
http_access allow usuarios
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
############################## Configuracoes Gerais ##################################
dns_nameservers 200.255.255.73 8.8.8.8 8.8.4.4
error_directory /usr/share/squid3/errors/pt-br
access_log /var/log/squid3/access.log squid
cache_mgr roni@grupomastermt.com.br
debug_options ALL,9 33,2 28,9