突然$ _SERVER ['REMOTE_ADDR']开始返回10.10.10.10 php

On my production site, I'm keeping the log for users when they visited my site (ie login, logout) with their IP address.I'm using $_SERVER['REMOTE_ADDR'] to get IP. It was storing accurate IP of visitor before but suddenly this variable started returning 10.10.10.10 for all of my customers.

It is happening from 01-31-2011.

What could be the causes?

server info : LAMP EDIT: Now I have below function which is also returning same 10.10.10.10

function GetIP()
{
       if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"),
"unknown"))
               $ip = getenv("HTTP_CLIENT_IP");
       else if (getenv("HTTP_X_FORWARDED_FOR") &&
strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown"))
               $ip = getenv("HTTP_X_FORWARDED_FOR");
       else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown"))
               $ip = getenv("REMOTE_ADDR");
       else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] &&
strcasecmp($_SERVER['REMOTE_ADDR'], "unknown"))
               $ip = $_SERVER['REMOTE_ADDR'];
       else
               $ip = "unknown";
       return($ip);
}

Thanks

That IP is an IANA "Black hole" address - no one is using it, and it is not considered a valid public IP address. Typically, it is used in code as a placeholder for an IP, or to mock code.

Are you certain you have not used a snippet of code somewhere that is overwriting this value? Check around for an accidental if($_SERVER['REMOTE_ADDR'] = '10.0.10.10') (note the single equals sign). In short - that address cannot possibly be legitimate.

It is, however, legit to use as an internal IP. As has been suggested by others, this may be the result of internal request routing. Check with your host to see if there have been any changes in network structure.

If you (or your provider) added a load balancer then REMOTE_ADDR would show IP address of the Balancer. To get users IPs use REMOTE_IP instead