Apache: Anonymisierung IP-Adressen

Admin,MPDL

Import Module Log-IP-Masking

 * Download module from http://www.saechsdsb.de/images/stories/sdb_inhalt/schwerpunkt/ipmask/mod_log_ipmask-Linux_v2.2.x_x64.zip
 * Extract the module on the folder of the other modules
 * On SLES it is /usr/lib64/apache2
 * Change the rights of mod_log_ipmask.so to 775
 * Make a Sym-Link to ../apache2-prefork/mod_log_ipmask.so
 * On SLES it's ln -s /usr/lib64/apache2/mod_log_ipmask.so ../apache2-prefork/mod_log_ipmask.so
 * Edit the file which the modules load
 * On SLES it's /etc/sysconfig/apache2
 * Search in this file "APACHE_MODULES"
 * Add in APACHE_MODULES "log_ipmask"
 * Save the file
 * Now restart apache with rcapache2 restart

Bind Log with a script

 * Download the script from http://www.zendas.de/technik/sicherheit/apache/index.html
 * Save it in /usr/local/bin/aplog-anon
 * Edit the default_server.conf in /etc/apache2/ or for virtual hosts in the *.conf file in /etc/apache2/vhosts.d/
 * Add this line "CustomLog "|/usr/local/bin/aplog_anon /var/log/apache2/access_log" combined" and delete if exist the old CustomLog Entry in this file.
 * Save the file
 * Restart Apache with "rcapache2 retart"