Search code examples
web-servicesnetwork-programmingconnectionipwan

How to find the WAN ip for a connected computer


I have been trying to get the IP of a person on my network, so I tried pinging them and finding their ip on my network site, but it didn't give me their WAN ip. Please help.


Solution

  • if the client is in your network you will probably stay in your LAN - therefore you will get the response from the private IP of course. the WAN IP is only used when the client tries to access some IP on a public range.

    one option is to ask the client to visit something like http://www.whatismyip.com/ and tell you the output or host a service yourself that is doing something similar.