[15] Comentário enviado por
ricardo_TI em 26/07/2012 - 15:34h:
Segue squid.conf
http_port 3128 transparent
visible_hostname internet
error_directory /usr/share/squid/errors/Portuguese
hierarchy_stoplist cgi-bin?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 2048 MB
maximum_object_size_in_memory 200 KB
maximum_object_size 3 GB
minimum_object_size 0 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
cache_replacement_policy lru
memory_replacement_policy lru
logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
access_log /var/log/squid/access.log squid
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid 5048 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_swap_log /var/spool/squid/swap.log
cache_mgr info@artemidia.net
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 10 20% 2280
refresh_pattern ^gopher: 10 0% 1440
refresh_pattern . 15 20% 2280
# Definicao das ACLs # ACLs sao responsaveis por limitar as portas que o proxy ira usar
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 192.168.0.0/255.255.255.0
acl redelocal src 192.168.0.0/24
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80
# Grupos de Acesso
acl Diretoria src "/etc/squid/ip.diretoria"
acl Funcionarios src "/etc/squid/ip.funcionarios"
#acl Bloqueados src "/etc/squid/ip.bloqueado"
# Sites Permitido/Negado
acl SitesPermitido url_regex -i "/etc/squid/sites.permitido"
acl SitesNegado url_regex -i "/etc/squid/sites.negado"
acl PalavrasNegada url_regex -i "/etc/squid/palavras.negado"
# Ativando as ACLs Personalizadas
http_access allow SitesPermitido
http_access deny SitesNegado
http_access deny PalavrasNegada
http_access allow Diretoria !SitesNegado
http_access allow Funcionarios
http_access deny all
#Controle de Banda
#acl grupo1 src "/etc/squid/grupo1"
#acl grupo2 src "/etc/squid/grupo2"
#acl grupo3 src "/etc/squid/grupo3.ilimitado"
#delay_pools 3
#delay_class 1 2
#delay_parameters 1 1048576/1048576 1048576/1048576
#delay_parameters 1 -1/-1 -1/-1 |Sem limite de banda
#delay_access 1 allow grupo1
#delay_class 2 2
#delay_parameters 2 1048576/1048576 1048576/1048576
#delay_access 2 allow grupo2
#delay_class 3 2
#delay_parameters 3 -1/-1 -1/-1
#delay_access 3 allow grupo3
# Bloqueando Madrugada
#acl madrugada time 00:00-06:00
#http_access deny madrugada
# Travando micros locais para usaram o proxy #****Importante essas duas LInhas estarem no final do arquivo***
http_access allow localhost
http_access allow redelocal
Muito obrigado pela atenção.
Att,