[ipv6calc] new: ipv6loganon for anonymizing HTTP logs without loosing much information

Niko Tyni ntyni at iki.fi
Fri Feb 2 09:40:16 CET 2007


On Thu, Feb 01, 2007 at 03:50:13PM +0100, Peter Bieringer wrote:
 
> triggered by some global discussions about privacy I've created a new
> program named "ipv6loganon", which is able to anonymize HTTP logs
> without loosing much information (e.g. the IPv6 address type - for
> further statistics).

> Please run some tests. I plan to release package 0.70.0 in one week or so.

Hi,

ipv6loganon looks nice, thanks.

Here's a small patch that fixes a couple of typos and adds a man
page for ipv6loganon, based on --help output and the README.

The --enable-system-geoip stuff seems to work OK for me. It's great
to have, now I don't need to change the build system at all for the
Debian packages.

I still plan to hack the build system so that it could use an external
copy of the ip2location and geoip source trees, I just haven't gotten
around to doing it yet. With it there would be no need of shipping
those in the ipv6calc tarball, which would be a good thing IMO.

Cheers,
-- 
Niko Tyni	ntyni at iki.fi
-------------- next part --------------
--- ipv6calc-0.70cvs.orig/ipv6loganon/ipv6loganonhelp.c
+++ ipv6calc-0.70cvs/ipv6loganon/ipv6loganonhelp.c
@@ -30,7 +30,7 @@
 void ipv6loganon_printinfo(void)  {
 	printversion();
 	printcopyright();
-	fprintf(stderr, "This program anonymize IPv4/IPv6 addresses in HTTP server log files\n");
+	fprintf(stderr, "This program anonymizes IPv4/IPv6 addresses in HTTP server log files\n");
 	fprintf(stderr, "See '%s -?' for more details\n\n", PROGRAM_NAME);
 };
 
@@ -39,7 +39,7 @@
 	printversion();
 	printcopyright();
 	fprintf(stderr, "\n");
-	fprintf(stderr, "This program anonymize IPv4/IPv6 addresses in HTTP server log files\n");
+	fprintf(stderr, "This program anonymizes IPv4/IPv6 addresses in HTTP server log files\n");
 	fprintf(stderr, "\n");
 	fprintf(stderr, " General:\n");
 	fprintf(stderr, "  [-d|--debug <debug value>] : debug value (bitwise like)\n");
@@ -55,7 +55,7 @@
 	fprintf(stderr, "  --anonymize-standard   : preset for standard anonymization\n");
 	fprintf(stderr, "  (default)                 mask-ipv4=8 mask-iid\n");
 	fprintf(stderr, "\n");
-	fprintf(stderr, " Takes data from stdin, proceed it to stdout\n");
+	fprintf(stderr, " Takes data from stdin, outputs the processed data to stdout\n");
 	fprintf(stderr, "\n");
 	fprintf(stderr, "\n");
 
--- ipv6calc-0.70cvs.orig/ChangeLog
+++ ipv6calc-0.70cvs/ChangeLog
@@ -4,7 +4,7 @@
 
 Info:
 	PB = Peter Bieringer <pb (at) bieringer.de>
-	NT = Niko Tynii <ntyni (at) iki dot fi>
+	NT = Niko Tyni <ntyni (at) iki dot fi>
 	ESR = Eric S. Raymond <esr (at) thyrsus dot com>
 --------------------------------------------------------------------
 20070201/PB
