Live data from Hacker News

How to build a IP geolocation database from scratch?

ipapi.is

91–100 of 186 posts

Re: How to build a IP geolocation database from scratch?

#91
post #80
post #77

Earlier quoted context omitted.

Would you consider no-signup inspection of the data you hold on the requesters IP address? I would love to see what you have on MY IP address, and if sufficiency accurate it feels that it would be a good incentive to sign up to use commerically. It feels like it couldn't be abused by 'freeloaders', because i'd guess their use-case is viewing other peoples.

This is literally the most prominent thing on the https://ipinfo.io home page.

Huh, that's cool. It got my home IP about 15 miles from where I am, but still not bad.

Wait - how does this work for cell IPs? A lot of cellphone v4 IPs are now shared between hundreds or thousands of devices, right?

Re: How to build a IP geolocation database from scratch?

#93

Earlier quoted context omitted.

I just noticed that my wifes iphone uses the same mycingular ip address while driving accross 3 states over 5 hours.l while checking mail.

There's several options/techniques for doing it. But just imagine you have a permanent zero overhead VPN. I don't know if that provider terminates long running calls, but the calls would stay up too regardless of tower.

Yes, I’m sure it is iOS anti-tracking and directly related to why firewall apps inside SIP my not know what is going on.

Re: How to build a IP geolocation database from scratch?

#94
post #40

First, I am big fan of your articles even before I joined IPinfo, where we provide IP geolocation data service. Our geolocation methodology expands on the methodology you described. We utilize some of the publicly available datasets that you are using. However, the core geolocation data comes from our ping-based operation. We ping an IP address from multiple servers across the world and identify the location of the I…

Not gonna lie, this creeps the heck out of me.

Together with the tons of data leaked by browsers it makes it very easy to track people across places and devices.

Re: How to build a IP geolocation database from scratch?

#96

Earlier quoted context omitted.

Big fan of what articles? On https://incolumitas.com/ or on https://ipapi.is/ ? Great idea with latency triangulation, I used latency information for a lot of things, especially VPN and Proxy detection. But I didn't assume you can obtain that accurate location. I am honestly impressed. But latency triangulation with 600 servers gives some very good approximation. Nice man! Some questions: - ICMP traffic is penalised/…

https://incolumitas.com/ This is my all-time favorite article: https://incolumitas.com/2021/11/03/so-you-want-to-scrape-lik... I used to do freelance web scraping, and that article felt like some kind of forbidden knowledge. After reading the article, I went down the rabbit hole and actually found a Discord server that provided carrier-grade traffic relay from a van which contained dozens of phones. For the questions…

[flagged]

Re: How to build a IP geolocation database from scratch?

#97

Earlier quoted context omitted.

I really appreciate. Thank you. We are very transparent about our process. If you have any questions, you can always reach out to us. We have a simplified explanation of our probe network here: https://ipinfo.io/blog/probe-network-how-we-make-sure-our-da... The only update is the number of servers is like 600+ now. The probe network is growing extremely rapidly. Our IP geolocation process is quite complicated, and we…

Just wanted to let you know, it's this transparency that turned me into a customer! I love your company and service, but I hate your pricing. I work with a lot of small clients/apps that paying for usage would be a no-brainer, but the defined monthly price buckets don't make any economical sense at their scale. If you added a "pay as you go" tier that a small app could reasonably start by using dollars worth of API c…

Thank you very much; I really appreciate your feedback. This is not the first time I have heard this. The solution is to try to take as much advantage as you can from the free tier.

# Check out the free IP databases

https://ipinfo.io/products/free-ip-database

The free databases come with commercial usage permission, and because they are databases, you can make unlimited lookups from them. The databases provide full accuracy and are updated daily. They are just a subset of our IP geolocation database that only provides IP to Country information.

# Complement the database with the API service

If you only want city-level information, switch to the API service. Use the database to look up IP-to-country information as many times as you want. However, use the API service only when necessary.

Additionally, if you include a credit link to us, we will double your API limit to 100k/month. Visit https://ipinfo.io/contact/creditlink.

# Cache data

All of our API libraries have native caching support. We strongly recommend that users reduce their number of requests by caching the response. I highly recommend you check out our libraries: https://github.com/ipinfo

---

The only challenge with the free IP databases is that you need to host the database somewhere to lookup the IP to Country information. Having an API service with nearly unlimited lookups for IP to Country information will be fantastic.

If you know someone who has an IP to Country as API service please, let me know. We only require an attribution for using our database. If you have a similar service that is popular but don't want to maintain it let us know as well, we can takeover the site and host it ourselves with the IP to Country data.

Re: How to build a IP geolocation database from scratch?

#98

If you don't want to do this yourself, you can actually just get Cloudflare to do it for you for free using a simple Worker since all Cloudflare requests contain approximate IP location information. You can also just send a request to my URL (Cloudflare Worker operated - so it should have global low latency): https://www.edenmaps.net/iplocation Use it for small applications, I don't mind. Just don't start sending me…

This is excellent! Would you mind open sourcing the code for that?

This is the code running this endpoint:

  export function onRequest(context) {
    return new Response(JSON.stringify([parseFloat(context.request.cf.longitude), parseFloat(context.request.cf.latitude)]), {headers: {"Content-Type": "application/json;charset=UTF-8"}})
  }

This is a function on Cloudflare Pages (which is just a different name for Cloudflare Workers). Minor adjustment needed for Workers (get rid of "context", I believe)

Re: How to build a IP geolocation database from scratch?

#99

Earlier quoted context omitted.

I really appreciate. Thank you. We are very transparent about our process. If you have any questions, you can always reach out to us. We have a simplified explanation of our probe network here: https://ipinfo.io/blog/probe-network-how-we-make-sure-our-da... The only update is the number of servers is like 600+ now. The probe network is growing extremely rapidly. Our IP geolocation process is quite complicated, and we…

Just wanted to let you know, it's this transparency that turned me into a customer! I love your company and service, but I hate your pricing. I work with a lot of small clients/apps that paying for usage would be a no-brainer, but the defined monthly price buckets don't make any economical sense at their scale. If you added a "pay as you go" tier that a small app could reasonably start by using dollars worth of API c…

[flagged]

Re: How to build a IP geolocation database from scratch?

#100
post #49

Earlier quoted context omitted.

iptables -A INPUT -p icmp -j DROP

Indeed. Openwrt for some reason defaults to reply to pings. I see the value of ICMP for servers, but I don't see the value for home ISP routers. I disabled ICMP reply on my home router.

> Openwrt for some reason defaults to reply to pings.

it's a bit like greeting-back ppl on the street.

not doing it will not make you invisible. it will break somebody's assumption of decency, but most ppl don't care either way.

Post reply on HN