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

squid in other box

Dear all,

I have a squid box outside the Astaro and I want to make transparent proxy.
I want to know to set the rule and NAT in Astaro to make this happen.
I read n internet that in iptables we could do this like this:
iptables -t nat -A PREROUTING -i eth0 -s ! squid-box -p tcp --dport 80 -j DNAT --to squid-box:3128 
iptables -t nat -A POSTROUTING -o eth0 -s local-network -d squid-box -j SNAT --to iptables-box 
iptables -A FORWARD -s local-network -d squid-box -i eth0 -o eth0 -p tcp --dport 3128 -j ACCEPT 

Is there any clue or documentation to make this happen?

Regards,
Fadjar


This thread was automatically locked due to age.
Parents
  • I have never tried what you want to do, but it should be possible to redirect all HTTP traffic to another box on your Internal network by using a NAT rule such as this:

    WebProxy  Internal_Network__ -> Any / HTTP  None  yoursquidbox.local.net

    The problem that remains to be solved, is how to allow your squidbox to forward requests to the outside world, since the rule above would in effect create a loop for it, if it tried to talk port 80 traffic on the same Ethernet connection. The simplest approach to get around this problem might be to multihome the squidbox, by installing a second Ethernet card in it, and connect the second Ethernet interface to a DMZ network from your ASL box. That way it can send port 80 traffic to the outside world unimpeeded via the DMZ network

    My advice,, stick with the squid HTTP cache that's inside your ASL box. Keep it simple!
  • Actually I think he said the squid box is "outside asl" so I guess it is a multihomed server with it's own public interface so it never communicates with the outside world through the Astaro firewall. So there would not be the problem you mentioned about the loop.
  • [ QUOTE ]
    Actually I think he said the squid box is "outside asl" so I guess it is a multihomed server with it's own public interface so it never communicates with the outside world through the Astaro firewall. So there would not be the problem you mentioned about the loop. 

    [/ QUOTE ]I took "outside asl" to mean "separate from ASL". The looping problem was worth mentioning, in my view, since it would become an issue if his other Squid box sat on the local LAN, where typically most machines providing local services would be located.
Reply
  • [ QUOTE ]
    Actually I think he said the squid box is "outside asl" so I guess it is a multihomed server with it's own public interface so it never communicates with the outside world through the Astaro firewall. So there would not be the problem you mentioned about the loop. 

    [/ QUOTE ]I took "outside asl" to mean "separate from ASL". The looping problem was worth mentioning, in my view, since it would become an issue if his other Squid box sat on the local LAN, where typically most machines providing local services would be located.
Children
No Data