Re: [squid-users] Multiple instances of Squid necessary for multiple IP's?

From: Amos Jeffries <squid3@dont-contact.us>
Date: Mon, 05 Nov 2007 23:12:24 +1300

Adrian Chadd wrote:
> On Sat, Nov 03, 2007, Reid wrote:
>> I'm running Squid on a server that has 3 IP addresses, and clients can connect to the proxy using
>> any of the 3 IP's. Currently the OUTgoing IP always appears as a single IP, but I want the
>> outgoing IP to appear as the IP that the client connected to. Is that possible without running 3
>> different instances of Squid on the server?
>
> I think you can use ACLs to match the outgoing IP selection based on the
> incoming IP.
>
> http://www.squid-cache.org/Versions/v2/2.6/cfgman/tcp_outgoing_address.html
>
> So you could do something like:
>
> http_port 1.1.1.1:3128
> http_port 2.2.2.2:3128
> http_port 3.3.3.3:3128
>
> acl dstip1 myip 1.1.1.1
> acl dstip2 myip 2.2.2.2
> acl dstip3 myip 3.3.3.3
>
> tcp_outgoing_address 1.1.1.1 dstip1
> tcp_outgoing_address 2.2.2.2 dstip2
> tcp_outgoing_address 3.3.3.3 dstip3
>
> Maybe? I haven't tested it.
>

Yes, that is the way to do it.

Amos
Received on Mon Nov 05 2007 - 03:12:25 MST

This archive was generated by hypermail pre-2.1.9 : Sat Dec 01 2007 - 12:00:01 MST