+ Responder ao Tópico



  1. #1

    Padrão Liberando maquina no Squid... e otras cositas más :P

    o galera... tenho um proxy squid que tem as seguites regras:

    cache_dir ufs /var/log/squid/cache 256 16 256
    visible_hostname www.dominioempresa.com.br
    half_closed_clients off
    cache_mem 40 MB
    cache_mgr [email protected]
    cache_effective_user nobody
    memory_pools off
    acl blockeds url_regex -i /etc/squid/block.txt
    acl unblockeds url_regex -i /etc/squid/unblock.txt
    acl porn url_regex "/etc/squid/porn.txt"
    acl noporn url_regex "/etc/squid/noporn.txt"
    acl all src 0.0.0.0/0
    acl manager proto cache_object
    acl intranet src 192.168.0.0/24
    acl intranetf src 192.168.1.0/24
    #acl intranet src 192.168.1.67/24
    acl intracleiton src 192.168.1.93/24
    #acl intranet src 192.168.1.32/24
    #acl intranet src 192.168.1.150/24
    #acl intranet src 192.168.1.152/24
    #acl intranet src 192.168.10.0/24
    acl intraext src 200.0.0.0
    #acl intranet src 200.096.178.127/24
    acl localhost src 127.0.0.1/24
    acl bloqipa src 192.168.0.2/24
    #acl bloqip src 192.168.0.15/24
    acl bloqipb src 192.168.0.3/24
    acl bloqipc src 192.168.1.152/24
    acl SSL_ports port 443 563 2100
    acl Safe_ports port 80 # http
    acl Safe_ports port 85 # http
    acl Safe_ports port 81 # http
    acl Safe_ports port 8080 # http
    acl Safe_ports port 55000 # http
    acl Safe_ports port 3389 # http
    #acl Safe_ports port 21 # http
    acl Safe_ports port 3998 # Security Connextion
    acl Safe_ports port 8383 # http-enter-net
    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 1723 # VPN
    acl Safe_ports port 4662 # e-mule
    acl Safe_ports port 4672
    acl Safe_ports port 443 563 2100 9875 # e-mule
    acl Locked_ports port 1210-3997
    acl CONNECT method CONNECT
    acl QUERY urlpath_regex cgi-bin \?
    acl WORKING time 00:00-23:59
    #acl SITE1 dstdomain .desktop.kazza.com .desktop.kazaa.com
    #http_access deny WORKING SITE1
    http_access deny WORKING
    http_access deny bloqipa bloqipb bloqipc
    http_access deny manager
    http_access deny !Safe_ports
    http_access deny Locked_ports
    http_access deny blockeds !unblockeds
    http_access allow porn !WORKING
    #deny_info ERR_NO_PORNO porn WORKING
    http_access deny porn !noporn WORKING
    http_access allow manager localhost
    http_access allow intranet intranetf intracleiton intraext
    acl danfile url_regex -i \.mpeg$ \.mpe$ \.mpg$ \.wav$ \.avi$ \.exe$ \.MP3$ \.zip$
    http_access deny danfile
    http_access deny all
    http_port 3128
    httpd_accel_host virtual
    httpd_accel_port 80
    httpd_accel_with_proxy on
    httpd_accel_uses_host_header on
    icp_port 0
    reload_into_ims on
    hierarchy_stoplist cgi-bin ?
    no_cache deny QUERY
    fqdncache_size 2048 bytes
    dns_nameservers 192.168.0.1
    hierarchy_stoplist hotmail.com
    cache_access_log /var/log/squid/access.log
    cache_log /var/log/squid/cache.log
    cache_store_log /var/log/squid/store.log
    e estou com uma duvidas:
    tem como deixar minha maquina livre dessas regras?? pois quero acessar a net sem restrições. :P

    para que serve estas regras?
    hierarchy_stoplist hotmail.com
    httpd_accel_host virtual
    httpd_accel_port 80
    httpd_accel_with_proxy on
    httpd_accel_uses_host_header on
    acl CONNECT method CONNECT
    memory_pools off

    thnks

  2. #2

    Padrão Re: Liberando maquina no Squid... e otras cositas más :P

    acl maqliberada src 192.168.0.10/255.255.255.255
    http_access allow maqliberada

  3. #3
    alexandresamorim
    Visitante

    Padrão Liberando maquina no Squid... e otras cositas más :P

    Bom dia gostaria de saber se eu quero por exemplo liberar mais de uma

    Repito a regra ou tem uma outra?

  4. #4
    Bili
    Visitante

    Padrão Ta ai

    acl maqliberada src ip1 ip2 ip3
    http_access allow maqliberada

    se for uma clase toda de ip
    ex.: classe ip é
    192.168.0.*

    utiliza 192.168.0.0/24

    Bili

  5. #5
    alexandresamorim
    Visitante

    Padrão Liberando maquina no Squid... e otras cositas más :P

    Obrigado. deu certo repetindo a regra mas fica melhor colocando tudo em uma regra só.....


    Obrigado
    Alexandre Amorim

  6. #6

    Padrão Liberando maquina no Squid... e otras cositas más :P

    Melhor ainda é se você coloca tudo em uma regra só e lendo um arquivo texto.

    Código :
    acl usuarios src "/etc/squid/lists/usuarios"
    http_access allow usuarios

    Quanto ao significado das tags, é só ler o próprio squid.conf (descomentado).


    Abraços!

  7. #7

    Padrão Liberando maquina no Squid... e otras cositas más :P

    fiz uma modificações no meu squid.conf e agora ele não esta bloqueando nada, coloquei Allow para a minha maquina q a 192.168.0.15, mas troquei o IP dela pra testar as regras, mas continua tudo liberado, ja coloquei endereços nos arquivos q estão com a lista de bloqueados (porn.txt) e nada.. tudo liberado :toim: , ja dei reload, restart, stop e apos start, matei o processo com killall e nada, por fim reiniciei a maquina e nada ainda, por issu estou pedindo a ajuda de vcs novamente ops:


    edited: me lembrei agora, mesmo depois de um SQUID STOP todo mundo continua navegando :?

    cache_dir ufs /var/log/squid/cache 256 16 256
    visible_hostname www.siteempresa.com.br
    half_closed_clients off
    cache_mem 40 MB
    cache_mgr [email protected]
    cache_effective_user nobody
    memory_pools off
    acl blockeds url_regex -i "/etc/squid/block.txt"
    acl unblockeds url_regex -i "/etc/squid/unblock.txt"
    acl porn url_regex "/etc/squid/porn.txt"
    acl noporn url_regex "/etc/squid/noporn.txt"
    acl all src 0.0.0.0/0
    acl manager proto cache_object
    acl intranet src 192.168.0.0/24
    acl intranetf src 192.168.1.0/24
    #acl intranet src 192.168.1.67/24
    acl intracleiton src 192.168.1.93/24
    #acl intranet src 192.168.1.32/24
    #acl intranet src 192.168.1.150/24
    #acl intranet src 192.168.1.152/24
    #acl intranet src 192.168.10.0/24
    acl intraext src 200.0.0.0
    #acl intranet src 200.096.178.127/24
    acl localhost src 127.0.0.1/24
    acl bloqipa src 192.168.0.2/24
    #acl bloqip src 192.168.0.15/24
    acl bloqipb src 192.168.0.3/24
    acl bloqipc src 192.168.1.152/24
    acl SSL_ports port 443 563 2100
    acl Safe_ports port 80 # http
    acl Safe_ports port 85 # http
    acl Safe_ports port 81 # http
    acl Safe_ports port 8080 # http
    acl Safe_ports port 55000 # http
    acl Safe_ports port 3389 # http
    #acl Safe_ports port 21 # http
    acl Safe_ports port 3998 # Security Connextion
    acl Safe_ports port 8383 # http-enter-net
    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 1723 # VPN
    acl Safe_ports port 4662 # e-mule
    acl Safe_ports port 4672
    acl Safe_ports port 443 563 2100 9875 # e-mule
    acl Locked_ports port 1210-3997
    acl CONNECT method CONNECT
    acl QUERY urlpath_regex cgi-bin \?
    acl WORKING time 00:00-23:59
    #acl SITE1 dstdomain .desktop.kazza.com .desktop.kazaa.com
    acl intranetmpc src 192.168.0.15/24
    http_access allow intranetmpc
    #http_access deny WORKING SITE1
    http_access deny WORKING
    http_access deny bloqipa bloqipb bloqipc
    http_access deny manager
    http_access deny !Safe_ports
    http_access deny Locked_ports
    #http_access deny blockeds !unblockeds
    #http_access allow porn !WORKING
    #deny_info ERR_NO_PORNO porn WORKING
    http_access deny porn !noporn
    http_access allow manager localhost
    http_access allow intranet intranetf intracleiton intraext
    acl danfile url_regex -i \.mpeg$ \.mpe$ \.mpg$ \.wav$ \.avi$ \.exe$ \.MP3$ \.zip$
    http_access deny danfile
    http_access deny all
    http_port 3128
    httpd_accel_host virtual
    httpd_accel_port 80
    httpd_accel_with_proxy on
    httpd_accel_uses_host_header on
    icp_port 0
    reload_into_ims on
    hierarchy_stoplist cgi-bin ?
    no_cache deny QUERY
    fqdncache_size 2048 bytes
    dns_nameservers 192.168.0.1
    hierarchy_stoplist hotmail.com
    #cache_peer 200.181.45.6 parent 3128 3130
    cache_access_log /var/log/squid/access.log
    cache_log /var/log/squid/cache.log
    cache_store_log /var/log/squid/store.log

  8. #8

    Padrão Liberando maquina no Squid... e otras cositas más :P

    Minha Nossa Senhora do Capacete Vermelho... seu squid.conf precisa de uma limpeza né?

    É o seguinte: O Squid lê as requisições e vai tentando encaixá-la nas ACL's. Caso o Squid não consiga encontrar uma ACL para casar com a requisição, ele LIBERA o acesso. Essa pode ser a razão pelos seus usuários estarem navegando. Para contornar tal problema, adicione ao final dos seus http_access:

    Código :
    http_access deny all

    Outra coisa que pode estar justificando é que você está rodando NAT no seu servidor. Sendo assim você pára o processo, mas os usuários continuam navegando, pois eles estão passando pelo NAT, e não pelo Squid. Acredito mais nessa tése, mas faça um teste.

    Abra um terminal e execute o comando:

    Código :
    # tail -f /var/log/squid/access.log

    Isso com o Squid rodando, ok? E então observe se aparecem as requisições dos seus clientes...

    Observação:Estou presumindo que você não tenha regras de redirecionamento no firewall (proxy transparente).


    Um grande abraço!