Welcome! Log In Create A New Profile

Advanced

Re: Masking IP-Addresses on logging?

Tobia Conforto
February 20, 2010 11:36AM
Nick Pearson wrote:
> It's humorous when politicians try to regulate the openness of the Internet.

Humorous wouldn't be my choice of words.

> You can change the log format with something like this:
>
> log_format no_ip '0.0.0.0 - no-user [$time_local] '

No. This will break most log-based analytics software, which use the source address to tell between different visitors, in order to generate 'visit', 'page', and 'hit' statistics.

I guess the only feasible way to have some kind of plausible denial in court *and* to get your statistics is to use the result of a one-way hash function as a fake IP address.

MD4 and MD5 would do a fine job, but they are probably way too heavy to use on a web server. CRC-32 is lighter and outputs a 32bit code, which could be reformatted as a fake IP address.

I suggest writing a custom module that will compute the CRC-32 of "$remote_address$http_user_agent" (just to get some variance over the IP address alone), then format it in the dotted-decimal form of IP addresses and make it available as $fake_remote_address.

This won't keep you from reversing the code. No function will, in this case, not even MD5, because you could always brute-force your way through, as you only have 2^32 plain texts. If you used the User-agent as an input to the hash function and *not* store it in the log, then it would get slightly better... But I guess CRC-32 will be enough for any lawyer :-)

Tobia
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Masking IP-Addresses on logging?

ts77 February 18, 2010 07:39AM

Re: Masking IP-Addresses on logging?

Nick Pearson February 20, 2010 11:36AM

Re: Masking IP-Addresses on logging?

Tobia Conforto February 20, 2010 11:36AM

Re: Masking IP-Addresses on logging?

Cliff Wells February 20, 2010 11:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 215
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready