- Plesk for Linux
How to anonymize IP addresses in log files?
The feature nulls up the last octet of IPv4 and the last group of IPv6 addresses during rotation of the following logs:
The anonymization works for rotated logs only. Therefore, logs of services like Fail2ban that work only with active logs are not anonymized.
The feature was implemented in the following products:
and can be enabled in Plesk > Tools & Settings > Server Settings > Anonimyze IPs during log rotation.
For older Plesk versions, the following workaround is available:
Login to Plesk via SSH.
Download the script:
# wget https://support.plesk.com/hc/en-us/article_attachments/360006368973/enable-ip-anonimization.sh.tar.gz
Unpack it and make executable:
# tar -xvf enable-ip-anonimization.sh.tar.gz && chmod +x enable-ip-anonimization.sh
Execute the script:
Note: This solution will anonimyze IP addresses in AWStats and Webalizer starting from the update 17.8 #20.
Note: usage of AWStats is discouraged due to to the bug #PPPM-10655 - Old AWStats files are left in the directory.