This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

cannot redirect HTTP trafic

I have Astaro v.7 gateway. I want to redirect all HTTP internal traffic to other HTTP proxy machine. My HTTP proxy server must work in transparent mode. But after applying that rule below in Astaro I can't browse any web pages (I see connection timeout). The same problem I have, when I try browse web pages directly on HTTP proxy server. I configured on Astaro that rule:

Traffic Source: MY_LAN (IP)
Traffic Service: HTTP (1-65535 -> 80)
Traffic Destination:Any
NAT mode: DNAT
Destination: PROXY_HTTP (IP proxy server)
Destination Service:HTTP Proxy (1-65535 -> 8080)   (my port on http proxy sever)

I have configured this rules on Astaro:

Source:            eth_LAN (Network)
Service:             HTTP Proxy (1-65535 -> 8080)
Destination:        PROXY_HTTP (IP proxy server)

and

Source:            PROXY_HTTP (IP proxy server)
Service:             HTTP (1-65535 -> 80)
Destination:        ANY

and somethig goes wrong... I can't see any dropped packets in live log from proxy server. I'm using squid 2.6 on my proxy server. When I configured my browser to use proxy and turn off this rule on Astaro everything works fine.


This thread was automatically locked due to age.
Parents
  • Hello,

    First let me clear something:

    Is this right for your HTTP-Traffic:

    LAN >> SquidProxy >> Astaro >> WAN ?

    I think then you build some kind of loop there...

    My HTTP proxy server must work in transparent mode.


    OK - you don`t need to set the proxy in the browser of your clients.

    So: LAN [OK] >> SquidProxy >> Astaro >> WAN


    turn off this rule on Astaro everything works fine.


    OK - Routing seems to be alright.

    So: LAN [OK] >> SquidProxy [OK] >> Astaro >> WAN

    Stop! One more question:

    I can't see any dropped packets in live log from proxy server.

    Do you have logging in this rule enabled? Do you see accepted packets?
    If so - look at the NAT rule i wrote at the end.
    If you see NO taffic - do you have set the Astaro at DefaultGateway on your SquidProxy?


    Traffic Source: MY_LAN (IP)
    Traffic Service: HTTP (1-65535 -> 80)
    Traffic Destination:Any
    NAT mode: DNAT
    Destination: PROXY_HTTP (IP proxy server)
    Destination Service:HTTP Proxy (1-65535 -> 8080)   (my port on http proxy sever)

    I have configured this rules on Astaro:

    Source:            eth_LAN (Network)
    Service:             HTTP Proxy (1-65535 -> 8080)
    Destination:        PROXY_HTTP (IP proxy server)


    You don`t need that. Your SquidProxy is in your local LAN and now you redirect his traffic back to himself...
    This is the "loop" i talked of.


    Source:            PROXY_HTTP (IP proxy server)
    Service:             HTTP (1-65535 -> 80)
    Destination:        ANY


    I think this is the only PF-rule you need and of cause a masq-rule under NAT:

    "Internal (network)" or only "SuidProxy" >> masquerading  on "External (interface)"

    So: LAN [OK] >> SquidProxy [OK] >> Astaro [OK] >> WAN [OK ???] [;)]

    so long,
    notec
  • OK - Routing seems to be alright.

    So: LAN [OK] >> SquidProxy [OK] >> Astaro >> WAN

    Stop! One more question:

    Do you have logging in this rule enabled? Do you see accepted packets?
    If so - look at the NAT rule i wrote at the end.
    If you see NO taffic - do you have set the Astaro at DefaultGateway on your SquidProxy?


    You right I created loop, but I don't know how to fix it. I tried to change the DNAT rule on the one following:

    Traffic Source: Proxy Hosts (20 IP addresses without Squid server IP)
    Traffic Service: HTTP (1-65535 -> 80)
    Traffic Destination:Any
    NAT mode: DNAT
    Destination: PROXY_HTTP (IP proxy server)
    Destination Service:HTTP Proxy (1-65535 -> 8080) (my port on http proxy server) 

    ...but still I can't use web pages on my LAN hosts. I don't see any accepted or dropped packets in packet filter (I enabled logging on needed rules).

    Is this problem that I have squid server in the same subnet as LAN hosts using this proxy and squid traffic goes via the same gateway as LAN hosts?



    I think this is the only PF-rule you need and of cause a masq-rule under NAT:

    "Internal (network)" or only "SuidProxy" >> masquerading  on "External (interface)"


    I don't uderstand why I need only this one rule?
  • Please tell me if this is problem that I have squid server in the same subnet as LAN hosts using this proxy and squid traffic goes via the same gateway as LAN hosts?
Reply Children
No Data