+ Responder ao Tópico



  1. #1

    Padrão SQUID não Bloqueia????

    Colegas boa tarde, meu squid está rodando perfeitamente mais não consigo bloquear "sites" e "palavras", segue meu squid.conf, se alguem puder me ajudar agradeço.


    http_port 3128

    hierarchy_stoplist cgi-bin ?
    acl QUERY urlpath_regex cgi-bin \?
    cache deny QUERYacl apache rep_header Server ^Apache
    broken_vary_encoding allow apache

    cache_mem 128 MB
    cache_swap_low 95
    cache_swap_high 98

    maximum_object_size 16384 KB
    maximum_object_size_in_memory 20 KB

    cache_dir ufs /var/spool/squid 200 16 256
    access_log /var/log/squid/access.log squid

    auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
    auth_param basic children 15
    auth_param basic realm Digite seu Login e Senha:
    auth_param basic credentialsttl 10 seconds

    refresh_pattern ^ftp: 1440 20% 10080
    refresh_pattern ^gopher: 1440 0% 1440
    refresh_pattern . 0 20% 4320

    acl password proxy_auth REQUIRED
    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
    acl Safe_ports port 80 # http
    acl Safe_ports port 21 # ftp
    acl Safe_ports port 443 563 # 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 sites dstdomain "/etc/squid/sites"
    acl palavras url_regex -i "/etc/squid/palavras"
    acl CONNECT method CONNECT

    http_access allow password
    http_access allow manager localhost
    http_access deny manager
    http_access deny all
    http_access deny !Safe_ports
    http_access deny CONNECT !SSL_ports
    http_access deny sites
    http_access deny palavras

    http_reply_access allow all

    icp_access allow all

    coredump_dir /var/spool/squid

  2. #2

    Padrão

    tente botar assim pra ver.... a acl all por ultimo

    http_access allow password
    http_access allow manager localhost
    http_access deny manager
    http_access deny !Safe_ports
    http_access deny CONNECT !SSL_ports
    http_access deny sites
    http_access deny palavras
    http_access deny all

    se nao funcionar tente assim tbm com o deny all por ultimo

    acl exe url_regex -i .exe .mp3 .swf

    http_access deny exe

    blz

  3. #3

    Padrão

    voce precisa primeiro fazer as regras de DENY !! depois pedir autenticação !!

    tenta assim

    Código :
    http_access allow manager localhost
    http_access deny manager
     
    http_access deny sites
     http_access deny palavras
     
    http_access deny !Safe_ports
    http_access deny CONNECT !SSL_ports
     
    http_access allow password
    http_access deny all

    a regra "deny all" precisa ser a ULTIMA regra !!

    o squid avalia as regras de forma "if true"

  4. #4

    Padrão

    o post nãao é nem meu e deu vontade de agradecer!! rs

    apt-get update conhecimento

    abraços

  5. #5

    Padrão

    esqueci de um detalhe,

    a parte do 'manager' deve ficar acima de todas as regras pois é possivel dar um "PURGE" em algum se necessario... e tambem para alguns acessos do cachemgr se necessario...

  6. #6

    Padrão

    alexandrecorrea
    Beleza cara funfou perfeito valeu, muito agradecido.