# @Copyright - Gerencia de Informatica e Organizacao Institucional
# Luis C P Barcellos <luisbarcellos@gmail.com>
# Arquivo de Configuracao do Servidor Proxy
# Host          : pxdf0901.XXXX.XX.br (10.x.x.x)
# Arquivo de configura��o do proxy squid-2.6.3
# Arquivo       : /usr/local/etc/squid/squid.conf
#
# Ultima atualizacao: 21/09/2008
#
# squid.conf
#

##### ----- Op��es Globais ----- #####3
http_port 3128
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 512 MB
ipcache_size 4096
fqdncache_size 4096
ipcache_low 85
ipcache_high 95
cache_mem 64 MB
cache_swap_low 65
cache_swap_high 80
half_closed_clients off
minimum_object_size 0 KB
maximum_object_size 131072 KB
maximum_object_size_in_memory 1024 KB
request_body_max_size 0 MB
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
httpd_suppress_version_string on
dns_nameservers 10.x.x.x 10.x.x.x
cache_dir diskd /var/log/squid/cache 16384 16 256 Q1=64 Q2=72
access_log /var/log/squid/log/squidaccess.log squid
cache_log  /dev/null #/var/log/squid/log/cache.log
cache_store_log /dev/null #/var/log/squid/log/store.log
error_directory /usr/local/etc/squid/errors/Portuguese
visible_hostname pxdf0901.anac.gov.br
coredump_dir /usr/local/squid/cache
shutdown_lifetime 5 seconds
cache_effective_group squid
cache_effective_user squid
#log_mime_hdrs on

##### ----- Op��es de Autentica��o ----- #####
auth_param ntlm program /usr/local/libexec/squid/ntlm_auth dominio.com.br/servidor_de_dominio_01 dominio.com.br/servidor_de_dominio_02
auth_param ntlm children 100

##### ----- definicoes de delay_pools ----- #####
delay_pools 3
delay_class 1 1
delay_class 2 1
delay_class 3 1
delay_parameters 1 2500/2500
delay_parameters 2 3750/3750
delay_parameters 3 500/500

##### ----- Lista 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/32
acl to_localhost dst 127.0.0.0/8
acl redelocal src 10.3.0.0/255.255.0.0
acl SSL_ports port 443 10000
acl Safe_ports port 21 80 81 70 210 280 443 488 554 563 591 777 8554 1025-65535
acl Java browser Java/1.4 Java/1.5 Java/1.6
acl CONNECT method CONNECT

##### ----- IPs sem Restri��o ----- #####
acl diretoria proxy_auth "/usr/local/etc/squid/diretoria.txt"

##### ----- limite de download ----- #####
acl limite_download_site01 url_regex ^http://.*discovirtual.*|^http://.*megaupload.*|^http://.*rapidshare.*
acl limite_download_site02 url_regex ^http://.*youtube.*|^http://.*badongo.*|^http://.*4shared.*
acl limite_download_site03 url_regex ^http://.*orkut.com*
acl limite_download_ext01 url_regex -i rmvb$ exe$ mov$ mpeg$ wav$ mp3$ avi$ rar$ raw$ mpg$ ram$ rar$ mdf$ wmv$ wma$ bin$ flv$ iso$ zip$

##### ----- acls sites permitidos proxy ----- #####
acl site_permitido1 url_regex ^http://.*gov.br|^http://.*intranet.anac.gov*|^http://.*microsoft.com.*|^ftp://.*dell.com.*

##### ----- Bloqueio MSN ----- #####
#acl msn01 dstdomain loginnet.passport.com
#acl msn02 url_regex -i gateway.dll
#acl msn03 req_mime_type -i ^application/x-msn-messenger$
#acl msn04 dstdomain webmessenger.msn.com

##### ----- op��es de Autentica��o ----- #####
follow_x_forwarded_for allow localhost
acl ntlm_users proxy_auth REQUIRED

##### ----- Controle de Acesso ----- #####
http_access allow wsus
#http_access deny msn01
#http_access deny msn02
#http_access deny msn03
#http_access deny msn04
http_access allow Java ntlm_users
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow site_permitido1 ntlm_users
delay_access 1 allow limite_download_ext01 diretoria !ntlm_users
delay_access 2 allow limite_download_site01 diretoria !ntlm_users
delay_access 2 allow limite_download_site02 diretoria !ntlm_users
delay_access 3 allow limite_download_site03 diretoria !ntlm_users
http_access allow ntlm_users
http_access deny all

##### ----- Fim squid.conf ----- #####
