Closed schroedingerkitten closed 2 years ago
For Anonip to work, the format of the log file needs to have the IP address at a predictable location. Unfortunately with nginx it's not possible to configure the format of the error-log AFAIK.
In your seconds example (anonip --delimiter "," --column 2
), the string that's found is client: XXX.XXX.XXX.XXX
. If the client:
prefix is consistent, we could handle it. But it seems unreliable to me, because the error string comes before the IP address. If that error string contains a ,
, detection of the IP address will fail.
I have trouble getting anonip to mask IPs in my nginx error.log file.
When I execute anonip as root, I receive the following error message:
With XXX.XXX.XXX.XXX being some IP address (not masked) and address.tld the domain of the server.
I already tried the --delimiter and --column options:
Somehow I would need to tell anonip to look behind "client:", but that's not possible.
I thought anonip would work with error logs out of the box. Or have there been some recent changes in the way nginx is formating the error logs?
I am using nginx version nginx/1.14.0 (Ubuntu) and anonip 1.0.0 (installed through pip3).