How to disable Squid(squid-3.1) proxy header in Linux

To stop squid from sending the IP address of the client, the option that needs to be used in the squid.conf file is forwarded_for. For previous versions of squid, the parameter forwarded_for off is used for removing the X-forwarded-for header, but in squid-3.1 the release notes showing that the arguments to the parameter forwarded-for have been changed

If set to "transparent",
Squid will not alter the X-Forwarded-For header in any way.

If set to "delete",
Squid will delete the entire X-Forwarded-For header.

If set to "truncate",
Squid will remove all existing X-Forwarded-For entries, and place the client IP as the sole entry.

Thus if, you want to hide the client IP in squid-3.1 you will have to set the forwarded-for parameter as:

forwarded-for delete

This should now delete the complete X-forwarded-For header from the proxy request sent by squid.

Leave a Reply

Your email address will not be published. Required fields are marked *