rubens_web
(usa Debian)
Enviado em 11/01/2012 - 11:42h
segue meu squid.conf
---------------------
http_port 3128 transparent
visible_hostname dhcpserver
##########CACHE
#------------------------------------------
cache_mem 512 MB
maximum_object_size_in_memory 64 KB
maximum_object_size 512 MB
minimum_object_size 0 KB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid 2048 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_log /var/log/squid/storage.log
#-----------------------------------------
##########ACL DE CONFIG.
#----------------------------------------------------------------------------------------------
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 SSL_ports port 443 563
acl Safe_ports port 20 21 22 80 8080 443 563 70 210 280 488 591 777 631 873 901 5018 1025-65535
acl purge method PURGE
acl CONNECT method CONNECT
#-----------------------------------------------------------------------------------------------
##########PORTAS ADICIONAIS LIBERADAS
#-----------------------------------------------------------------------------
#Sistema ratreamento CONTROL LOG
acl Safe_ports port 6521 6522 6523 6623 6624
#SISTEMA INTERNO DE CAMERAS
acl Safe_ports port 3130 6036 6061 4551 5551
#-----------------------------------------------------------------------------
##########ARQUIVOS DE CONFIG.
#------------------------------------------------------------------------
acl sites_liberados url_regex -i "/etc/squid/regras/sitesliberados.txt"
acl sites_bloqueados url_regex -i "/etc/squid/regras/sitesbloqueados.txt"
acl palavras_negadas url_regex -i "/etc/squid/regras/palavrasnegadas.txt"
acl libera_temp url_regex -i "/etc/squid/regras/liberatemporarios.txt"
#------------------------------------------------------------------------
##########LIBERA IP ACESSAR INTERNET
#
# 066 - SERVIDOR CAM1
# 102 - GALERA
# 103 - RAPHAEL (DIRETORIA)
# 104 - CAROLINA (DIRETORIA)
# 105 - JOSE MARIA
# 106 - GIRARDELE
# 107 - FALCAO
# 108 - LUIZ OLIVEIRA
# 109 - ELAINE
# 110 - LOSANGELA
# 112 - DEBORA
# 114 - RUBENS (TI)
# 115 - ALEX
# 118 - FLAVIO
# 119 - MACEDO
# 120 - RAQUEL
# 121 - LUIZ SILVA
# 125 - RENATA
# 126 - ELAINE
# 127 - ALEX (IPHONE)
# 128 - RAPHAEL (IPHONE)
# 130 - CLAUDIO
# 148 - MIGUEL-ALSTOM (CABO)
# 149 - JEHAD-NUCCI
#
acl redelocal src 192.168.1.114 192.168.1.102 192.168.1.105 192.168.1.106 192.168.1.107 192.168.1.108 192.168.1.110 192.168.1.112 192.168.1.118 192.168.1.119 192.168.1.120 192.168.1.121 192.168.1.126 192.168.1.130 192.168.1.148/255.255.255.255
acl redelocal2 src 192.168.1.114 192.168.1.66 192.168.1.103 192.168.1.104 192.168.1.115 192.168.1.127 192.168.1.128 192.168.1.149/255.255.255.255
acl libera_msn src 192.168.1.114 192.168.1.103 192.168.1.104 192.168.1.115 192.168.1.127 192.168.1.128/255.255.255.255
acl redetemp src 192.168.1.125 192.168.1.126 192.168.1.148/255.255.255.255
##########BLOQUEIA MSN/ORKUT
#--------------------------------------------------------------------------------------------
acl horario_liberado time MTWHF 12:00-13:30
acl msn_port port 1863
acl msn_port2 port 5223
acl serv_msn dst 200.46.110.0/24
acl serv_msn dst 64.4.13.0/24
acl app_msn req_mime_type -i ^application/x-msn-messenger$
acl msn_messenger url_regex -i gateway.dll
acl msn_dom dstdomain loginnet.passport.com
acl msn_dom dstdomain messenger.msn.com
acl msn_dom dstdomain messenger.msn.ca
acl msn_dom dstdomain messenger.msn.net
acl msn_dom dstdomain im.sapo.pt
acl msn_dom dstdomain webmessenger.msn.com
acl msn_dom dstdomain c.msn.com
acl msn_dom dstdomain config.messenger.msn.com
acl msn_dom dstdomain login.live.com
acl msn_dom dstdomain amsn-project.net
acl trava_msn_orkut url_regex -i "/etc/squid/regras/trava_msn_orkut.txt"
acl domain_msn_orkut dstdomain "/etc/squid/regras/trava_msn_orkut.txt"
http_access deny CONNECT msn_port !libera_msn !horario_liberado
http_access deny msn_port !libera_msn !horario_liberado
http_access deny msn_port2 !libera_msn !horario_liberado
http_access deny serv_msn !libera_msn !horario_liberado
http_access deny app_msn !libera_msn !horario_liberado
http_access deny msn_dom !libera_msn !horario_liberado
http_access deny msn_messenger !libera_msn !horario_liberado
http_access deny trava_msn_orkut !libera_msn !horario_liberado !redetemp
header_access Accept-Endoding deny domain_msn_orkut !libera_msn !horario_liberado !redetemp
#---------------------------------------------------------------------------------------------
#####BLOQUEIA ULTRASURF
#--------------------------------------------------------------------------------------
#Declara ACL negando solicitacoes por IP
acl ultrasurf dstdom_regex -i ([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}($|:.+|/))
acl ip_ultrasurf url_regex -i "/etc/squid/regras/ip_ultrasurf.txt"
#Nega a conexao
http_access deny CONNECT ultrasurf
http_access deny ip_ultrasurf
#--------------------------------------------------------------------------------------
##########LIBERA E BLOQUEIA ARQUIVOS DE CONFIG.
#--------------------------------------------------------------------------------
http_access allow redelocal !palavras_negadas !sites_bloqueados !trava_msn_orkut
http_access allow redelocal2
http_access deny libera_temp !redetemp
#http_access allow post
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
##########Linha abaixo libera rede para todos
#http_access allow all
##########Linha abaixo deve ser comentada se a de cima estiver abilitada
http_access deny all !sites_liberados !libera_temp
error_directory /usr/share/squid/errors/Portuguese
#--------------------------------------------------------------------------------
delay_pools 1
delay_class 1 2
delay_parameters 1 60000/60000 60000/60000
delay_access 1 allow redelocal