Enviado em 16/12/2011 - 16:09h
Olá pessoal##squid.conf
http_port 3128 transparent
hierarchy_stoplist cgi-bin ?
cache_mem 1024 MB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid3 45000 32 256
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
maximum_object_size_in_memory 64 KB
maximum_object_size 512 MB
access_log /var/log/squid3/access.log squid
cache_log /var/log/squid3/cache.log
cache_store_log /var/log/squid3/store.log
pid_filename /var/log/squid3/squid3.pid
mime_table /usr/share/squid3/mime.conf
cache_mgr jmuramatsu@email.com
memory_pools off
diskd_program /usr/lib/squid3/diskd
unlinkd_program /usr/lib/squid3/unlinkd
#Cache windowsupdate
refresh_pattern windowsupdate.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
refresh_pattern download.microsoft.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
refresh_pattern www.download.microsoft.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
refresh_pattern www.microsoft.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
refresh_pattern au.download.windowsupdate.com/.*\.(cab|exe|dll|msi|psf) 4320 100% 43200 reload-into-ims
refresh_pattern download.windowsupdate.com/.*\.(cab|exe|dll|msi|psf) 4320 100% 43200 reload-into-ims
refresh_pattern cache.pack.google.com/.*\.(cab|exe|dll|msi|psf) 4320 100% 43200 reload-into-ims
refresh_pattern www.update.microsoft.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
refresh_pattern www.download.windowsupdate.com/.*\.(cab|exe|dll|msi|psf) 10080 100% 43200 reload-into-ims
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern . 0 20% 4320
quick_abort_max 16 KB
quick_abort_pct 95
quick_abort_min 16 KB
request_header_max_size 20 KB
reply_header_max_size 20 KB
request_body_max_size 0 KB
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl vlan24 src 10.10.10.0/24 # Representa a sua rede e respectiva mascara de sub-rede
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 8080 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 20 # ftp
acl Safe_ports port 443 563 1863 # https
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
# regra para os sites de bancos sairem somente pelo IP fixo
acl bancos url_regex caixa.gov.br,bb.com.br,itau.com.br,hsbc.com.br,santander.com.br,santandernet.com.br,bancoreal.com.br,bradesco.com.br,unibanco.com.br
tcp_outgoing_address 189.18.201.24 bancos
no_cache deny bancos
always_direct allow bancos
http_access allow bancos
acl logins url_regex serverportal.com,registro.br
tcp_outgoing_address 189.18.201.24 logins
no_cache deny logins
always_direct allow logins
http_access allow logins
#Receita federal NFe
acl receita dstdomain "/etc/squid3/listas/receita"
acl receita1 url_regex -i "/etc/squid3/listas/receita1"
tcp_outgoing_address 189.18.201.24 receita
tcp_outgoing_address 189.18.201.24 receita1
http_access allow receita
http_access allow receita1
#Fim Receita federal NFe
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow manager localhost
http_access deny manager
acl purge method PURGE
http_access allow purge localhost
http_access deny purge
http_access allow localhost
http_access allow vlan24
cache_mgr webmaster
mail_program mail
cache_effective_user proxy
cache_effective_group proxy
httpd_suppress_version_string off
visible_hostname hitchcock
error_directory /usr/share/squid3/errors/Portuguese/
dns_nameservers 8.8.8.8 8.8.4.4