Re: [squid-users] how to log user/IP in squid

From: Henrik Nordstrom <[email protected]>
Date: Sun, 30 Jan 2005 18:30:46 +0100 (CET)

On Sat, 29 Jan 2005, airplays55@yahoo.com wrote:

> I have 2 types of users I want to differentiate
> between in my squid access log:
> 1) requests thru a browser running on the server, and
> 2) requests through an ssh tunnelled connection into
> the server
>
> both are logged with IP 127.0.0.1. And using user
> authentication is not really an option due to the
> nature of those 2 connection types (right?)

authentication should work fine in the above.

It's only if you transparently intercept client port 80 traffic using
firewall rules or the alike authentication doesn't work. As long as the
browser is configured to use a proxy authentication works.

You could also set up one of the two to connect to the real IP of the
proxy instead of localhost, or any other IP within the 127.X address range
instead of 127.0.0.1. This way access.log will show different source IPs
for the different class of sessions.

> The only way I know of is to turn on "log_mime_hdrs" in squid.conf so
> that my log analyzer can use HTTP_USER_AGENT, but there is so much extra
> header info that access.log gets prohibitively large.

If all you want it to log the user agent in access.log then either wait
for Squid-3.0 or pay a visit to http://devel.squid-cache.org/

Regards
Henrik
Received on Sun Jan 30 2005 - 10:30:50 MST

This archive was generated by hypermail pre-2.1.9 : Mon Mar 07 2005 - 12:59:36 MST