Configuração Squid

 #Porta de acesso do Proxy
http_port 3128 transparent
#Nome do Host
visible_hostname Carpegieri_Torezani

#cache Memoria Ram
cache_mem 32 MB
maximum_object_size_in_memory 64 KB

#Maximo tamanho de arquivo em Cache
maximum_object_size 512 MB

#Minimo tamanho de arquivo em Cache

minimum_object_size 10 KB
cache_swap_low 90
cache_swap_high 95

#cahe HD
cache_dir ufs /var/spool/squid 10240 16 256
#Log com acesso dos sites
cache_access_log /var/log/squid/access.log
refresh_pattern ^ftp: 15 20% 2280
refresh_pattern ^gopher: 15 0% 2280
refresh_pattern . 15 20% 2280

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.0
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # 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 Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT

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

#Liberar acesso rede local
acl redelocal src 192.168.1.0/24
http_access allow localhost
http_access allow redelocal

 

Controle de Banda
#Limita banda(download) Sem Limite
acl day time 07:00-23:59
delay_pools 2

#Limita banda(download) em 13k
acl TOPO_13K src 192.168.1.0/24
#parametros para o controle de banda
delay_class 1 3
delay_access 1 allow TOPO_13K
delay_parameters 1 40000/40000 -1/-1 13000/13000

 

#Libera toda Banda após o Horário definido na ACL day
delay_class 2 2
delay_access 2 allow day
delay_access 2 deny !day