infoporto
(usa Debian)
Enviado em 02/07/2011 - 17:26h
######### DECLARAÇÃO DE NOME,PADROES,CACHE,LOG ;
##############################################
http_port 3128 transparent
visible_hostname MAMSERVER # NOME DO SERVIDOR
hierarchy_stoplist cgi-bin ? # velocidade em acesso a relatorios
cache_mem 300 MB # cache na memoria
maximum_object_size 25 MB ## tamanho maximo de objeto em cache
minimum_object_size 01 KB ## TAMANHO MINIMO
maximum_object_size_in_memory 1 MB ## tamanho maxino na memoria
cache_swap_low 90
cache_swap_high 95
error_directory /usr/share/squid/errors/Portuguese/
cache_dir ufs /var/spool/squid 10000 32 512
cache_access_log /var/log/squid/access.log
#cache_log /var/log/squid/cache.log
cache_mgr lj01dti@atacadomeioameio.com.br
cache_store_log /var/log/squid/store.log
pid_filename /var/run/squid.pid
debug_options ALL,1
client_netmask 255.255.255.255
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
access_log /var/log/squid/access.log squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
###############################################################################################################
######### windows update em cache##############################################################################
refresh_pattern windowsupdate.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
refresh_pattern download.microsoft.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
refresh_pattern
www.microsoft.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
refresh_pattern au.download.windowsupdate.com/.*\.(cab|exe|dll|msi) 4320 100% 43200 reload-into-ims
################################################################################################################
#Cache atulizacao avira ( Faz cache do Avira ) ##
refresh_pattern professional.avira-update.com/.*\.(cab|exe|dll|msi|gz) 10080 100% 43200 reload-into-ims
######DECLARAÇÃO DE ACLS
acl all src 192.168.1.0/255.255.255.0
delay_pools 1
delay_class 1 2
delay_parameters 1 217600/217600 32768/32768
delay_access 1 allow all
acl localhost src 127.0.0.1/255.255.255.255
acl liberados url_regex -i "/squid/liberados.txt" # # LIBERA PALAVRAS ESPECIFICAS EM UMA URL
acl GERENTES src "/squid/Gerencia.txt" # # LIBERA ACESSO AOS IPS LISTADOS
acl negados url_regex -i "/squid/negados.txt" # NEGA PALAVRAS EM UMA URL
acl ext urlpath_regex -i "/squid/ext.txt" # # PROIBE EXTENÇÃO .RAR .EXE, PROIBINDO ASSIM DOWNLOAD
#### TESTES POR HORARIO
acl libera_horas time MTWHFS 11:30-14:00
acl messenger req_mime_type -i ^application/x-msn-messengeri
acl msn3 url_regex -i gateway.dll
acl porno url_regex -i "/squid/porno.txt" # # NEGA PALAVRAS EM UMA URL
acl msn url_regex -i "/squid/msn.txt" # # NEGA PALAVRAS EM UMA URL
acl msn2 dstdomain "/squid/msn2.txt"
acl socialnet url_regex -i "/squid/socialnet.txt" # # NEGA PALAVRAS EM UMA URL
acl tv url_regex -i "/squid/tv.txt" # # NEGA PALAVRAS EM UMA URL
acl radios url_regex -i "/squid/radios.txt" # # NEGA PALAVRAS EM UMA URL
acl jogos url_regex -i "/squid/jogos.txt" # # NEGA PALAVRAS EM UMA URL
acl rh src "/squid/rh.txt" ## setor rh
acl batepapo url_regex -i "/squid/batepapo.txt" # # NEGA PALAVRAS EM UMA URL
###############################################################################################################
### FAZ A EXECUÇÃO DAS ACLS " deny" == negar, "allow" == liberar;
###
http_access allow rh
http_access allow GERENTES
http_access allow liberados
http_access deny msn3 !GERENTES !libera_horas
http_access deny negados !GERENTES
http_access deny messenger !GERENTES
http_access deny msn !GERENTES
http_access deny ext !GERENTES
http_access deny msn2 !GERENTES
http_access deny socialnet !GERENTES
http_access deny tv !GERENTES
http_access deny radios !GERENTES
http_access deny batepapo !GERENTES
http_access deny jogos !GERENTES
http_access deny porno !GERENTES
http_access allow localhost
http_access allow all
http_reply_access allow all
coredump_dir /var/spool/squid