How to find the IP address of system throughout the network
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6803073/get-local-ip-address-c-sharp">Get local ip address c#</a>  </p>
</blockquote>



<p>Currently I am using following code for getting the ip addrress of each machine who have logged in my website. It is working fine if my website is in my intranet server.But if the same code is deployed at customer server and if I am accessing the site from my place using to customer application URL like <code>(http://123.23.45.89/MyProd/App.htm)</code>, it is updating the ip addreress of my server address,not my local machine IP.</p>

<pre><code>string IP4Address = String.Empty;

foreach (IPAddress IPA in Dns.GetHostAddresses(Request.ServerVariables["REMOTE_ADDR"].ToString())))
{
  if (IPA.AddressFamily.ToString() == "InterNetwork")
  {
    IP4Address = IPA.ToString();
    break;
  }
}

if (IP4Address != String.Empty)
{
  return IP4Address;
}

foreach (IPAddress IPA in Dns.GetHostAddresses(Dns.GetHostName()))
{
  if (IPA.AddressFamily.ToString() == "InterNetwork")
  {
    IP4Address = IPA.ToString();
    break;
  }
}

return IP4Address;
</code></pre>

<p>If there is any other way to find the ip address for individual PC.(like finding the local ip addess from any machine through out internet Network)</p>
