mschott
(usa Debian)
Enviado em 24/11/2011 - 13:49h
meu squid:
#Recommended minimum configuration:
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
cl minha_rede src 192.168.0.0/24
acl minha_rede_wireless src 172.16.0.0/24
#acl radioterapia src 192.168.0.140
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
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 LIBERA_IP src "/etc/squid3/listas/libera_ip.txt"
acl ACESSA_FACEBOOK src "/etc/squid3/listas/acessa_facebook.txt"
acl ACESSA_ORKUT src "/etc/squid3/listas/acessa_orkut.txt"
acl semyoutube url_regex -i youtube yutube iutube iutubi
acl SEM_FACEBOOK url_regex -i facebook facebok
acl SEM_ORKUT url_regex -i orkut orcut orkute orkuti orkutt
acl NEGA_SITE dstdomain "/etc/squid3/listas/nega_site.txt"
acl NEGA_SITE_GAMES dstdomain "/etc/squid3/listas/nega_site_games.txt"
acl LIBERA_PALAVRA url_regex -i "/etc/squid3/listas/libera_palavra.txt"
acl LIBERA_SITE dstdomain "/etc/squid3/listas/libera_site.txt"
acl NEGA_PALAVRA url_regex -i "/etc/squid3/listas/nega_palavra.txt"
acl NEGA_IP src "/etc/squid3/listas/nega_ip.txt"
#acl acessoremoto dstdomain "/etc/squid3/listas/acessoremoto.txt"
acl streaming rep_mime_type ^video/x-ms-asf
acl proibir_musica urlpath_regex -i \.avi$ \.mp3$ \.wma$ \.mov$ \.mpg$ \.mpeg$ \.ram$ \.ra$ \.asx$ \.asf$ \.wmv$
########################################
### Acl de destinos com saida direta ###
########################################
acl ips_saida_direta dst "/etc/squid3/listas/ips-saida-direta"
#acl farmacia src 192.168.0.48 192.168.0.58 192.168.0.59 192.168.0.60 192.168.0.70
#acl libera_horario_farmacia time 08:00-18:00
#acl cti src 192.168.0.71
#acl clinica src 192.168.0.78
#acl libera_horario time SMTWHFA 07:00-22:00
acl wireless src 172.16.0.0
acl banda_baixa src "/etc/squid3/listas/libera_banda_baixa.txt"
acl banda_media src "/etc/squid3/listas/libera_banda_media.txt"
acl banda_alta src "/etc/squid3/listas/libera_banda_alta.txt"
acl acessayoutube src "/etc/squid3/listas/acessa_youtube.txt"
# http_access deny all
#
#Recommended minimum configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
#
# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
http_access deny NEGA_IP !LIBERA_IP
always_direct allow ips_saida_direta
http_access deny proibir_musica
http_reply_access deny streaming
#http_access deny acessoremoto !radioterapia
http_access deny semyoutube !minha_rede_wireless !acessayoutube
http_access deny SEM_ORKUT !minha_rede_wireless !ACESSA_ORKUT
http_access deny SEM_FACEBOOK !minha_rede_wireless !ACESSA_FACEBOOK
http_access deny NEGA_PALAVRA !LIBERA_PALAVRA !LIBERA_IP
http_access deny NEGA_SITE !LIBERA_SITE !LIBERA_IP
http_access deny NEGA_SITE_GAMES !LIBERA_SITE !LIBERA_IP
http_access allow LIBERA_PALAVRA LIBERA_IP
http_access allow minha_rede
http_access allow minha_rede_wireless
#http_access allow radioterapia
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#http_access allow localnet
http_access allow localhost
# And finally deny all other access to this proxy
http_access deny all
icp_access deny all
htcp_access deny all
http_port 192.168.0.1:3128 transparent
http_port 172.16.0.1:3128 transparent
cache_dir ufs /var/spool/squid3 2048 16 256
logfile_rotate 6
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern . 0 20% 4320
shutdown_lifetime 3 seconds
visible_hostname proxy.hananery.com.br
delay_class 1 1
delay_class 2 1
delay_class 3 1
delay_class 4 1
delay_access 1 allow wireless
delay_access 2 allow banda_alta
delay_access 3 allow banda_media
delay_access 4 allow banda_baixa
delay_parameters 1 24000/24000 24000/24000
delay_parameters 2 48000/48000 48000/48000
delay_parameters 3 32000/32000 32000/32000
delay_parameters 4 24000/24000 24000/24000
icp_port 3130
é mais ou menos isso ai!