re_linux
(usa Debian)
Enviado em 26/12/2013 - 10:52h
Eis o que esta armazenado no arquivo squid.conf localizado em /etc/squid:
############## AUTENTICAÇÃO #################################
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squidpasswd
auth_param basic realm "Digite seu login e senha"
auth_param basic children 5
auth_param basic casesensitive off
http_port 3128 intercept
visible_hostname internetserver.ImediSantoAmaro
dns_nameservers 8.8.8.8 208.67.220.220
cache_mem 700 MB
maximum_object_size_in_memory 1 MB
maximum_object_size 512 MB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
cache_access_log /var/log/squid/access.log
cache_mgr lucas@subseven.com.br
error_directory /usr/share/squid/errors/pt-br/
########## Tempo de Vida do Cache ###########################
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
memory_replacement_policy heap GDSF
range_offset_limit -1
quick_abort_min -1
refresh_pattern -i \.jpg$|\.png$|\.pdf$|\.jpeg$|\.pdf$|\.ico$|\.gif$ 10080 50% 4 3200
############### Acls Gerais ###############################
acl rede src 192.168.0.0/24
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl SSL_Ports port 444 8443 443 563
acl Safe_ports port 80 #http
acl Safe_ports port 8443 #http
acl Safe_ports port 444 #http
acl Safe_ports port 21 #ftp
acl Safe_ports port 443 #https, snews
acl Safe_ports port 70 #gopher
acl Safe_ports port 210 #wais
acl Safe_ports port 1025-65535 #portas altas
acl Safe_ports port 280 #http-mgmt
acl Safe_ports port 488 #ss-http
acl Safe_ports port 591 #filemaker
acl Safe_ports port 777 #multiling http
acl Safe_ports port 901 #swat
acl Safe_ports port 403 387
acl Safe_ports port 1470 #http
acl Safe_ports port 403 #https
acl purge method PURGE
acl CONNECT method CONNECT
################## MINHAS ACLs ##############################
acl autenticacao proxy_auth REQUIRED
#acls autenticadas
acl medicos src "/etc/squid/acls/medicos.txt"
acl supervisao proxy_auth "/etc/squid/acls/supervisao.txt"
acl usuarios_liberados proxy_auth "/etc/squid/acls/usuarios_liberados.txt"
acl palavras.good url_regex -i "/etc/squid/acls/palavras.good"
acl antivirus url_regex -i "/etc/squid/acls/antivirus"
#regras
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 autenticacao
http_access allow medicos
http_access allow antivirus
http_access allow supervisao
http_access allow usuarios_liberados palavras.good
http_access deny all