REMOTE_ADDR when monitoring from an external server

Dear all,

I just installed Piwik for the first time and it works all except the IP visitor. As I have not experience in piwik I hope the problem is due to something I don't undestand very well.

My installation is as follow:

  • Server A is my web and ftp server installed in the DMZ (ip
  • Server B is in my intranet and is the server where I installed Piwik (ip. and can’t be accessed outside the firewall
  • The firewall’s ip is
  • In server A (web server) I copy of PiwikTracker.php that I include in the pages that I want to track in this way (more or less):
require_once ("PiwikTracker.php" ) PiwikTraker::$URL = "http://serverB/piwik"; $p = new PiwikTracker(1); Site 1 $p->doTrackPageView();

All the logs works fine but the IP visitors is always “” (the firewall ip) (is the same when I visits from my intranet or outside).

I look the documentation but I don’t know what I must do for log the real IP. I can see that in serverA the "$_SERVER[‘REMOTE_ADD’] is the visitors IP but I can NOT send or force it to server B.

Any idea ?



yes. it’s a known problem. we’ll fix it.

yes. it’s a known problem. we’ll fix it.[/quote]

hi @All,

i have a similar problem. I include the PiwikTracker.php from my local site and now my local serverip will be logged inside piwik.
The client IP is succesfully seen in the Request to my piwikserver. - - [01/Jun/2012:14:38:58 +0200] "GET /piwik.php?idsite=6&rec=1&apiv=1&r=529862&[b]cip=[/b]&_id=1f0088e5232f020b&res=1600x1400& HTTP/1.1" 200 43 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5"

In the piwiktracking site the source IP will be recorded:

Fr 1 Jun - 13:40:13
IP: [b][/b]
Provider: Hosteurope