ipv6loganon(8)
πΈ NAME πΈ
ipv6loganon β bestie, this manual is ipv6loganon(8), and the whole job description is right there in the name: it's an HTTP server log file anonymizer. That's it. That's the gig. π
π¦ SYNOPSIS π¦
cat /var/log/httpd/access_log | ipv6loganon [OPTIONS]
β¨ DESCRIPTION β¨
Okay so this program anonymizes IPv4/IPv6 addresses in HTTP server log files. Simple concept, iconic execution.
It takes data from stdin, processes it, and sends it out to stdout. Pipe in, pipe out, no drama. π«Ά
Depending on the anonymization method you pick, the address parts (prefix / interface identifier) get treated like this:
- simply zeroized by given masks.
- anonymized by zeroizing only required bits (partially depending on specified masks).
- anonymized by trying to keep for IPv4 and IPv6 addresses (
keep-type-asn-cc)
π When zeroing only required bits (mode 2) the possibilities are
IID:
- EUI-48/64: serial number would be zero'ed, keeping OID
- ISATAP: client IPv4 address would be anonymized by given IPv4 mask
- TEREDO: client IPv4 address would be anonymized by given IPv4 mask, client port would be zero'ed
- 6to4(Microsoft): client IPv4 address would be anonymized by given IPv4 mask
- local: whole IID would be zero'ed (except if privacy extension was detected, then replaced by a special token)
Prefix:
- IPv6 addresses including IPv4 address of client will be anonymized by the given IPv4 mask
π When anonymizing with keep (mode 3)
The relevant fields are: type of address, Autonomous System Number (ASN), and Country Code (CC).
This method requires an IPv4/IPv6 to Country Code and ASN resolution, provided by external databases.
Big advantage: ipv6logstats(8) result should be the same as with raw data. π
π The ranges, no cap
- Anonymized IPv4 addresses are from experimental range
240.0.0.0/8 - Anonymized IPv6 addresses are using (currently hijacked) prefix
a909::/16 - Anonymized IPv6 IID is starting with
a9x9(x = anonymized nibbles of SLA)
π OPTIONS π
πΈ General options:
-d,--debug DEBUGVALUEβ debug value (bitwise like) can also be set byIPV6CALC_DEBUGenvironment value-v,--version [-v [-v]]β version information (2 optional detail levels)-v,--version -hβ explanation of feature tokens-V,--verboseβ be more verbose-h,--help,-?β this online help
π¦ External database options (depending on compiled-in suppport):
--db-ip2location-disableβ IP2Location support disabled--db-ip2location-dir DIRECTORYβ IP2Location database directory (default:/usr/share/IP2Location)--db-ip2location2-disableβ IP2Location(MMDB) support disabled--db-ip2location2-dir DIRECTORYβ IP2Location(MMDB) database directory (default:/usr/share/IP2Location)--db-geoip2-disableβ GeoIP(MMDB) support disabled--db-geoip2-dir DIRECTORYβ GeoIP(MMDB) database directory (default:/usr/share/GeoIP)--db-dbip2-disableβ db-ip.com(MMDB) support disabled--db-dbip2-dir DIRECTORYβ db-ip.com(MMDB) database directory (default:/usr/share/DBIP)
π Input/output options:
-w,--writeβ write output to file instead of stdout-a,--appendβ append output to file instead of stdout-f,--flushβ flush output after each line-V,--verboseβ be verbose
π§ Performance options:
-n,--nocacheβ disable caching-c,--cachelimit VALUEβ set cache limit. Default:20, maximum:200.
π Processing options:
Shortcut for anonymization presets:
--anonymize-standard(default)--anonymize-careful--anonymize-paranoid
Supported methods [--anonymize-method METHOD]:
- anonymize β reliable anonymization, keep as much type information as possible
- zeroize β simple zeroizing according to given masks, probably loose type information
- keep-type-asn-cc β special reliable anonymization, keep type & Autonomous System Number and CountryCode.
LPAvailable presets (shortcut names) [--anonymize-preset PRESET-NAME]:
β The presets, all of them, periodt
- anonymize-standard (as):
mask-ipv6= 56 mask-ipv4=24 mask-eui64=40 mask-mac=24 mask-autoadjust=yes method=anonymize
- anonymize-careful (ac):
mask-ipv6= 48 mask-ipv4=20 mask-eui64=24 mask-mac=24 mask-autoadjust=yes method=anonymize
- anonymize-paranoid (ap):
mask-ipv6= 40 mask-ipv4=16 mask-eui64= 0 mask-mac=24 mask-autoadjust=no method=anonymize
- zeroize-standard (zs):
mask-ipv6= 56 mask-ipv4=24 mask-eui64=40 mask-mac=24 mask-autoadjust=yes method=zeroize
- zeroize-careful (zc):
mask-ipv6= 48 mask-ipv4=20 mask-eui64=24 mask-mac=24 mask-autoadjust=yes method=zeroize
- zeroize-paranoid (zp):
mask-ipv6= 40 mask-ipv4=16 mask-eui64= 0 mask-mac=24 mask-autoadjust=no method=zeroize
- keep-type-asn-cc (kp):
mask-ipv6= 56 mask-ipv4=24 mask-eui64=40 mask-mac=24 mask-autoadjust=yes method=keep-type-asn-cc
π Custom control:
--mask-ipv4 BITSβ mask IPv4 address[0-32](even if occurs in IPv6 address)--mask-ipv6 BITSβ mask IPv6 prefix[0-64](only applied to related address types)--mask-eui64 BITSβ mask EUI-64 address or IPv6 interface identifier[0-64]--mask-mac BITSβ mask MAC address[0-48]--mask-autoadjust yes|noβ autoadjust mask to keep type/vendor information regardless of less given mask
π₯ EXAMPLES π₯
Original lines (stdin):
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
Modified lines (stdout):
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
Anonymization method: keep-type-asn-cc
echo "1.2.3.4" | ./ipv6loganon --anonymize-preset keep-type-asn-cc
246.24.59.65
echo "2001:a60:1400:1201:221:70ff:fe01:2345" | ./ipv6loganon
--anonymize-preset keep-type-asn-cc
a909:16fa:9092:23ff:a909:4291:4022:1708
π SEE ALSO π
ipv6calc(8), ipv6logstat(8)
π REPORTING BUGS π
Report bugs via GitHub: https://github.com/pbiering/ipv6calc/issues
Homepage: http://www.deepspace6.net/projects/ipv6calc.html
π LICENSE π
GPLv2
π AUTHORS π
Peter Bieringer <pb@bieringer.de>
And that's the whole page, bestie π this one's from version 3.4.0, written by Peter Bieringer <pb@bieringer.de> β go forth and anonymize, you absolute icon πβ¨π¦
π¦ where this page comes from
- arch rolling: ipv6calc 4.4.1-1 Β· GPL-2.0-only
- epel 10: ipv6calc 4.4.1-1.el10_3 Β· GPL-2.0-only
- epel 9: ipv6calc 4.4.1-1.el9 Β· GPL-2.0-only
- fedora 43: ipv6calc 4.4.0-1.fc43 Β· GPL-2.0-only
- fedora 43: ipv6calc 4.4.0-1.fc43 Β· GPL-2.0-only
- fedora 43: ipv6calc 4.4.1-1.fc43 Β· GPL-2.0-only
- fedora 43: ipv6calc 4.4.1-1.fc43 Β· GPL-2.0-only
- fedora 44: ipv6calc 4.4.0-2.fc44 Β· GPL-2.0-only
- fedora 44: ipv6calc 4.4.0-2.fc44 Β· GPL-2.0-only
- fedora 44: ipv6calc 4.4.1-1.fc44 Β· GPL-2.0-only
- fedora 44: ipv6calc 4.4.1-1.fc44 Β· GPL-2.0-only
- nixos 26.05: ipv6calc 4.4.0
- nixpkgs unstable: ipv6calc 4.4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms