szaboszlai
(usa Debian)
Enviado em 22/08/2011 - 11:18h
http_port 3128
cache_mem 64 MB
cache_swap_low 85
cache_swap_high 90
maximum_object_size 128 MB
minimum_object_size 0
maximum_object_size_in_memory 64 KB
cache_dir ufs /var/cache/squid 5000 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
client_netmask 255.255.255.0
# ESTAS SÃO AS REGRAS QUE VOCE ESTA PROCURANDO, REGRAS PARA AUTENTICAÇÃO ########
#
auth_param basic program /etc/squid/users/ncsa_auth /etc/squid/passwd #
auth_param basic realm autentique #
auth_param basic children 5 #
auth_param basic credentialsttl 2 hours #
auth_param basic casesensitive off #
#
#################################################################################
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 rede src 192.168.0.0/24 # SUA REDE
acl Safe_ports port 21 # ftp
acl Safe_ports port 70 # gopher
acl Safe_ports port 80 # http
acl Safe_ports port 210 # wais
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 443 # https
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 631 # cups
acl Safe_ports port 777 # multiling http
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl Safe_ports port 1025-65535 # unregistered ports
acl SSL_ports port 443 # https
acl SSL_ports port 465 # SMTP (SSL)
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
acl SSL_ports port 995 # POP3 (SSL)
acl purge method PURGE
acl CONNECT method CONNECT
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
http_access allow localhost
http_access deny to_localhost
acl usuarios proxy_auth REQUIRED # INDICA QUE REQUER AUTENTICAÇÃO PARA CONTINUAR
acl sites_bloqueados url_regex -i "/etc/squid/listas/sites_deny" # ESTA É A ACL ONDE OQUE ESTIVER DENTRO DO ARQUIVO "sites_deny" SERA BLOQUEADO
http_access deny sites_bloqueado
http_access allow usuarios
http_access allow local
http_access allow rede
http_access deny all
OBS. LEMBRANDO QUE ESTA SENDO DESTACADO AS LINHAS PARA AUTENTICAÇÃO E BLOQUEIO (URL_REGEX) AS DEMAIS SÃO PARA DAR ENFASE AO CONTEUDO
AH, NAO SE ESQUEÇA DE TER O APACHE INSTALADO E CRIAR OS ARQUIVOS "sites_deny,usuarios"
TAMBEM CADASTRE OS USUARIOS
# cd /etc/squid
# htpasswd -c passwd usuario
* htpasswd - comando para criar o arquivo de senhas;
* -c - parâmetro para criar o arquivo;
* passwd - nome do arquivo;
* usuario - usuário.