Olá pessoal, sou novato aqui no squid-br e usuário recente do linux, estou
utilizando a distribuição debian 5 lenny.
Meu problema é o seguinte, configurei o squid para bloquear tudo e dei permição
de acesso a alguns sites, como o do Terra. O problema ocorre quando tento
acessar o terra ou outros sites que contem outros links dentro do site. O site
comessa carregar ai pedi login toda hora devido aos links que carregam no site
do terra. me falaram que a sulucao era permitir o referer, mais não sei como
fazer. agradeço qualquer ajuda, Obrigado!!! segue abaixo minha config
##########################################################################
#
# SQUID.CONF (/etc/squid/squid.conf)
#
# CONFIGURACAO BASICA DE SQUID PARA ACESSO A REDE 192.168.0.0/24
# PORTA TCP QUE O SQUID VAI ATENDER AS REQUISICOES
http_port 3128
# NAO FAZER CACHE CASO ESTAS EXPRESSOES ESTIVEREM PRESENTES NA URL
hierarchy_stoplist cgi-bin ?
# NAO FAZER CACHE CASO ESTAS EXPRESSOES ESTIVEREM PRESENTES NA URL
acl QUERY urlpath_regex cgi-bin \? scripts \.php$ \.asp$ \.action$ \.css$
\.dll$ \.do$ \.exe$ \.ftl$ \.js$ \.jsp$ \.lzx$ \.vm$
cache deny QUERY
# LISTAS RECOMENDADAS PARA CLIENTES APACHE
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
# TAMANHO MAXIMO DE RAM PARA O CACHE
cache_mem 50 MB
# SOBRE O CACHE: POLITICA, LOCALIZACAO, TAMANHO EM MB, TAMANHO DA ARVORE
cache_dir ufs /var/spool/squid 100 16 256
# MOSTRA IPs COMPLETOS NO LOG
client_netmask 255.255.255.255
# FORMATO DO LOG
logformat combined "%>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st
"%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh"
# LOCALIZACAO DO LOG DE ACESSO
access_log /var/log/squid/access.log combined
# E-MAIL DO ADMINISTRADOR DO CACHE
cache_mgr
# USUARIO E GRUPO QUE O CACHE IRA RODAR COMO
cache_effective_user proxy
cache_effective_group proxy
# NOME DA MAQUINA
visible_hostname Esulam
# CONFIGURACOES PARA AUTENTICACAO DE USUARIOS
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squidusers
auth_param basic children 5
auth_param basic realm Proxy Server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
# ARQUIVO DE HOSTS
hosts_file /etc/hosts
# PADROES DE REFRESH
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
# LISTAS DE ACESSO PADRAO (ACLs)
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 to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
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 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
# CONFIGURACAO MINIMA RECOMENDADA
http_access deny to_localhost
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
# NOSSAS ACLs
acl LAN src 192.168.1.0/24
acl ACESSO_LIMITADO proxy_auth "/etc/squid/regras/acesso_limitado"
acl SITES_PERMITIDOS dstdomain "/etc/squid/regras/sites_permitidos"
acl ACESSO_TOTAL proxy_auth "/etc/squid/regras/acesso_total"
# NOSSAS REGRAS USANDO NOSSAS ACLs
header_access Referer allow all
http_access allow ACESSO_TOTAL
http_access allow SITES_PERMITIDOS ACESSO_LIMITADO
http_access deny ACESSO_LIMITADO
http_access deny LAN
# PERMITIR ICP
icp_access allow all
# NEGAR TUDO
http_access deny all
# EOF