giuliano.santos
(usa Ubuntu)
Enviado em 17/03/2010 - 12:12h
Boa tarde Wred,
segue o .conf
http_port 3128
visible_hostname proxy
cache_mem 64 MB
maximum_object_size_in_memory 128 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
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 redelocal src 192.168.80.0/24
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 80 # http
acl Safe_ports port 53
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 Safe_ports port 18524 # torrent
acl Safe_ports port 3550 # cam
acl Safe_ports port 22 # putty
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
# Controle de acesso
# define os horários nos quais serão permitidos acessar os
# sites que foram bloqueados.
acl almoco-onzeemeia time SMTWHFA 11:30-12:30
acl almoco-meiodia time SMTWHFA 12:00-13:00
acl almoco-meiodiaemeia time SMTWHFA 12:30-13:30
acl almoco-umahora time SMTWHFA 13:00-14:00
acl liberado-manha time SMTWHFA 08:00-11:30
acl liberado-tarde time SMTWHFA 13:30-18:00
# é necessário definir o nome e ip de cada máquina
# que será tratada pelo proxy.
# se colocar diferentes valores (em linhas diferentes)
# com a mesma acl, o squid vai combinar tudo em uma
# lista.
acl funcionarios-onzeemeia src 192.168.80.19
acl funcionarios-meiodiaemeia src 192.168.80.18
acl funcionarios-meiodia src 192.168.80.211
acl funcionarios-umahora src 192.168.80.100
acl funcionarios-manha src 192.168.80.51
# acesso total
#http_access allow redelocal
#acl acesso-total src 192.168.80.0/24
acl acesso-total src 192.168.80.21
http_access allow acesso-total
http_access allow funcionarios-onzeemeia almoco-onzeemeia
http_access allow funcionarios-meiodia almoco-meiodia
http_access allow funcionarios-meiodiaemeia almoco-meiodiaemeia
http_access allow funcionarios-umahora almoco-umahora
http_access allow funcionarios-manha liberado-manha
http_access allow funcionarios-tarde liberado-tarde
acl liberado url_regex -i "/etc/squid/liberado.txt"
http_access allow liberado
acl proibidos dstdom_regex "/etc/squid/proibidos.txt"
http_access deny proibidos
acl redelocal src 192.168.80.0/24
http_access allow localhost
http_access allow redelocal
http_access deny all