DondaJR
(usa Debian)
Enviado em 11/02/2008 - 17:56h
# Criado em:Fri 27/Aug/2007 as 08:11 hrs
# Distribua, modifique. Mantenha os direitos
# Autor: Anderson Donda andersondonda@gmail.com
# Configuracao Squid
#Porta e metodo de trabalho
http_port 10.0.0.250:3128 transparent
#Porta ICP
icp_port 0
#Controle de cache
cache_mem 128 MB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /usr/local/squid/var/cache 1024 16 256
cache_access_log /usr/local/squid/var/logs/access.log
cache_log /usr/local/squid/var/logs/cache.log
cache_store_log /usr/local/squid/var/logs/store.log
maximum_object_size_in_memory 128 KB
maximum_object_size 100 MB
minimum_object_size 0 MB
# PID do daemon
pid_filename /usr/local/squid/var/logs/squid.pid
# Hostname do squid
visible_hostname squid.provider.com.br
# Controle de usuario
cache_effective_user squidaemon
cache_effective_group squid
# Acl DSA autologin
acl autologinDSA dst 10.0.0.250/32
# Acl administrativos
acl diretor src 10.0.0.55/32
acl recepcao src 10.0.0.57/32
acl financeiro src 10.0.0.56/32
acl suporte src 10.0.0.248/32
acl suporte2 src 10.0.0.13/32
# Acl salas
acl vip1 src 10.0.1.0/28
acl vip2 src 10.0.2.0/28
acl vip3 src 10.0.3.0/28
acl vip4 src 10.0.4.0/28
# Acl de controle de navegacao
acl forbidden_words url_regex -i "/usr/local/squid/etc/forbidden_words"
acl forbidden_down url_regex -i "/usr/local/squid/etc/forbidden_down"
# Acl alunos bloqueados
external_acl_type checkip children=40 %SRC /usr/local/mwsystem/squid/sbin/checkv2.sh
acl checkblock external checkip
# Acl geral
acl all src 10.0.0.0/16
acl toall dst 10.0.0.0/16
acl connection method CONNECT
acl localhost src 127.0.0.0
acl method_control proto cache_object
# Controle de banda
# bytes por segundo
# Calculo: (nb / 1000) * 8 = x kbps
# (nk * 1000) / 8 = x bytes
# Onde: nb = Numero de bytes
# nk = Numero de kbps
#
# Na Internet os valores para definicao de kilobyte e de 1000 bytes,
# valor de 1024 e para hds, memorias e afins.
# Portanto, 1 kilobyte e igual a 1000 bytes
#
# Para maior entendimento acesse:
http://www.numion.com/Calculators/Units.html
#
# delay_pools 3
# delay_class 1 1
# delay_parameters 1 250/250
# delay_access 1 deny limit_down suporte
# delay_access 1 deny limit_down diretor
# delay_access 1 allow limit_down
# delay_class 2 2
# delay_parameters 2 37500/37500 37500/37500
# delay_access 2 allow vip1
# delay_access 2 allow vip2
# delay_access 2 allow vip3
# delay_access 2 allow vip4
# delay_access 2 allow devel
# delay_access 2 deny suporte
# delay_access 2 deny diretor
# delay_class 3 2
# delay_parameters 3 -1/-1 -1/-1
# delay_access 3 allow diretor
# delay_access 3 allow suporte
# Regras para controle do cache
http_access allow method_control localhost
http_access deny method_control
# Regra de acesso ao DSAAutologin
http_access allow autologinDSa
# Regra de bloqueios dos alunos
http_access deny checkblock !autologinDSA
# Regras diretoria
http_access allow diretor
http_access allow diretor forbidden_down
# Regras recepcao
http_access allow recepcao autologinDSA
http_access allow recepcao
# Regras financeiro
http_access allow financeiro
# Regras suporte
http_access allow suporte
http_access allow suporte2
# Regra de controle de palavras
http_access deny forbidden_words
http_access deny forbidden_down
# Regra sala
http_access allow vip1
http_access allow vip2
http_access allow vip3
http_access allow vip4
#Regra geral
http_access deny all !autologinDSA
http_access deny connection !toall