1ipv6loganon(8) system tools ipv6loganon(8)
2
3
4
6 ipv6loganon - HTTP server log file anonymizer
7
9 cat /var/log/httpd/access_log | ipv6loganon [OPTIONS]
10
12 This program anonymizes IPv4/IPv6 addresses in HTTP server log files
13
14 Takes data from stdin, processes it to stdout.
15
16 Depending on the anonymization method, address parts (prefix/interface
17 identifier) are
18
19 1. simply zeroized by given masks.
20
21 2. anonymized by zeroizing only required bits (partially depending on
22 specified masks).
23
24 3. anonymized by trying to keep for IPv4 and IPv6 addresses
25 (keep-type-asn-cc)
26
27 When zeroing only required bits (mode 2) the possibilities are
28
29
30 IID:
31
32 EUI-48/64:
33 serial number would be zero'ed, keeping OID ISATAP:
34 client IPv4 address would be anonymized by given IPv4
35 mask TEREDO: client IPv4 address would be anonymized by
36 given IPv4 mask, client port would be zero'ed
37
38 6to4(Microsoft):
39 client IPv4 address would be anonymized by given IPv4
40 mask
41
42 local: whole IID would be zero'ed (except if privacy extension
43 was detected, then replaced by a special token)
44
45 Prefix:
46 IPv6 addresses including IPv4 address of client will be
47 anonymized by the given IPv4 mask
48
49
50 When anonymizing with keep (mode 3) the relevant fields are: type of
51 address, Autonomous System Number (ASN), and Country Code (CC)
52
53 This method requires an IPv4/IPv6 to Country Code and ASN resolution,
54 provided by GeoIP
55
56 Big advantage: ipv6logstats(8) result should be the same as with raw
57 data
58
59 Anonymized IPv4 addresses are from experimental range 240.0.0.0/8
60
61 Anonymized IPv6 addresses are using (currently hijacked) prefix
62 a909::/16
63
64 Anonymized IPv6 IID is starting with a9x9 (x = anonymized nibbles of
65 SLA)
66
68 General options:
69
70 [-d|--debug DEBUGVALUE]
71 debug value (bitwise like) can also be set by IPV6CALC_DEBUG
72 environment value
73
74 [-v|--version [-v [-v]]]
75 version information (2 optional detail levels)
76
77 [-v|--version -h]
78 explanation of feature tokens
79
80 [-V|--verbose]
81 be more verbose
82
83 [-h|--help|-?]
84 this online help
85
86 External database options (depending on compiled-in suppport):
87
88 [--db-ip2location-disable]
89 IP2Location support disabled
90
91 [--db-ip2location-dir DIRECTORY]
92 IP2Location database directory (default: /usr/share/IP2Location)
93
94 [--db-geoip-disable]
95 GeoIP support disabled
96
97 [--db-geoip-dir DIRECTORY]
98 GeoIP database directory (default: /usr/share/GeoIP)
99
100 Input/output options:
101
102 [-w|--write]
103 write output to file instead of stdout
104
105 [-a|--append]
106 append output to file instead of stdout
107
108 [-f|--flush]
109 flush output after each line
110
111 [-V|--verbose]
112 be verbose
113
114 Performance options:
115
116 [-n|--nocache]
117 disable caching
118
119 [-c|--cachelimit VALUE]
120 set cache limit. Default: 20, maximum: 200.
121
122 Processing options:
123
124 Shortcut for anonymization presets:
125
126 --anonymize-standard (default)
127
128 --anonymize-careful
129
130 --anonymize-paranoid
131
132 Supported methods [--anonymize-method METHOD]:
133
134 anonymize
135 reliable anonymization, keep as much type information as possi‐
136 ble
137
138 zeroize
139 simple zeroizing according to given masks, probably loose type
140 information
141
142 keep-type-asn-cc special reliable anonymization, keep type &
143 Autonomous System Number and CountryCode. LP Available presets
144 (shortcut names) [--anonymize-preset PRESET-NAME]:
145
146 anonymize-standard (as):
147 mask-ipv6= 56 mask-ipv4=24 mask-eui64=40 mask-mac=24
148 mask-autoadjust=yes method=anonymize
149
150 anonymize-careful (ac):
151 mask-ipv6= 48 mask-ipv4=20 mask-eui64=24 mask-mac=24
152 mask-autoadjust=yes method=anonymize
153
154 anonymize-paranoid (ap):
155 mask-ipv6= 40 mask-ipv4=16 mask-eui64= 0 mask-mac=24
156 mask-autoadjust=no method=anonymize
157
158 zeroize-standard (zs):
159 mask-ipv6= 56 mask-ipv4=24 mask-eui64=40 mask-mac=24
160 mask-autoadjust=yes method=zeroize
161
162 zeroize-careful (zc):
163 mask-ipv6= 48 mask-ipv4=20 mask-eui64=24 mask-mac=24
164 mask-autoadjust=yes method=zeroize
165
166 zeroize-paranoid (zp):
167 mask-ipv6= 40 mask-ipv4=16 mask-eui64= 0 mask-mac=24
168 mask-autoadjust=no method=zeroize
169
170 keep-type-asn-cc (kp):
171 mask-ipv6= 56 mask-ipv4=24 mask-eui64=40 mask-mac=24
172 mask-autoadjust=yes method=keep-type-asn-cc
173
174 Custom control:
175
176 --mask-ipv4 BITS
177 mask IPv4 address [0-32] (even if occurs in IPv6 address)
178
179 --mask-ipv6 BITS
180 mask IPv6 prefix [0-64] (only applied to related address types)
181
182 --mask-eui64 BITS
183 mask EUI-64 address or IPv6 interface identifier [0-64]
184
185 --mask-mac BITS
186 mask MAC address [0-48]
187
188 --mask-autoadjust yes|no
189 autoadjust mask to keep type/vendor information regardless of
190 less given mask
191
193 Original lines (stdin):
194
195 207.46.98.53 - - [01/Jan/2007:00:01:15 +0100] "GET
196 /Linux+IPv6-HOWTO/x1112.html HTTP/1.0" 200 6162 "-" "msnbot/1.0
197 (+http://search.msn.com/msnbot.htm)" 253 6334
198
199 2002:52b6:6b01:1:216:17ff:fe01:2345 - - [10/Jan/2007:15:04:28 +0100]
200 "GET /favicon.ico HTTP/1.1" 200 4710
201 "http://www.bieringer.de/linux/IPv6/" "Mozilla/5.0 (X11; U; Linux i686;
202 en-US; rv:1.8.0.9) Gecko/20061219 Fedora/1.5.0.9-1.fc6 Firefox/1.5.0.9
203 pango-text" 413 5005
204
205 Modified lines (stdout):
206
207 207.46.98.0 - - [01/Jan/2007:00:01:15 +0100] "GET
208 /Linux+IPv6-HOWTO/x1112.html HTTP/1.0" 200 6162 "-" "msnbot/1.0
209 (+http://search.msn.com/msnbot.htm)" 253 6334
210
211 2002:52b6:6b00:0:216:17ff:fe00:0 - - [10/Jan/2007:15:04:28 +0100] "GET
212 /favicon.ico HTTP/1.1" 200 4710 "http://www.bieringer.de/linux/IPv6/"
213 "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20061219
214 Fedora/1.5.0.9-1.fc6 Firefox/1.5.0.9 pango-text" 413 5005
215
216
217
218 Anonymization method: keep-type-asn-cc
219
220 echo "1.2.3.4" | ./ipv6loganon --anonymize-preset keep-type-asn-cc
221 246.24.59.65
222
223 echo "2001:a60:1400:1201:221:70ff:fe01:2345" | ./ipv6loganon
224 --anonymize-preset keep-type-asn-cc
225 a909:16fa:9092:23ff:a909:4291:4022:1708
226
228 ipv6calc(8), ipv6logstat(8)
229
231 Report bugs via GitHub:
232 https://github.com/pbiering/ipv6calc/issues
233 ⟨https://github.com/pbiering/ipv6calc/issues⟩
234
235 Homepage: http://www.deepspace6.net/projects/ipv6calc.html
236 ⟨http://www.deepspace6.net/projects/ipv6calc.html⟩
237
239 GPLv2
240
242 Peter Bieringer <pb@bieringer.de>
243
244
245
246Peter Bieringer <pb@bieringer.de> 2.0.0 ipv6loganon(8)