--- ipv6calc-0.70cvs.orig/man/ipv6loganon.8
+++ ipv6calc-0.70cvs/man/ipv6loganon.8
@@ -0,0 +1,110 @@
+.TH "ipv6loganon" "8" "2007-02-01" "Niko Tyni <ntyni at iki.fi>" ""
+.SH "NAME"
+ipv6loganon \- HTTP server log file anonymizer
+.SH "SYNOPSIS"
+.PP
+.B ipv6loganon 
+[
+.B \-d
+.I value
+] [
+.B \-V
+] [
+.B \-n
+] [
+.B \-c 
+.I value
+] [
+.B \-\-mask\-ipv4
+.I bits
+] [
+.B \-\-no\-mask\-iid
+] [
+.B \-\-anonymize\-standard
+]
+.SH "DESCRIPTION"
+.PP
+.B ipv6loganon
+is a HTTP server log file anonymizer
+.PP
+It expects a log line on stdin with an IPv4/IPv6 address as first token.
+.PP
+This token would be anonymized according to given/default options.
+.PP
+The anonymizer would keep as much information as possible for IPv6 address types.
+.PP
+Client-side IID would be anonymized by
+.IP
+\(bu EUI-48 based: serial number would be zero'ed, keeping OID
+
+\(bu EUI-64 based: serial number would be zero'ed, keeping OID
+
+\(bu ISATAP: client IPv4 address would be anonymized by given IPv4 mask
+
+\(bu TEREDO: client IPv4 address would be anonymized by given IPv4 mask,
+client port would be zero'ed
+
+\(bu 6to4(Microsoft): client IPv4 address would be anonymized by given IPv4 mask
+
+\(bu local: whole IID would be zero'ed
+.PP
+Client-side SLA would be anonymized by 
+.IP
+\(bu SLA would be zero'ed
+.PP
+Prefix would be anonymized by
+.IP
+\(bu 6to4: client IPv4 address would be anonymized by given IPv4 mask
+.PP
+Compat/Mapped IPv4 addresses would be anonymized by
+.IP
+\(bu IPv4 address would be anonymized by given IPv4 mask
+.PP
+Afterwards, the modified address and the trailing line would be printed to stdout.
+.SH "OPTIONS"
+.SS "GENERAL"
+.TP
+.B \-d, \-\-debug <debug value>
+debug value (bitwise like)
+.TP
+.B \-V, \-\-verbose
+be verbose
+.TP
+.B \-n, \-\-nocache
+disable caching
+.TP
+.B \-c, \-\-cachelimit
+set cache limit (default: 20, maximum: 200)
+.SS "OUTPUT ANONYMIZATION"
+.TP
+.B \-\-mask\-ipv4 <bits>
+mask all IPv4 addresses [0-32], default 8 even if occurs in IPv6-IID
+.TP
+.B \-\-no\-mask\-iid
+do not mask non-IPv4 based IPv6-IID
+.TP
+.B \-\-anonymize\-standard
+preset for standard anonymization
+.PP
+Default settings:
+.B mask-ipv4=8 mask-iid
+
+.SH "EXAMPLE"
+Original lines (stdin):
+.PP
+207.46.98.53 - - [01/Jan/2007:00:01:15 +0100] "GET /Linux+IPv6-HOWTO/x1112.html HTTP/1.0" 200 6162 "-" "msnbot/1.0 (+http://search.msn.com/msnbot.htm)" 253 6334
+
+2002:52b6:6b01:1:216:17ff:fe01:2345 - - [10/Jan/2007:15:04:28 +0100] "GET /favicon.ico HTTP/1.1" 200 4710 "http://www.bieringer.de/linux/IPv6/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20061219 Fedora/1.5.0.9-1.fc6 Firefox/1.5.0.9 pango-text" 413 5005
+.PP
+Modified lines (stdout):
+.PP
+207.46.98.0 - - [01/Jan/2007:00:01:15 +0100] "GET /Linux+IPv6-HOWTO/x1112.html HTTP/1.0" 200 6162 "-" "msnbot/1.0 (+http://search.msn.com/msnbot.htm)" 253 6334
+
+2002:52b6:6b00:0:216:17ff:fe00:0 - - [10/Jan/2007:15:04:28 +0100] "GET /favicon.ico HTTP/1.1" 200 4710 "http://www.bieringer.de/linux/IPv6/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20061219 Fedora/1.5.0.9-1.fc6 Firefox/1.5.0.9 pango-text" 413 5005
+
+.SH "AUTHORS"
+.PP 
+Peter Bieringer <pb at bieringer.de>
+.SH "SEE ALSO"
+.B ipv6calc(8)
+


More information about the ipv6calc mailing list