[squid-users] Forwarded-for functionality(squid)

Matus UHLAR - fantomas uhlar at fantomas.sk
Tue Sep 8 09:52:43 UTC 2020


On 08.09.20 09:01, piyush.gaba wrote:
>I would like to ask for your inputs/resolution for one of the issues that I am facing while using forwarded_for functionality with new version of squid i.e. v4.13
>
>UseCase:
>I have a client, a webserver and squid hosted in 3 different VMs.  I have
> set up interfaces in such a way that Client cannot access webserver
> directly, but only through squid proxy.(Works fine)
>
>Now, When I append forwarded_for off to my squid.conf and then curl the
> webserver from client [ curl {Webserver.mgmtIP} ], the expected logs on
> webserver should have, "unknown" at the end of line.

You can configure webserver to log contents of X-Forwarded-For: line.
Note that that line can contain anything clients can send.
So, unless you really want to see that content, don't log it.

>And if there is nothing appended or forwarded_for on is appended, it should have "Client_IP" at the end of the line in log file.
>But I am not getting expected output.




More information about the squid-users mailing list