title: How do I get the correct IP from HTTP_X_FORWARDED_FOR if it contains multiple IP Addresses?
body: <p>If Request.ServerVariables["HTTP_X_FORWARDED_FOR"] returns multiple ip's, which one do I take and how would I do it in c#?  It is my understanding that if it is blank or null, then the client computer is not going through a proxy and I can just get their ip from Request.ServerVariables["REMOTE_ADDR"].  Is this a correct statement?</p>
  
  <p>By "which one do I take", I mean do I take the first IP in the list or the last IP and is all I have to do is just split it into an array and take the one I want.  I am not really sure how HTTP_X_FORWARDED_FOR works.</p>