+ Responder ao Tópico



  1. #1

    Padrão Shorewall direcionando o Proxy para outra maquina

    Pessoal, estou usando o Firewall Shorewall numa maquina e o squid esta em outra máquina.

    Qual é a regra que tenho que suar no shorewall para que as estações da rede use o proxy

    Exemplo:

    Servidor Firewall com Shorewall + Internet
    eth2 IP Real 189.xx.xxx.xxx
    eth3 IP local 192.168.0.2

    Servidor PDC + Squid + dhcp + dns
    Eth2 IP local 192.168.0.1

    O PDC está funcionando numa boa, todos os usuarios logam no PDC e consigo incluir maquinas no Dominio também sem problemas.

    O problema que ninguém consegue acessa a internet.

    Na regras em rules do shorewall eu deixe assim para que todos usem o Proxy.

    #ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/ MARK
    # PORT PORT(S) DEST LIMIT GROUP
    #SECTION ESTABLISHED
    #SECTION RELATED
    SECTION NEW

    ##################################
    ## Imput: Local Net -> Firewall ##
    ##################################
    # from all Local Net hosts
    DNS/ACCEPT loc fw
    SSH/ACCEPT loc fw
    SMB/ACCEPT loc fw
    ACCEPT loc fw udp 67 # DHCP Server
    Ping/ACCEPT loc fw
    AllowICMPs loc fw

    ## Imput: Internet -> Firewall ##
    #################################
    # from all Internet hosts
    SSH/ACCEPT net fw
    Ping/ACCEPT net fw
    AllowICMPs net fw

    ################################################## #
    ## Forward with SourceNAT: Local Net -> Internet ##
    # from: all Local Net hosts -> to: all Internet hosts
    SMTP/ACCEPT loc net
    POP3/ACCEPT loc net
    HTTPS/ACCEPT loc net
    HTTP/ACCEPT loc net:200.201.166.0/24,200.201.173.0/24,200.201.174.0/24 # Conectividade Social
    ACCEPT loc net tcp 3456 # Receita Net

    Ping/ACCEPT loc net
    AllowICMPs loc net

    #####################################
    ## Redirect for Proxy Transparenty ##
    #####################################
    ###
    #
    #ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL
    # PORT(S) PORT(S) DEST
    REDIRECT loc:192.168.0.1 3128 tcp http - !200.201.166.0/24,200.201.173.0/24,200.201.174.0/24

    #LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE

    O IP 192.168.0.1 é onde o Squid está instalado "NO SERVDOR PDC"

    Mas não tive sucesso.
    Alguém sabe se precisa de mais uma regra?

  2. #2

    Padrão

    Alguém tem idéia como posso resolver este impasse?

    Abraços

  3. #3

    Padrão

    Olá amigos ninguém tem uma idéia com resolver esta parada,

    Já fiz varios testes no shorewall e até o momento não tive sucesso, o pior que não posso instalar o squid e configura-lo no Servidor gateway, pois perderia uma ferramenta de adiministração que tem no segundo Servidor PDC.

    EDITADO: Encontrei uma regra na documentação do shorewall, mas como não tenho como fazer um teste, pois estou remoto, gostaria se aguém poderia tirar esta dúvida se é a regra certa.

    http://www.shorewall.net/Shorewall_Squid_Usage.html

    Esta é parte que acho que seja o correto: Squid (transparent) Running in the local network

    You want to redirect all local www connection requests to a Squid transparent proxy running in your local zone at 192.168.0.1 and listening on port 3128. Your local interface is eth1. There may also be a web server running on 192.168.0.1. It is assumed that web access is already enabled from the local zone to the Internet.
    1. Add this entry to your /etc/shorewall/providers file.
    2. #NAME NUMBER MARK DUPLICATE INTERFACE GATEWAY OPTIONS

    #NAME NUMBER MARK DUPLICATE INTERFACE GATEWAY OPTIONS
    Squid 1 202 - eth3 192.168.0.1 loose


    OBS: só alterei para o IP onde o squid esta insltalado IP 192.168.0.1 sendo o Servidor-PDC
    A minha dúvida é ref. onde informa o Gateway, pois na verdade o gateway na rede usa o IP 192.198.0.2 onde tem o Shorewall instalado.

    Abraço
    Aguém se habilita em ajudar?

    abraço.
    Última edição por gamaj1; 18-11-2009 às 17:46.

  4. #4

    Padrão

    Será que ninguém usa o shorewall em máquinas separada, pois não consigo encontra a solução em lugar nenhum nem na documentação do software.

    Encontrei isso Using Shorewall with Squid

    e tentei fazer o que diz aqui:

    You want to redirect all local www connection requests to a Squid transparent proxy running in your local zone at 192.168.0.1 and listening on port 3128. Your local interface is eth1. There may also be a web server running on 192.168.0.1. It is assumed that web access is already enabled from the local zone to the Internet.
    1. Add this entry to your /etc/shorewall/providers file.
      #NAME NUMBER MARK DUPLICATE INTERFACE GATEWAY OPTIONSSquid 1 202 - eth3 192.168.0.1 loose
    You want to redirect all local www connection requests to a Squid transparent proxy running in your local zone at 192.168.0.1 and listening on port 3128. Your local interface is eth1. There may also be a web server running on 192.168.0.1. It is assumed that web access is already enabled from the local zone to the Internet.
    1. Add this entry to your /etc/shorewall/providers file.
      #NAME NUMBER MARK DUPLICATE INTERFACE GATEWAY OPTIONS
    Squid 1 202 - eth1 192.168.0.1 loose

    Mas ainda não tive sucesso, será que alguém poderia pelo menos dizer algo, por favor.

    Abraço