+ Responder ao Tópico



  1. #1

    Padrão squid com 3 placas de rede

    OLá pessoal alguem poderia me ajudar a fazer funcionar o squid com 3 placas de rede ?
    vou explicar o cenário: O que eu fiz foi colocar os clientes da lan numa placa de rede (eth0) e os clientes wireless numa outra placa de rede (eth2)

    eth1 - velox
    eth0 - rede local 1 (lan)
    eth2 - rede local 2 (clientes na interface wireless)

    Até aí tudo bem , só que quando iniciei serviço squid , somente o pessoal da eth0 navegou , pensei que era só redirecionar tudo que chegasse na eth2 e jogar pro squid. Assim : iptables -t nat -A PREROUTING -i eth2 -p tcp --dport 80 -j REDIRECT --to-port 3128.

    Entretanto não funcionou.....é preciso alterar alguma coisa no squid.conf ?

    A internet funciona normalmente sem o squid, só quando ligo o squid o pessoal da eth2 não funciona.

    NO meu squid.conf já liberei todas as redes.


    abraçoss

  2. #2

    Padrão

    tenta usar assim:


    iptables -t nat -A PREROUTING -o eth3 -p tcp --dport 80 -j DNAT --to-destination 172.200.200.1:3128

    onde eth3 = interface de internet
    172.200.200.1:3128 : ip do squid e porta

  3. #3

    Padrão

    Boa tarde a todos!

    Perdoem-me o intrometimento ao assunto, mas leandro17, seria possível você postar o script do arquivo squid.conf do seu proxy?

    Muitas vezes o problema se encontra nele.

    abracos

  4. #4

    Padrão

    meu squid.conf:

    http_port 10.0.1.1:3128
    http_port 10.0.3.1:3128
    http_port 10.0.4.1:3128
    http_port 10.0.5.1:3128
    http_port 10.0.6.1:3128
    http_port 10.0.7.1:3128
    http_port 10.0.8.1:3128
    http_port 10.0.9.1:3128
    http_port 10.0.10.1:3128

    visible_hostname on
    visible_hostname alegriapontonet
    cache_mem 400 MB
    cache_swap_low 95
    cache_swap_high 98
    cache_effective_user squid
    cache_effective_group squid
    maximum_object_size 4096 KB
    maximum_object_size_in_memory 20 KB
    cache_dir ufs /usr/local/squid/cache 1000 16 256
    cache_access_log /usr/local/squid/var/logs/access.log
    cache_store_log /usr/local/squid/var/logs/store.log
    error_directory /usr/local/squid/share/errors/Portuguese
    dns_nameservers 200.246.46.134 200.189.80.5 200.242.50.23
    hierarchy_stoplist cgi-bin ?
    acl QUERY urlpath_regex cgi-bin \?
    no_cache deny QUERY
    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
    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 rede_interna src 10.0.1.0/255.255.255.0
    acl rede_interna2 src 10.0.3.0/255.255.255.252
    acl rede_interna3 src 10.0.4.0/255.255.255.252
    acl rede_interna4 src 10.0.5.0/255.255.255.252
    acl rede_interna5 src 10.0.6.0/255.255.255.252
    acl rede_interna6 src 10.0.7.0/255.255.255.252
    acl rede_interna7 src 10.0.8.0/255.255.255.252
    acl rede_interna8 src 10.0.9.0/255.255.255.252
    acl rede_interna9 src 10.0.10.0/255.255.255.252

    acl liberado url_regex -i "/usr/local/squid/liberado"
    acl extensoes url_regex -i "/usr/local/squid/bloqueio"
    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, 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 CONNECT method CONNECT
    http_access allow manager localhost
    http_access deny manager
    http_access allow liberado
    http_access deny extensoes
    http_access deny !Safe_ports
    http_access deny CONNECT !SSL_ports
    http_access allow rede_interna
    http_access allow rede_interna2
    http_access allow rede_interna3
    http_access allow rede_interna4
    http_access allow rede_interna5
    http_access allow rede_interna6
    http_access allow rede_interna7
    http_access allow rede_interna8
    http_access allow rede_interna9

    http_access deny all
    http_reply_access allow all
    icp_access allow all
    coredump_dir /usr/local/squid/var/cache

    #habilitando proxy transparente
    httpd_accel_host virtual
    httpd_accel_port 80
    httpd_accel_with_proxy on
    httpd_accel_uses_host_header on

  5. #5

    Padrão

    funcionou alex , entretando nao é -o eth3 e sim -i eth3.

    valeu

    abraçoss