Doken13, here's sample code to retrieve either a real client IP
or a proxy's IP...and determine which is which :
// HTTP_VIA is not null if there's a proxy between your server and the client
if(Context.Request.ServerVariables["HTTP_VIA"]!=null)
{
// So, this code returns the client's real IP
ip=Context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString();
}
else
{
// not using proxy or can't get the Client IP
//doesn't get the Client IP, but returns proxy IP
ip=Context.Request.ServerVariables["REMOTE_ADDR"].ToString();
}
As George says, you can not always get the Client IP through a proxy because
either a proxy will not send the client IP to you or a client can also be prevented
from sending its IP by the use of "header_access deny".