Logging HTTP traffic on Linux

0

A bit of a backstory, my brother (in his early teens) has an attention disorder. Often I find him when he is supposed to be doing his homework instead surfing the web. We would ideally like to confront him with evidence that he is not really working at all, preferably by showing the history of which websites he has visited. I can't use Wireshark on my side (network is not set up in a way which would allow me to monitor his throughput).

My primary concern is caching. The main thing it would be useful for me to get would be the initial HTTP GET requests, which I can get with Wireshark by doing (http.request.method == "GET") && (http.request.uri == "/"), however, this stops working once the website has been cached (it only gets images which are out of date, etc, and changing == to contains in the 2nd parameter results in a lot of garbage and still no guarantees that it won't be cached).

My router is a WRT54GL with Tomato on it (has dnsmasq etc.). I did wonder about logging with dnsmasq, and have read up a bit on it, but I don't know if it will work the way I'm wanting it to (local DNS cache will be used after the initial request, right?).

Otherwise, is there some better way to log his traffic? A logger on his computer itself would also be fine, just as long as it is 'invisible' on his computer (or could be configured to be invisible) -- he is not competent enough with Linux to determine what is running in the background. I currently have him set up with Debian Squeeze.

Matthieu Cartier

Posted 2011-01-26T10:10:22.377

Reputation: 3 422

Looking at the web logs of a boy in his teens is going to be an alarming experience for all involved..... have you thought of the possible backlash this'll produce ? – Sirex – 2011-01-26T10:26:46.667

I figured I would at least get one reply like that, yes, trust me, this is well out of hand already, this is one of the only options left, and the best one at that. – Matthieu Cartier – 2011-01-26T10:30:39.270

Have a look at: http://www.debianhelp.co.uk/squid.htm and http://www.debian-administration.org/articles/71

– Linker3000 – 2011-01-26T11:41:24.163

Answers

1

You could setup a proxy (Squid?) on his Linux machine which would give you logging. If you wanted some degree of control you could also look at something like Dansguardian which works in tandem with the proxy to control site access.

Linker3000

Posted 2011-01-26T10:10:22.377

Reputation: 25 670

That sounds like it might work. Is there a guide to setting up squid for such a purpose somewhere? – Matthieu Cartier – 2011-01-26T10:29:10.520

There's some guides at the Dansguardian site too. – Linker3000 – 2011-01-26T13:06:21.390