[squid-users] forwarded_for

Amos Jeffries squid3 at treenet.co.nz
Fri Jun 12 00:46:07 UTC 2015


On 12/06/2015 1:38 a.m., Snyder, Brian wrote:
> Hello All,
> I am running squid 3.3.8 on CentOS 7.1.
> The kernel is 3.10.0-229.4.2.el7.x86_64.
> 

> I am having an issue where the forwarded_for directive is not
> working
correctly in squid.conf. I initially started the server hiding the
client IP using the "delete" setting. We have now changed direction and
I wish to use the client IP instead of the proxy. However, no setting
will change the server IP presented. I have even tried to reconfigure
with the line completely removed from the config with no luck. Stopping
the service does not help. Even a server reboot does nothing. I have
thought about just doing a rebuild.


Removing the directive entirely from your config should work.

Note that the recipient server must be interpreting the X-Forwarded-For
header *correctly* (as a reverse-path list of mixed IPv4, IPv6, and text
labels - not just a single IP). Also any other middleware between your
proxy and the server touching the header will affect the contents the
origin server receives.

Amos



More information about the squid-users mailing list