danilo.mattos
(usa Debian)
Enviado em 26/06/2014 - 09:48h
Bom dia Senhores !
Pessoal gostaria que vocês olhassem meu squid.conf e me dissessem se ele está bem configurado ou com
alguns erros de regras ou algo do tipo. Me disseram que meu squid.conf tem muita encheção de linguiça
configuração desnecessária. Seria muito bom se o vivaolinux me desse alguma orientação ou alguma dica
para melhoria ou correção do meu arquivo.
Squid.conf
# PORTAS QUE SERÃO UTILIZADAS PELOS USUARIOS DO SERVIDOR PROXY
http_port 1082
# CONFIGURACOES DO CACHE DO SERVIDOR PROXY SQUID
cache_mem 1 GB
cache_swap_low 80
cache_swap_high 100
maximum_object_size 512 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 8 KB
fqdncache_size 1024
cache_dir ufs /var/spool/squid 4096 16 256
# CONFIGURACOES DE CACHE E ACL RECOMENDADAS PELO SQUID
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
# CONFIGURACOES DE LOG DO PROXY SQUID
logformat combined %>a %ui %un [%tg] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
access_log /var/log/squid/access.log combined
cache_log /var/log/squid/cache.log
cache_store_log none
# CONFIGURACAO DE AUTENTICACAO COM AD 2008 R2
auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic
auth_param basic children 5
auth_param basic realm Digite seu login e senha da rede
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
################
# INICIO ACL's #
################
# ACL DE SOLICITACAO DE AUTENTICACAO
acl password proxy_auth REQUIRED
# ACL's NETWORKING LIBERADAS
acl all src 192.168.1.0/24 192.168.3.0/24
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
#################
# ACL DE PORTAS #
#################
acl SSL_ports port 20 21 80 81 82 83 84 85 100 115 443 444 4428 7090 8080 8443 8888 9730 444 5910 7004 8086 9339 800 8000 3456 3007 2096 91 2083 17531 # Portas ssl liberadas no squid
acl Safe_ports port 20 21 80 81 82 83 84 85 100 115 443 444 4428 7090 8080 8443 8888 9730 444 5910 7004 8086 9339 800 8000 3456 3007 2096 91 2083 17531 # Portas liberadas no squid
######################
# ACL'S PADRÃO SQUID #
######################
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 deny to_localhost
##################################################
# INICIO ACLS PERSONALIZADAS GOIAS ESPORTE CLUBE #
##################################################
# ACLS DE EXCECOES
acl excecoes url_regex -i "/etc/squid/excecoes.txt"
http_access allow excecoes
# BLOQUEIO DE ARQUIVOS COM EXTENSOES PERIGOSAS
acl extensoes urlpath_regex -i "/etc/squid/extensoes2.txt"
http_access deny extensoes
# ACL IP LIBERADOS
acl ips_liberados src "/etc/squid/ips_liberados.txt"
http_access allow ips_liberados
# ACL USUARIOS LIBERADOS TOTAL
acl usuarios_liberados proxy_auth "/etc/squid/usuarios_liberados.txt"
http_access allow usuarios_liberados
# BLOQUEIO DE STREAMMING VIA MIME
acl usuarios_streamming proxy_auth "/etc/squid/usuarios_streamming.txt"
acl mimes_proibidos_req req_mime_type "/etc/squid/mime_proibidos.txt"
acl mimes_proibidos_rep rep_mime_type "/etc/squid/mime_proibidos.txt"
http_reply_access deny mimes_proibidos_rep !usuarios_streamming !excecoes !usuarios_liberados !ips_liberados
http_reply_access deny mimes_proibidos_req !usuarios_streamming !excecoes !usuarios_liberados !ips_liberados
acl Proibir-mime rep_mime_type -i ^(.*)video(.*)$ ^(.*)audio(.*)$
http_reply_access deny Proibir-mime !usuarios_streamming !excecoes !usuarios_liberados !ips_liberados
####################
# ACLS DE BLOQUEIO #
####################
# LIBERA GTALK PARA ALGUNS USUARIOS
acl chatgmail url_regex -i "/etc/squid/chatgmail.txt"
acl usuarios_gtalk proxy_auth neuza.paula bras.pereira
http_access allow chatgmail usuarios_gtalk
# ACL DE SITES BLOQUEADOS
acl sites_bloqueados url_regex -i "/etc/squid/sites-bloqueados.txt"
http_access deny sites_bloqueados
# NEGANDO TUDO
http_access allow localhost
http_access allow password
http_access deny all
# CONFIGURACOES GERAIS
http_reply_access allow all
icp_access allow all
cache_mgr danilo.mattos@goiasec.com.br
visible_hostname gec-proxy01
# CONFIGURACAO DE ERRO E RELOAD DO IE
error_directory /usr/share/squid/errors/Portuguese
coredump_dir /var/spool/squid
ie_refresh on
#############
# FIM SQUID #
#############