获取真实的IP地址
问题描述:
你好,
我正在处理必须查找访问我的网站的LAN机器的IP地址的应用程序.但是我找不到该机器的真实IP地址.
请帮助我从Web应用程序中找到网络计算机的真实IP地址.
非常感谢...
Sahil Banker
Hello,
I am working on the application in which I have to find the IP Address of the LAN machine which visits my website. But I am not able to find the real IP Address of that machine.
Please help me to find out real IP Address of network machine from web application.
Thanks A Lot...
Sahil Banker
答
尝试这些
获取用户的IP地址 [获取用户IP地址 [ ^ ]
在ASP.NET中的代理后面查找IP地址 [ ^ ](要找到位于LAN后面的计算机的IP地址,您可以使用此代码)
Try these
Get users IP address[^]
Retrieve a Users IP Address[^]
Find IP Address in ASP.NET Behind Proxy[^](To find IP address of a machine behind LAN you can use this code)
这就是它的美丽:)
使用NAT,IP由路由器转换回客户端计算机.您只看到该路由器的IP,它也可以用作基本防火墙.但是,为什么您需要知道该地址?当您不属于同一NAT时,它是无用的.与许多其他计算机一样,该计算机的IP为192.168.1.x,但它不是可用于通过Internet追溯该计算机的IP.但是您也不需要它.
http://en.wikipedia.org/wiki/Network_address_translation [
That is just the beauty of it :)
Using NAT the IP is translated back to the client machine by the router. You just see the IP of that router that is also working as a basic firewall. But why would you need to know that address? It is useless when you are not a part of that same NAT. The IP of that machine will be 192.168.1.x like so many other machines but it isn''t an IP you can use to trace back the machine over Internet. But you also wouldn''t need it though.
http://en.wikipedia.org/wiki/Network_address_translation[^]
Good luck!