raschadeck
(usa Ubuntu)
Enviado em 23/05/2011 - 11:09h
segue meu humilde squid.conf
http_port 3128
#transparent
visible_hostname proxyrhbc.com
cache_mem 512 MB
maximum_object_size_in_memory 64 KB
maximum_object_size 512 MB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid 2048 16 256
cache_access_log /var/log/squid/access.log
refresh_pattern ^ftp 15 20% 2280
refresh_pattern ^gopher: 15 0% 2280
refresh_pattern . 15 20% 2280
acl all src 0.0.0.0/0.0.0.0
acl redelocal src 10.0.0.0/255.255.255.0
acl localhost src 127.0.0.1/255.255.255.255
acl maneger proto cache_object
acl SSL_ports port 443 563
acl Safe_ports port 80 #http
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 # 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 8222 #multiling http
acl Safe_ports port 8333 #multiling http
acl Safe_ports port 10000 #multiling http
acl Safe_ports port 3389 #acesso remoto
acl Safe_ports port 5900 #acesso remoto
acl Safe_ports port 5901 #acesso remoto
acl Safe_ports port 5800 #acesso remoto
acl Safe_ports port 5801 #acesso remoto
acl Safe_ports port 2631 #acesso remoto
acl Safe_ports port 23 #acesso remoto
acl purge method PURGE
acl CONNECT method CONNECT
auth_param basic program /usr/lib/squid/ldap_auth -R -b "dc=rhbc,dc=local" \
-D "cn=Administrador,cn=Users,dc=rhbc,dc=local" \
-w "*************" -f sAMAccountName=%s -h 10.1.1.254
auth_param basic children 5
auth_param basic realm Sua conexao será registrada, entre com suas credenciais
#auth_param basic credentialsttl 2 hours
external_acl_type ldap_group %LOGIN /usr/lib/squid/squid_ldap_group -R -b "dc=rhbc,dc=local" -D "cn=Administrador,cn=Users,dc=rhbc,dc=local" -w "**************" -f "(&(objectclass=person)(sAMAccountName=%v)(memberof=cn=%a,cn=Users,dc=rhbc,dc=local))" -h 10.1.1.254
acl senha proxy_auth REQUIRED
acl dominios_proibidos url_regex -i "/etc/squid/proibidos/dominios_proibidos.txt"
acl dominios_diretoria url_regex -i "/etc/squid/proibidos/dominios_diretoria.txt"
# Administradores - Acesso total liberado
acl proxyadmins external ldap_group squid_adm
# Grupo para usuarios
acl proxyusers external ldap_group squid_usuarios
# Grupo para diretoria
acl proxydiretoria external ldap_group squid_diretoria
# Regras de bloqueio/desbloqueio de conteudo
#Configuracao das regras:
# Libera acesso total para administradores
http_access allow all proxyadmins
# Bloqueios, menos para adm e diretoria
http_access allow all proxydiretoria !dominios_diretoria
http_access deny dominios_proibidos
http_access allow maneger localhost
http_access deny maneger
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow senha
http_access allow redelocal
http_access deny all