reported in forum post
This is because at https://github.com/piwik/piwik/blob/master/misc/proxy-hide-piwik-url/piwik.php#L101
we simply read REMOTE_ADDR but should also read other parameters that we know could contain IP?
As reported in that thread, the user got it working after adding adding the proxy_client_headers, proxy_host_headers.
Closing, as this is an environment/configuration issue, already covered by http://piwik.org/faq/how-to-install/#faq_98
Indeed his bug was fixed but technically the problem exists that if the server being tracked is behind a proxy, then IP tracking will not work.
For me, the problem was solved by using REMOTE_ADDR as Client Header.
I assume the bug hides in using HTTP_X_FORWARDED_FOR. There are (in my case) 3 IPs, seperated by Comma and it seems that Piwik takes the LAST IP instead of the first.
This issue still happening to me. I have followed the instructions in FAQ and tried what campino2k said. Doesnt work for me. Check my post --> http://forum.piwik.org/read.php?2,106184
As of Piwik 2.2.2 stable, proxy_client_headers[] = HTTP_X_FORWARDED_FOR seems to have no effect when the CDN server acts as a reverse proxy.
In 300d3c27bfbb89b2e3aef0be04de3004afc2d4ff: Fixes #2900 Now reading 'HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'HTTP_CF_CONNECTING_IP' and falling back to REMOTE_ADDR
Getting visitor IP via proxy script should now work!
This was also reported in: http://forum.piwik.org/read.php?2,115900