tombastos
(usa Debian)
Enviado em 02/02/2012 - 13:08h
http_port x.x.x.x:3128 transparent
#snmp_port x.x.x.x:3401
icp_port 0
pid_filename /var/run/squid.pid
hierarchy_stoplist cgi-bin .cgi .php .asp .aspx .jsp ?
acl QUERY urlpath_regex cgi-bin nagios2 .cgi .php .aspx .jsp \?
cache_mem 192 MB
cache_swap_low 95
cache_swap_high 98
cache_effective_user proxy
cache_effective_group proxy
maximum_object_size 16384 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 20 KB
cache_dir ufs /var/spool/squid 55000 16 256
# FUNCIONANDO
#cache_access_log /var/log/squid/access.log
#cache_log /var/log/squid/cache.log
#cache_store_log /var/log/squid/store.log
# ENJAULADO
cache_access_log /var/debian.prision/var/log/squid/access.log
cache_log /var/debian.prision/var/log/squid/cache.log
cache_store_log /var/debian.prision/var/log/squid/store.log
mime_table /etc/squid/mime.conf
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
# Realiza Consulta para Autenticar Usuário no Active Directory
auth_param basic program /usr/lib/squid/ldap_auth -R -b "dc=fadesp,dc=org,dc=br" -D "CN=mail_admin,CN=Users,DC=fadesp,DC=org,DC=br" -w "SENHA" -f sAMAccountName=%s -h x.x.x.x
auth_param basic realm Digite seu Login e Senha
auth_param basic children 5
auth_param basic credentialsttl 15 minutes
# Realiza Consulta para Verificar Grupo no Active Directory - COMENTADO
external_acl_type ldap_group %LOGIN /usr/lib/squid/squid_ldap_group -R -b "ou=fadesp-users,dc=fadesp,dc=org,dc=br" -D "CN=mail_admin,CN=Users,DC=fadesp,DC=org,DC=br" -w "XXX" -f "(&(sAMAccountName=%v)(memberof=cn=%a,CN=Users,DC=fadesp,DC=org,DC=br))" -h x.x.x.x
# Realiza Consulta para Verificar Grupo no Active Directory
external_acl_type ldap_group %LOGIN /usr/lib/squid/squid_ldap_group -R -b "ou=Grupos,ou=CTE,ou=FADESP-USERS,dc=fadesp,dc=org,dc=br" -D "CN=mail_admin,CN=Users,DC=fadesp,DC=org,DC=br" -w "XXXX" -f "(&(sAMAccountName=%v)(memberof=cn=%a,CN=Users,DC=fadesp,DC=org,DC=br))" -h x.x.x.x
#Variveis
acl regexp_deny url_regex -i "/etc/squid/acls/regexp_deny"
acl sites_deny_fadesp url_regex -i "/etc/squid/acls/sites_deny_fadesp"
acl sites_allow_digita url_regex -i "/etc/squid/acls/sites_allow_digita"
#acl sites_deny_digita url_regex -i "/etc/squid/acls/sites_deny_digita"
#Blacklists
acl sites_ads_domain_deny url_regex -i "/etc/squid/acls/blacklists/ads/domains"
acl sites_ads_urls_deny url_regex -i "/etc/squid/acls/blacklists/ads/urls"
#Blacklist Agrressive
acl sites_aggress_domain_deny url_regex -i "/etc/squid/acls/blacklists/aggressive/domains"
acl sites_aggress_urls_deny url_regex -i "/etc/squid/acls/blacklists/aggressive/urls"
#Blacklist Audio-Video
acl sites_midia_domain_deny url_regex -i "/etc/squid/acls/blacklists/audio-video/domains"
acl sites_midia_urls_deny url_regex -i "/etc/squid/acls/blacklists/audio-video/urls"
#Default
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 85 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 8443 # 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
no_cache deny QUERY
logfile_rotate 10
# Desabilita a limitacao de upload de 1MB para ILIMITADO
request_body_max_size 0 MB
# As linhas abaixo evitam anunciar hosts e squid na Internet
header_access via deny all
header_access X-Forwarded-For deny all
#Erros do Log do Squid em Portugues
error_directory /usr/share/squid/errors/Portuguese
#SNMP
acl snmp_comu snmp_community fdp_public
acl snmp_host src x.x.x.x
snmp_access allow snmp_comu snmp_host