jhonepenha
(usa Debian)
Enviado em 07/10/2010 - 15:04h
esse é o certo o de cima faltou uma parte
http_port 3128
visible_hostname local.intra.
#Squid configuracao padrao
cache_mem 64 MB
maximum_object_size_in_memory 64 KB
maximum_object_size 400 MB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid 2048 16 256
logformat squid # %ul # %>a # %Ss # %ru # %{Host}>h # %mt
cache_access_log /var/log/squid/access.log
refresh_pattern ^ftp: 15 20% 2280
refresh_pattern ^gopher: 15 0% 2280
refresh_pattern . 15 20% 2280
#Configuracao padrao
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
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 901 # swat
acl Safe_ports port 1025-65535 # portas altas
acl purge method PURGE
acl CONNECT method CONNECT
#Regras de acesso padrao
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
#Autenticacao de Usuarios
auth_param basic realm debian
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd
acl autenticados proxy_auth REQUIRED
#http_access allow autenticados
auth_param basic credentialsttl 2 hour
auth_param basic children 10
#Listas de controles
acl nivel1 proxy_auth "/etc/squid/grupos/nivel1"
acl nivel2 proxy_auth "/etc/squid/grupos/nivel2"
acl nivel3 proxy_auth "/etc/squid/grupos/nivel3"
#Regras ACL
acl redelocal src 192.168.200.0/24
acl palavrasliberadas url_regex -i "/etc/squid/regras/liberados"
acl palavrasbloqueadas url_regex -i "/etc/squid/regras/bloqueados"
acl extbloqueadas url_regex -i "/etc/squid/regras/extbloqueadas"
acl palavra dstdom_regex "/etc/squid/regras/palavrasbloq"
# Controle de Banda
delay_pools 2
delay_class 1 2
delay_parameters 1 2000000/2000000 2000000/2000000
delay_access 1 allow nivel1
delay_class 2 2
delay_parameters 2 100000/100000 100000/100000
#delay_access 2 allow nivel3
# Horarios Liberados
acl horario url_regex -i "/etc/squid/regras/horario"
acl semana time MTWHF 11:47-11:48
acl sabado time A 12:00-23:00
acl domingo time S 8:00-23:59
#Regra
# http_access allow palavrasliberadas
http_access allow nivel1
#http_access allow semana
http_access deny palavra
#http_access deny all
http_access deny palavrasbloqueadas
http_access deny extbloqueadas
delay_access 2 allow nivel3
http_access allow nivel3
# http_access deny all
deny_info
http://www.local.intra palavrasbloqueadas
deny_info
http://www.local.intra extbloqueadas
deny_info
http://www.local.intra palavra
#Mensagem de acesso negado
error_directory /usr/share/squid/errors/Portuguese
ie_refresh on