Anonymizing IP addresses by having NGINX not send those over to the application it is serving ?

Posted May 9, 2018 1k views
NginxUbuntu 16.04

This might be completely undoable, but I have to ask anyway. I am running a tracking / analytics script called cpvlab and this script stores the IP addresses of visitors in the DB.

I have no problem in anonymizing the nginx access logs. This I can do.

However the script still stores the regular IP’s in the DB.

Anyone have an idea how I can force it to do otherwise ? Could it be that it takes the IP from NGINX somehow ? Maybe if I can strip the IP at the level of nginx, I could force the script to store blanks ?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

What is the tracking/analytics script that you are using? It would likely be easier to have the script not store the IP address then to adjust Nginx not to send it. It is also possible that the tracking script you are using will not work without IP address if it is using this along with a session cookie to track users.

The script is called CPVlab … and yes, what you said makes sense and but the source is encoded with ioncube, so I can’t see the source and I’m just guessing to where it strips the IP address from. It might also very well be that I cannot change that behavior … but I who knows, maybe nginx serves it to the script …