4

I'd like to give my server's visitors more anonymity and do not want to store their IP address in the access and error logs anymore. This is possible in several ways, e.g. by following ApacheLogsWithoutIPs or just using mod_removeip.

Unfortunately this means that I cannot track the number of unique visitors to my site anymore - which is a problem for me.

Thus I'm looking for a way to store an anonymized IP address in the apache logs that doesn't reveal the user's real IP address but still allows to differentiate between the visitors in awstats. What can I do? I'd prefer an Apache in-built solution and not a script that walks over the logs after writing them.


Related:

1 Answer 1

4

If you want to use an apache module there is mod_anonstats, which can be used to hash the ip address using md5.

If you need to track distinct users, just keep the ASSaltTimeout parameter to a high value.

3
  • 1
    The referenced module is no longer available.
    – Daniel
    Jan 9, 2018 at 11:58
  • 1
    Also note that using md5 for such a limited input range does not really provide anonymity - the IP can be obtained by brute forcing the hash.
    – Scolytus
    May 17, 2018 at 12:38
  • @Scolytus Note that one can simply add a periodically randomized salt to the pre-hash.
    – Otheus
    Jul 24, 2021 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.