bdexterholland
(usa Debian)
Enviado em 31/01/2011 - 08:59h
O engraçado é que eu não estou tentando fazer um proxy transparente e sim autenticado. Abaixo segue meu squid.conf
OBS.: adicionei o endereço .caixa.gov.br ao arquivo /etc/squid/regras/url_liberado
-----
# _______________________________
#______________________________________________| CONFIGURACOES GERAIS DO SQUID |
http_port 3128
icp_port 3130
#
cache_effective_user proxy
cache_effective_group proxy
#
dns_defnames on
#
hierarchy_stoplist cgi-bin ?
#
cache_mem 64 MB
#
cache_swap_low 85
cache_swap_high 90
#
maximum_object_size 60 MB
minimum_object_size 0
#
maximum_object_size_in_memory 64 KB
#
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
client_netmask 255.255.255.0
# ________________________
#_____________________________________________________| JANELA DE AUTENTICACAO |
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd
auth_param basic realm Servidor de Internet da FAVALE
auth_param basic children 5
auth_param basic credentialsttl 1 hour
auth_param basic casesensitive on
#
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
# ____________________
#__________________________________________________________| CONTROLE DE ACESSO |
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 rede_interna src 192.168.13.0/24
acl QUERY urlpath_regex cgi-bin \?
# ________
#_____________________________________________________________________| PORTAS |
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
# ____________
#_________________________________________________________________| PORTAS SSL |
acl SSL_ports port 443 # https
acl SSL_ports port 465 # YAHOO - SMTP (SSL)
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
acl SSL_ports port 995 # YAHOO - POP3 (SSL)
# _______________________________________
#______________________________________| ACLS DE CONTROLE DE ACESSO A CONTEUDO |
#
acl purge method PURGE
acl CONNECT method CONNECT
cache deny QUERY
acl msn url_regex -i "/etc/squid/regras/url_msn" # ACL de controle de acesso ao MSN
acl usuario_livre proxy_auth "/etc/squid/regras/usuario_livre" # ACL de acesso completo
acl usuario_bloqueado proxy_auth "/etc/squid/regras/usuario_bloqueado" REQUIRED # ACL de endereços bloqueados
acl usuario_restrito proxy_auth "/etc/squid/regras/usuario_restrito" REQUIRED # ACL de endereços liberados para usuários restritos
acl alunos proxy_auth "/etc/squid/regras/alunos" # ACL de lista de alunos
acl url_liberado dstdomain "/etc/squid/regras/url_liberado" # ACL de enderecos liberados sem autenticacao
acl url_restrito dstdomain "/etc/squid/regras/url_restrito" # ACL de enderecos de acesso restrito
acl url_bloqueado dstdomain "/etc/squid/regras/url_bloqueado" # ACL de enderecos bloqueados para funcionarios
acl url_bloqueado_aluno dstdomain "/etc/squid/regras/url_bloqueado_aluno" # ACL de enderecos bloqueados para alunos
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
acl webmin port 10000
# ______________________________
#_______________________________________________| REGRAS DE CONTROLE DE ACESSO |
#
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access allow purge localhost
http_access deny purge
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny to_localhost
http_access allow url_liberado
#http_access deny url_bloqueado
http_access allow usuario_livre all
http_access deny usuario_bloqueado url_bloqueado
http_access allow usuario_restrito url_restrito
http_access deny usuario_restrito !url_restrito
http_access allow usuario_livre msn
http_access deny usuario_bloqueado msn
http_access deny alunos url_bloqueado_aluno
http_access allow alunos !url_bloqueado_aluno
http_access allow all
#FIM DO ARQUIVO SQUID.CONF