70ny3m1LiAn0
(usa CentOS)
Enviado em 18/12/2013 - 15:39h
### Configurações de rede
http_port 8080
visible_hostname CPD
dns_nameservers 192.168.1.254
cache_mgr antonio.emiliano@dominio.com
### Redirecionamento para SquidGuard
redirect_program /usr/local/bin/squidGuard -c /usr/local/squidGuard/squidGuard.conf
### Definir diretórios de páginas de erro em português
error_directory /usr/share/squid3/errors/pt-br
### Configuração de Cache
hierarchy_stoplist cgi-bin ?
cache_mem 1024 MB
maximum_object_size_in_memory 1024 KB
maximum_object_size 100 MB
memory_pools off
cache_dir ufs /var/spool/squid3 2048 16 256
refresh_pattern ^ftp: 360 20% 10080
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
### Caminho dos Logs
access_log /var/log/squid3/access.log
cache_log /var/log/squid3/cache.log
################################
### Controle de Acesso (ACLs)
################################
acl localhost src 127.0.0.1/32
acl redelocal src 192.168.0.0/23
acl manager proto cache_object
http_access allow manager localhost
http_access deny manager
acl purge method PURGE
http_access allow purge localhost
http_access deny purge
acl Permitir_porta port 21 # ftp
acl Permitir_porta port 70 # gopher
acl Permitir_porta port 80 # http
acl Permitir_porta port 210 # wais
acl Permitir_porta port 280 # http-mgmt
acl Permitir_porta port 443 # https
acl Permitir_porta port 488 # gss-http
acl Permitir_porta port 563 # nntps
acl Permitir_porta port 591 # filemaker
acl Permitir_porta port 631 # cups
acl Permitir_porta port 777 # multiling http
acl Permitir_porta port 873 # rsync
acl Permitir_porta port 901 # swat
acl Permitir_porta port 1025-65535 # unregistered ports
http_access deny !Permitir_porta
acl connect method CONNECT
acl SSL_ports port 443 # https
acl SSL_ports port 563 # nntps
acl SSL_ports port 873 # rsync
http_access deny connect !SSL_ports
######### Principal Regra
#acl acesso_livre src "/etc/squid3/acl/acesso_livre"
acl acesso_restrito src "/etc/squid3/acl/acesso_restrito"
acl liberado url_regex -i "/etc/squid3/acl/liberado"
acl download url_regex -i "/etc/squid3/acl/download"
acl words_porn url_regex -i "/etc/squid3/acl/words_porn"
acl dominios_porn dstdomain "/etc/squid3/acl/dominios_porn"
acl extensoes_porn url_regex -i "/etc/squid3/acl/extensoes_porn"
http_access allow all
http_access allow liberado
http_access deny words_porn
http_access deny dominios_porn
http_access deny extensoes_porn
http_access allow redelocal
http_access deny download
http_access deny acesso_restrito
http_access deny all
### Liberação
#http_access allow redelocal
#http_access allow localhost
#http_access deny all