maykeribeiro
(usa CentOS)
Enviado em 05/06/2012 - 16:44h
# Configuração Squid
### INICIO SQUID.CONF ###
#############################################################
##### By MAYKE RIBEIRO ###########################################
#############################################################
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
############## REDE LOCAL #########################
### Aqui ele libera a rede 192.168.1.0/24 para se conectar ao squid ####
acl localnet src 192.168.1.0/255.255.255.0
## Na linha a baixo, ficarao os ips que poderao
## Navegar sem passar pelo proxy
acl ips_sem_senha src 192.168.1.168
############## ACL PORTAS ##############
acl all src 0.0.0.0/0.0.0.0
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 25 # SMTP
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 CONNECT method CONNECT
## ACL autenticacao ##
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
## Nesta linha a baixo, vc ira informar qual mensagem ira aparecer
## Para o usuario, quando ele abrir o navegador
auth_param basic realm | Proxy da Entranet - Entre com seu usuario e senha |
auth_param basic credentialsttl 10 hours
auth_param basic children 10
## ACL de GRUPOS ##
acl diretoria proxy_auth "/etc/squid/grupos/diretoria"
acl administrativo proxy_auth "/etc/squid/grupos/administrativo"
acl informatica proxy_auth "/etc/squid/grupos/informatica"
acl financeiro proxy_auth "/etc/squid/grupos/financeiro"
## ACL de MSN ##
acl usuariosMSN proxy_auth
acl MSN req_mime_type -i ^application/x-msn-messenger$
acl dll_MSN url_regex -i gateway.dll
acl dll2_MSN url_regex -i sqmserver.dll
acl msn_domains dstdomain .msn.com .msn.com:443 .hotmail.com .hotmail.com:443 .live.com .live.com:443 .microsoft.com .microsoft.com:443
#ACL's de update do Windows
#acl windows_update dstdomain download.windowsupdate.com download.microsoft.com update.microsoft.com
www.update.microsoft.com:443
#update.microsoft.com:443
## ALCs de SITE ##
acl sites_informatica url_regex -i "/etc/squid/regras/informatica"
acl sites_administrativo url_regex -i "/etc/squid/regras/administrativo"
acl sites_diretoria url_regex -i "/etc/squid/regras/diretoria"
acl sites_financeiro url_regex -i "/etc/squid/regras/financeiro"
## EXTENCOES BLOQUEADAS ##
acl extencoes urlpath_regex -i "/etc/squid/regras/extencoes"
## Bloqueando navegadores ##
acl firefox browser Firefox
acl chrome browser Chrome
acl opera browser Opera
hosts_file /etc/hosts
## Mailserver ##
acl mailserver url_regex mailserver
always_direct allow mailserver
#http_access allow windows_update
http_access allow msn_domains
http_access allow dll2_MSN
http_access allow dll_MSN usuariosMSN
http_access allow MSN
http_access allow ips_sem_senha
acl pass proxy_auth REQUIRED
http_access allow manager localhost
http_access deny administrativo !sites_administrativo
http_access deny financeiro !sites_financeiro
## Libero tudo da informatica ##
http_access allow informatica
## Libero tudo da diretoria ##
http_access allow diretoria !sites_diretoria
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
icp_access deny all
############## PORTA SQUID ##############
http_port 3128
visible_hostname proxy.Entranet.com.br
hierarchy_stoplist cgi-bin ?
############## LOGS ##############
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
############## DESEMPENHO/DISCO ##############
cache_mem 512 MB
maximum_object_size_in_memory 8 KB
memory_replacement_policy lru
cache_replacement_policy lru
cache_dir ufs /var/spool/squid 60000 16 256
### Tamanho maximo do arquivo que ira ser armazenado em cache ###
maximum_object_size 200000 KB
icp_access allow all
### Limpa cache ###
cache_swap_low 90
cache_swap_high 95
### Icones ###
icon_directory /usr/share/squid/icons
short_icon_urls on
### Errors configuracao ###
error_directory /usr/share/squid/errors/Portuguese
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern . 0 20% 4320
#Cache windowsupdate
#refresh_pattern windowsupdate.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
#refresh_pattern download.microsoft.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
#refresh_pattern
www.download.microsoft.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
#refresh_pattern
www.microsoft.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
#refresh_pattern au.download.windowsupdate.com/.*\.(cab|exe|dll|msi) 4320 100% 43200 reload-into-ims
#refresh_pattern download.windowsupdate.com/.*\.(cab|exe|dll|msi) 4320 100% 43200 reload-into-ims
#refresh_pattern
www.download.windowsupdate.com/.*\.(cab|exe|dll|msi) 4320 100% 43200 reload-into-ims
#Cache atulizacao avira
#refresh_pattern personal.avira-update.com/.*\.(cab|exe|dll|msi|gz) 10080 100% 43200 reload-into-ims
debug_options ALL,2
icp_port 3130
coredump_dir /var/spool/squid
###### FIM DO ARQUIVO SQUID.CONF ######