Would it be possible to take the ip address of a wireless router that an android phone would connect to and determine in the app the relative location of the ip?
Yes. As long as the device is on, connected to yours and doesn't have a proxy server or VPN obscuring it, you can track the IP address. If you want to find the IP of a device you're connected to, you can use the “netstat -an” command in the command prompt. This will give you a list of all the devices talking to yours.
Find the page in your router web interface that lists the devices connected to your router. For NETGEAR routers, click BASIC > Attached Devices. Some models might use a slightly different menu label, like Device Manager. A Device Name and IP Address displays for each connected device.
The IP lookup tool can give you exact location details of an IP address. If you already know the IP address, you can find out the city, state, zip code and country of an IP address instantly.
There's lots of online APIs available to determine a location based on an IP address, e.g. here, here, or here.
You could make a request to one of those services, passing in the appropriate "Internet-facing" IP address (which is different than the internal IP address that usually starts with 192.168.
, see here for an explanation).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With