Re: [squid-users] Squid with two networks ...

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 24 Jun 2008 11:53:02 +1200 (NZST)

> Hi !!!
>
> I've installed a Squid box transparent mode (3STABLE7) with two
> network cards and I must to implement this scenario:
>
> - The network cards are connected at two diferents internal Class C
> network with public IP.
> - If the http requeriment asking about an object that is in the cache,
> the Squid give the object throught the same interface that the
> original requermients comes (I tink that this is not a problem,
> because de origin IP is in the same network that the squid have).
> - If the http requeriment asking about an object that isn't in the
> cache, the Squid go direct to public network trought the same
> interface that the original requermients comes (This is the problem).
>
> Are some configurations of squid.conf that allow me to do that?

     tcp_outgoing_address

# configure an ACL to match which src network range the request comes from.
acl netA src 192.168.20.0/24
acl netB src 192.168.12.0/24

# specify which IP squid uses to send requests from
tcp_outgoing_address 192.168.20.1 allow netA
tcp_outgoing_address 192.168.20.1 deny !netA
tcp_outgoing_address 192.168.12.1 allow netB
tcp_outgoing_address 192.168.12.1 deny !netB

The above will make squid change its own Src-IP based on your ACL.

Amos
Received on Mon Jun 23 2008 - 23:53:04 MDT

This archive was generated by hypermail 2.2.0 : Tue Jun 24 2008 - 12:00:08 MDT