bdelmedico
(usa Ubuntu)
Enviado em 08/12/2011 - 12:28h
#configuracao do squid3
# As linhas abaixo se referem a autenticação de usuários no AD
auth_param basic program /usr/lib/squid3/squid_ldap_auth -R -b "dc=lala,dc=local" -D "cn=Proxy_User,ou=Internet,dc=laladc=local" -w "123456" -f sAMAccountName=%s -h servidorldap1 -h servidorldap2
auth_param basic realm Este acesso sera registrado. Favor digite seu login e senha.
auth_param basic children 5
auth_param basic credentialsttl 15 minutes
emulate_httpd_log on
mime_table /etc/squid3/mime.conf
ftp_user down@lala.local
ftp_passive on
unlinkd_program /usr/lib/squid3/unlinkd
# ACL externa para autenticação nas bases LDAP do PDC
external_acl_type ldap_group %LOGIN /usr/lib/squid3/squid_ldap_group -b "dc=lala,dc=local" -D "cn=Proxy_User,ou=Internet,dc=laladc=local" -w "123456" -f "(&(objectclass=person)(sAMAccountName=%v)(memberof=cn=%a,ou=Internet,dc=laladc=local))" -h 10.0.0.4
http_port 3128
http_port 8080
hierarchy_stoplist cgi-bin ?
# Configuraç do cache
cache_mem 64 MB
maximum_object_size_in_memory 128 KB
maximum_object_size 300 MB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid3 2048 16 256
cache_replacement_policy lru
memory_replacement_policy lru
ipcache_size 1024
ipcache_low 90
ipcache_high 93
cache_access_log /var/log/squid3/access.log
cache_log /var/log/squid3/cache.log
cache_swap_log /var/spool/squid3/swap.log
#LOGs
access_log /var/log/squid3/access.log squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl manager proto cache_object
acl localhost src 127.0.0.1
#ACL de liberacao de rede e ip
acl redelocal src "/etc/squid3/listaBrancaRedes.txt"
acl SiteSemCache url_regex "/etc/squid3/semcache.txt"
#ACL de bloqueio
acl malware_block_list url_regex -i "/etc/squid3/malware_block_list.txt"
acl msnweb_block_list url_regex -i "/etc/squid3/listaNegraWebMessenger.txt"
acl sites_block_list url_regex -i "/etc/squid3/listaNegraSites.txt"
acl gtalk_block_list url_regex -i "/etc/squid3/listaNegraGtalk.txt"
acl gmaps_block_list url_regex -i "/etc/squid3/listaNegraGmaps.txt"
acl webproxy_block_list url_regex -i "/etc/squid3/listaNegraFreeProxy.txt"
acl msn_block_list url_regex -i "/etc/squid3/listaNegraMSN.txt"
acl anexos_block_list url_regex -i "/etc/squid3/listaNegraDownloads.txt"
acl proibir_musica urlpath_regex -i "/etc/squid3/listaNegraMusicas.txt"
acl comprascoletivas_block_list url_regex -i "/etc/squid3/listaNegraSitesComprasColetivas.txt"
#ACL de liberacao
acl sites_liberados url_regex -i "/etc/squid3/listaBrancaSites.txt"
acl sites_lala url_regex -i "/etc/squid3/listaSiteslala.txt"
acl sites_bancos url_regex -i "/etc/squid3/listaBrancaBancos.txt"
# As ACLs abaixo relaxam o controle de conteúdo das 12:00 as 13:30
# Inserir os sites a serem liberados das 12 as 13 no arquivo /usr/local/squid3/etc/libera_almoco
#acl libera_sites url_regex -i "/etc/squid3/listaBrancaLiberaAlmoco.txt"
#acl almoco time SMTWHFA 12:00-13:30 #libera acesso das 12 as 13:30 #de segunda a domingo.
#ACL paginas sem cache
acl CACHE urlpath_regex cgi-bin \?
#ACL usuarios autenticados
# ACLs_ACTIVE_DIRECTORY
acl ldapAcessoRestrito external ldap_group AcessoRestrito # Grupo de acesso com restrições
acl ldapAcessoPadrao external ldap_group AcessoPadrao # Acesso a internet padrão
acl ldapAcessoTotal external ldap_group AcessoTotal # Acesso total a internet
acl ldapAcessoDownload external ldap_group AcessoDownload # Libera download de arquivo com extensões bloqueadas.
#acl autenticado proxy_auth REQUIRED
acl msn-ports port 1863
acl SSL_ports port 443 # https
acl SSL_ports port 9876 # etam
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
acl SSL_ports port 10000
acl SSL_ports port 7071 # zimbra admin
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # 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 Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 809
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow manager localhost
http_access deny manager
cache deny CACHE
http_access deny malware_block_list
http_access allow sites_lala
http_access allow sites_bancos
http_access allow sites_liberados
http_access deny ldapAcessoRestrito
http_access allow ldapAcessoTotal
http_access deny comprascoletivas_block_list
http_access deny msnweb_block_list
http_access deny sites_block_list
http_access deny gtalk_block_list
http_access deny webproxy_block_list
http_access deny msn_block_list
http_access allow ldapAcessoDownload anexos_block_list
http_access deny anexos_block_list
http_access deny proibir_musica
http_access allow ldapAcessoPadrao
http_access deny all
http_reply_access allow all
################################
icp_access allow all
cache_effective_group proxy
visible_hostname proxy-250.lala.local
server_persistent_connections off
error_directory /usr/share/squid3/errors/Portuguese
hosts_file /etc/hosts
coredump_dir /var/spool/squid3