+ Responder ao Tópico



  1. #1

    Padrão Squid com duas redes interna, não funciona paginas em https

    Gente, estou com o squid configurado para usar em duas redes, só que em umas da rede não acessa paginas https

    A rede A 192.168.0.0/24 principal acessa sem problema
    A rede B 192.168.1.0/24 não acessa nenhum apagina em https

    O que causa estranheza que não tenho nenhuma regra no squid bloqueando este tipo de paginas.

    alguém tem alguma idéia o que seja?

    Abraços

  2. #2

    Padrão Re: Squid com duas redes interna, não funciona paginas em https

    Seria bom postares mais informações, squid.conf e o resultado de iptable -L.
    Proxy transparente?

  3. #3

    Padrão Re: Squid com duas redes interna, não funciona paginas em https

    Sim, é proxy transparente

    root@ubuntu:~# iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    ACCEPT tcp -- 192.168.0.0/24 anywhere tcp flags:FIN,SYN,RST,ACK/SYN
    DROP all -- 10.0.0.0/8 anywhere
    DROP all -- 172.16.0.0/16 anywhere
    DROP all -- 192.168.0.0/24 anywhere
    DROP udp -- anywhere anywhere udp dpts:33435:33525
    ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
    DROP tcp -- anywhere anywhere tcp dpt:32000
    DROP all -- anywhere anywhere state INVALID
    ACCEPT tcp -- anywhere anywhere tcp dpt:www
    ACCEPT tcp -- anywhere anywhere tcp dpt:https
    ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
    ACCEPT tcp -- anywhere anywhere tcp dptop3
    ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
    DROP tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/SYN
    Chain FORWARD (policy ACCEPT)
    target prot opt source destination
    ACCEPT icmp -- anywhere anywhere icmp echo-request limit: avg 1/sec burst 5
    ACCEPT tcp -- anywhere anywhere limit: avg 1/sec burst 5
    ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
    ACCEPT tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/RST limit: avg 1/sec burst 5
    DROP tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,PSH,ACK,URG/SYN,ACK
    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
    ACCEPT tcp -- 127.0.0.0/8 anywhere tcp flags:FIN,SYN,RST,ACK/SYN
    ACCEPT tcp -- anywhere anywhere tcp dpt:www
    ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
    ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
    ACCEPT tcp -- anywhere anywhere tcp dptop3
    ACCEPT tcp -- anywhere anywhere tcp dpt:https
    root@ubuntu:~#

    root@ubuntu:~# iptables -t nat -L
    Chain PREROUTING (policy ACCEPT)
    target prot opt source destination
    DNAT all -- 189-xx-xxx-xxx.dsl.telesp.net.br anywhere to:192.168.0.4
    REDIRECT tcp -- anywhere anywhere tcp dpt:www redir ports 3128
    Chain POSTROUTING (policy ACCEPT)
    target prot opt source destination
    ACCEPT tcp -- 189-xx-xxx-xx.dsl.telesp.net.br anywhere tcp dpt:3389
    SNAT all -- 192.168.0.4 anywhere to:189.xx.xxx.xxx
    ACCEPT tcp -- 192.168.0.4 anywhere tcp dpt:3389
    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
    root@ubuntu:~#


    Alguma coisa errada?
    Última edição por gamaj1; 18-02-2011 às 19:22.

  4. #4

    Padrão Re: Squid com duas redes interna, não funciona paginas em https

    não analisei direito pois estou passando rapido por aqui, mas suas redes são 192.168.0.x e 192.168.1.x, nas regras tas usando 192.168.0.0/24, no qual compreende a rede 192.168.0.1 até 192.168.0.254, neste caso sua rede 182.168.1.0 ficará de fora, tente mudar as regras para /16 ao invés de /24.
    ou adicionar a outra rede 192.168.1.0/24.

  5. #5

    Padrão Re: Squid com duas redes interna, não funciona paginas em https

    Deu certo, com a troca da mascara para 16, eu tinha feito um teste antes da troca de mascara, desabilitando a regra "iptables -A INPUT -p tcp --syn -j DROP" no final do script do firewall, e também tinha conseguido acessar as paginas em https e outros serviço remotos.

    mas ai sem esta regra o firewall ficaria um pouco capenga na segurança, com a substituição da mascara de 24 para 16 não será necessário dabilita-la.

    Muito obrigado pela dica

    Abraço
    Última edição por gamaj1; 19-02-2011 às 16:18.