xloko
(usa Debian)
Enviado em 11/11/2009 - 17:07h
opa.. vai ai o squid.conf..
--------------------------------------------------------
http_port 3128 transparent
cache_mem 128 MB
maximum_object_size 4096 KB
cache_dir ufs /var/spool/squid 1024 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
emulate_httpd_log on
error_directory /usr/share/squid/errors/Portuguese
dns_nameservers 200.175.5.139, 200.175.89.139
#---------> acl Gerais
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 563 #
acl Safe_ports port 80 #http
acl Safe_ports port 70 # gopher
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 1025-65535 # unregistred 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 CONNECT method CONNECT
#---------> Minhas ACL
acl network src 192.168.0.0/24
acl acesso_total_ip src "/etc/squid/regras/acesso.total.ip"
acl acesso_medio_bloqueado_url url_regex -i "/etc/squid/regras/acesso.medio.bloqueado.url"
acl acesso_restrito_ip src "/etc/squid/regras/acesso.restrito.ip"
acl acesso_restrito_libera_url url_regex -i "/etc/squid/regras/liberado.restrito.url"
acl proibir_palavra url_regex -i "/etc/squid/regras/proibir_palavra.txt"
acl acesso_universal_url url_regex -i "/etc/squid/regras/acesso_universal_url"
#----------> Diretivas http_access
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
#---------> Regras das minha ACL
http_access deny acesso_universal_url
http_access deny acesso_medio_bloqueado_url !acesso_total_ip
http_access deny acesso_restrito_ip !acesso_restrito_libera_url
http_access deny proibir_palavra !acesso_total_ip
http_access allow network
http_access deny all
icp_access deny all
---------------------------------------------------
obs: as ACL estao no /etc/squid/regras
boa sorte!