ldaniloo
(usa Ubuntu)
Enviado em 29/04/2011 - 10:10h
Bom dia
Gostaria de ajuda fiz um squid tudo traquilo funcionando ta bloqueando sites e tals
mais agora surgiu-me outra necessidade que fazer bloqueio de dowloand por extensão como tambem bloqueio por palavras digitas na pesquisa Ex pelo GOOGLE
Segue mue SQUID Com Ta COnfigurado
http_port 3128
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
access_log /var/log/squid/access.log squid
hosts_file /etc/hosts
auth_param basic program /usr/lib/squid/pam_auth
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
# ----------------------------- AQUI COMECA TUDO ------------------------------- OBS SE VIRE
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.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 # https, snews
acl SSL_ports port 873 # rsync
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 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
# ACLS PRONTAS E FUNCIONANDO
acl usuarios_bloqueados proxy_auth "/etc/squid/acl/usuarios_bloqueados.txt"
acl usuarios_liberados proxy_auth "/etc/squid/acl/usuarios_liberados.txt"
acl sites_bloqueados url_regex -i "/etc/squid/acl/sites_bloqueados.txt"
acl block_palavras urlpath_regex "/etc/squid/acl/block_palavras.txt"
# ACLS TESTE
#acl sites_bloqueados dstdomain "/etc/squid/acl/sites_bloqueados.txt"
#acl sites_liberados dst "/etc/squid/acl/sites_liberados.txt"
#acl sites_liberados url_regex -i "/etc/squid/acl/sites_liberados.txt"
# HTTP_ACCESS FUNCIONANDO
http_access allow usuarios_bloqueados !sites_bloqueados
http_access deny block_palavras
http_access deny manager
http_access allow manager localhost
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access allow localhost
http_access deny all
http_access deny CONNECT !SSL_ports
# HTTP_ACCESS TESTE
#http_access allow usuarios_liberados sites_liberados
#http_access deny sites_bloqueados
#http_access allow sites_liberados
#http_access deny download
http_reply_access allow all
icp_access allow all
#error_directory /etc/squid/mess_acesso_negado