lab
(usa Debian)
Enviado em 18/12/2007 - 15:20h
abaixo segue a configuração do squid
# TAG: http_port
http_port 3128
# TAG: hierarchy_stoplist
hierarchy_stoplist cgi-bin ?
# TAG: no_cache
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
# TAG: cache_mem (bytes)
cache_mem 128 MB
# TAG: cache_swap_low (percent, 0-100)
# TAG: cache_swap_high (percent, 0-100)
cache_swap_low 90
cache_swap_high 95
# TAG: maximum_object_size (bytes)
maximum_object_size 16 MB
# TAG: minimum_object_size (bytes)
minimum_object_size 0 KB
# TAG: maximum_object_size_in_memory (bytes)
maximum_object_size_in_memory 64 KB
# TAG: cache_dir
cache_dir ufs /var/spool/squid 512 16 256
# TAG: cache_access_log
cache_access_log /var/log/squid/access.log
# TAG: auth_param
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
# TAG: refresh_pattern
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
# TAG: acl
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 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 CONNECT method CONNECT
# acl definidas pelo usuario
acl autenticados proxy_auth REQUIRED
acl bloqueados url_regex -i "/etc/squid/bloqueados.txt"
acl liberados url_regex -i "/etc/squid/liberados.txt"
acl redelocal src 192.168.1.0/24
acl users_bloq proxy_auth "/etc/squid/usuarios.txt"
acl net_bloq time MTWHF 14:00-16:00
acl dengue proxy_auth "/etc/squid/usuariosdengue.txt"
acl rede_dengue src 192.168.1.53
acl rede_rh src 192.168.1.41
acl youtube url_regex -i "/etc/squid/youtube.txt"
acl youtube_permitido src "/etc/squid/rede_youtube.txt"
acl orkut_msn url_regex -i "/etc/squid/orkut_msn.txt"
acl orkut_msn_bloqueado src "/etc/squid/orkut_msn_bloq.txt"
#acl MAQLIB src 192.168.1.19/255.255.255.255
# TAG: http_access
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow liberados
#http_access allow MAQLIB
http_access allow youtube_permitido youtube
http_access deny bloqueados
http_access deny net_bloq users_bloq
http_access deny rede_dengue !dengue
http_access deny rede_rh
http_access deny orkut_msn orkut_msn_bloqueado
http_access allow autenticados
http_access allow redelocal
http_access deny all
# TAG: http_reply_access
http_reply_access allow all
# TAG: icp_access
icp_access allow all
# TAG: visible_hostname
visible_hostname servinter
# TAG: err_html_text
error_directory /usr/share/squid/errors/Portuguese
# TAG: coredump_dir
coredump_dir /var/spool/squid