views:

519

answers:

7

For example I want to go to every coffee shop in my town that has WiFi and know what IP they are providing, so that later I could check anybody`s IP and know where is he. Is it possible to do so? What can be wrong with this approach, how can one trick me and show some other IP?

P.S. Just think it would be cool to have where are you service in every town :-).

A small update: I agree about privacy violation and so on. But I'm not going to wirte peoples IP and location if they do not want them to. Same with organizations. Only if one like to be marked in my IP DB I'll add him. So I think there's no privacy violation. and coffee shops can benefit from this, because when one writing about how tasty was their candies you know exactly if person really visited the coffee shop and could try them and how long ago that was. So it's like I was there 2 days ago, tried them, they are very tasty. and you believe he really was!

+3  A: 

Many services provide this, like http://www.ip2location.com/

The problem is IPs change all the time. Even if you have up-to-date information, you really only know where someone's ISP is, not his home. The ISP has the data, but they won't probably share it.

moogs
Actually this service can tell you the country. As he told me I`m from Moscow, and I`m from Krasnoyarsk and these towns are too far away from each other. And I need a precise position inside the town. So that you can see people on town`s map. As persons in the city can mark where they are in the town you`ll be able to get a very precise position of anyone.
Yaroslav Yakovlev
+1  A: 

While that sort of mapping is arguably possible; it's not reliable, and it's quite an invasion of privacy, IMHO.

Noon Silk
No and no. It's quite reliable and is not an invasion.
pbreitenbach
You're completely wrong.
Noon Silk
It's definitely not reliable, as an example most ip geolocation services return the city where the main office of my isp is located which is about 1200kms from my location when given my ip.
Element
+2  A: 

You can try the IP Address Locator. You can use this PHP code to get the location programatically -

$tags = get_meta_tags('http://www.geobytes.com/IpLocator.htm?GetLocation&template=php3.txt&IpAddress=195.252.12.12');
print $tags['city'];  //City Name
Kirtan
+1  A: 

Also it will give you the location of the service provider, not the actual person. In some cases the provider can be as much as 500 miles away, although it's usually fairly nearby (I live in Berkeley and my provider is in southern San Francisco - around 30 miles).

Eli
Yes, that`s why I need an intown precise location. And asking is there a way to get IP address of a place? If there is I can mark these Ips with place names and it is done :-). Sure I`ll need to refresh this info when Ips are changed, but If that`s inside the town it is easier to do, than when it`s all over the world :-)
Yaroslav Yakovlev
+1  A: 

No in general case. For example, I often use Swedish VPN from my home, and my home is far, far away from Sweden.

maykeye
+1  A: 

It will not be reliable, I could use a VPN or a proxy and you would detect that IP instead of the one I obtained from the coffee shop's wifi.

Also, like others have mentioned you would be limited to the ISP's IP given to the shop's connection. I remember trying to determine my own location using that method. Although I was in Montréal the IP location would sometimes determine my location as in Toronto. This was most likely because my ISP was relaying traffic internally to another endpoint on their own backbone. Thus I really emerged on the net in Toronto, anything beyond that is part of a private network under the ISP`s control.

Another side effect worth mentioning, say two of the coffee shops use the same ISP, both have DHCP as it would most likely be the case, it is very well possible that the IP given to shop A will end up at shop B when the IP addresses leases are renewed. Thereby annihilating all sort of consistency from a home grown database.

So.. short answer.. technically it is possible, but realistically there is a very good change if it being useless for the level of granularity you want. If the shops were in different countries then you would have a better chance of getting it right (country that is), supposing of course I was not tunneling my traffic elsewhere.

You could always hack their router and install some sort of packet tagging in it... tough you did not hear that from me ;-)

Newtopian
That`s a very good idea! Those ones who want may install some software from me so that I could always know what`s their IP. So I`m like coming to their place and installing an util that will ping several times a day and will say I`m coffee shop with big chocolate candies and hot coffee and my IP now is xx.xx.xx.xxWhat do you think? Sure for those who do not like to do that I can`t do anything, but for those who like to benefit from this it may be a good chance.
Yaroslav Yakovlev
+1  A: 

Many users don't even have an external IP address - they all share the ISP's gateway IP address. In this case the IP can be at best mapped to the gateway location, not user location.

If the user has an external IP address no service will for sure provide information for that because it's privacy violation. You would need a court decision to get this information.

For your problem if each coffee shop has a fixed range of IP addresses you can really record them - just walk in, use their WiFi and record the address. Once you've gathered enough data you can try to deduce if there's a usable pattern. Again it's possible that all shops of one brand will have a centralized pool of addresses leased to each user and then you're out of luck.

sharptooth