Re: [squid-users] changing the outgoing Ip address

From: Mark Fee <mark_at_manning.nottingham.sch.uk>
Date: Thu, 19 Mar 2009 11:21:14 +0000

Amos Jeffries wrote:
>>
>> I have set up an alias ip address on our proxy apollo and added what I
>> believe are the following significant lines to squid.conf
>>
>> acl mark_pc src 10.16.52.33
>> tcp_outgoing_address 10.16.52.13 mark_pc
>> tcp_outgoing_address 10.16.52.237
>> server_persistent_connections off
>>

Thanks for the help Amos.

>
> 1) check that both IPs 10.16.52.13 and 10.16.52.237 are assigned to an
> outgoing interface on the Squid box.
> (done)
>
> 2) check that you are using a Squid 2.6 or later.

Ah No - 2.5.STABLE9

I am running debian etch, I had a go at upgrading to 2.6 but hit a few
issues which I'm not happy about hacking until I have time to make sure
I have a full backup and time to upgrade properly.

Is 2.6 known to fix tcp_outgoing_address or is it just the bare minimum
that people are using these days. I work on an if it aint broke don't
fix it principal, but once I have time I will upgrade to lenny and test.

> 3)
> tcp_outgoing_address 10.16.52.13 mark_pc
> tcp_outgoing_address 10.16.52.237 !mark_pc

DOH of course use a not!. This solves it, thanks for the help - I always
hate to ask without wasting at least a day trying to fix, and then helps
comes along and it's always something simple.

My test # 2 is now returning:-
>> HTTP_X_FORWARDED_FOR 10.16.52.33, 10.16.52.13

and I am getting the correct filters for this different IP address.

Now how important is it that I upgrade to 2.6 (or later if I'm going to
bite the bullet)?

Thanks,

Mark

>> however this hangs and timeouts my internet connection or slows it down
>> significantly. This is immediately fixed if I comment out the line
>> #tcp_outgoing_address 10.16.52.13 mark_pc
>>
>> Can anyone shed light on this problem? Please page down for Conf file
>>
>> ***** Other tests I've tried. ******
>> 1) Setting up a workstation on 10.16.52.13 and setting it to use
>> proxy.embc.etc directly - this worked fine.
>>
>> 2) Connecting to a server running phpinfo beyond both proxies
>> this reported the following whether the line was commented or not.
>> HTTP_X_FORWARDED_FOR 10.16.52.33, 10.16.52.237
>>
>> which makes me think that the embc server was not getting the correct Ip
>> alias at all (10.16.52.13) but the main one for eth0
Received on Thu Mar 19 2009 - 11:20:33 MDT

This archive was generated by hypermail 2.2.0 : Thu Mar 19 2009 - 12:00:02 MDT