mschott
(usa Debian)
Enviado em 22/08/2011 - 16:26h
ainda não domino o squid nem o iptables, o que eu preciso alterar?
vou passar meu squid.conf
http_port 3128
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache_dir ufs /var/cache/squid 1000 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
visible_hostname Intranet
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 1935 # 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 minha_rede src 192.168.0.0/255.255.255.0
acl minha_rede_wireless src 172.16.0.0/255.255.255.0
acl LIBERA_IP src "/etc/squid/listas/libera_ip.txt"
acl ACESSA_FACEBOOK src "/etc/squid/listas/acessa_facebook.txt"
acl ACESSA_ORKUT src "/etc/squid/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/squid/listas/nega_site.txt"
acl NEGA_SITE_GAMES dstdomain "/etc/squid/listas/nega_site_games.txt"
acl LIBERA_PALAVRA url_regex -i "/etc/squid/listas/libera_palavra.txt"
acl LIBERA_SITE dstdomain "/etc/squid/listas/libera_site.txt"
acl NEGA_PALAVRA url_regex -i "/etc/squid/listas/nega_palavra.txt"
acl NEGA_IP src "/etc/squid/listas/nega_ip.txt"
########################################
### Acl de destinos com saida direta ###
########################################
acl ips_saida_direta dst "/etc/squid/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/squid/listas/libera_banda_baixa.txt"
acl banda_media src "/etc/squid/listas/libera_banda_media.txt"
acl banda_alta src "/etc/squid/listas/libera_banda_alta.txt"
acl acessayoutube src "/etc/squid/listas/acessa_youtube.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 CONNECT method CONNECT
no_cache deny QUERY
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny NEGA_IP !LIBERA_IP
always_direct allow ips_saida_direta
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 deny all
http_reply_access allow all
icp_access allow manager localhost minha_rede
cache_effective_user squid
httpd_accel_port 80
httpd_accel_host virtual
httpd_accel_single_host off
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
http_access deny proibir_musica
http_reply_access deny streaming
error_directory /etc/squid/errors/Portuguese
delay_pools 4
delay_class 1 1
delay_parameters 1 24000/24000 24000/24000
delay_access 1 allow wireless
delay_class 2 1
delay_parameters 2 48000/48000 48000/48000
delay_access 2 allow banda_alta
delay_class 3 1
delay_parameters 3 32000/32000 32000/32000
delay_access 3 allow banda_media
delay_class 4 1
delay_parameters 4 24000/24000 24000/24000
delay_access 4 allow banda_baixa
coredump_dir /var/cache/squid
shutdown_lifetime 3 seconds