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

May 9, 2018 389 views
Nginx Ubuntu 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 ?

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 ...

Have another answer? Share your knowledge.