25 comments

[ 83.5 ms ] story [ 1869 ms ] thread
What's the response? Just country name?

I've been using this recently to suggest locations when users set up a feed: https://freegeoip.net/

It uses MaxMind data.

Country name only
I did something similar: https://ifcfg.me

Also via json: https://ifcfg.me/json

What is the rate limit for use on your service? I have a demo I keep trying to get onto HN but it falls over when it hits the front page.
There is none, what did you tried exactly, can you show some code?
I haven't tried it with your service yet - but I will now - thanks!
Huge fan. Use this nearly daily in my terminal opening screen; nice and quick to tell you where are, net-wise.
How did you get LAN-Addresses and Internet Service Provider?

Is this on GitHub by chance?

For most people's uses, the AS Number & info for an IP is sufficient.

I suspect perhaps s/he's using an older/outdated GeoIP database/service as the AS Number returned for my IP is wrong.

The LAN address lookup (which doesn't work on Safari) is utilising a security hole in WebRTC.

I run http://ipof.in which provides data in various formats
Your GeoIP response is bundled into a single array? That seems incredibly hard to parse and groc.

"geoip": [ 0, 37.7957, -122.4209, "California", "San Francisco", "United States" ],

Some services will geolocate you by looking at your DNS server's geolocation, so when you try to resolve their endpoint www.example.com you'll get back an IP address pointing to the closest datacenter.

How do you know how is your DNS server geolocated? I made a tiny proof of concept of a DNS reflector with a little extra:

$ dig +short whoami.fluffcomputing.com txt

Or in Windows:

nslookup -type=txt whoami.fluffcomputing.com

Or in PowerShell:

(Resolve-DnsName -Type txt -Name whoami.fluffcomputing.com).strings

The DB used is MaxMind's GeoLite2; so the system is as (in)accurate as the DB might be.

If you just request an A record you'll get just your DNS server IP address as other services do (e.g. whois.akamai.net).

To me, the whole idea of this API is an anti-pattern: embedding Javascript in a website to make an entirely new GeoIP lookup from a third party host is wasteful and unreliable.

If you want GeoIP details in served JS, the details should be served from an existing host on the initial page load where you can centrally manage availability/maintenance/etc.

If you are doing nodeJS or something server side, then it would be quicker to call out to established command line tools and cut out an entire internet round trip.

Could you elaborate what you mean by "If you want GeoIP details in served JS, the details should be served from an existing host on the initial page load where you can centrally manage availability/maintenance/etc."?
I know "negative" comments are discouraged for Show HN, but seriously who is using this type of thing? I'm really not sure I understand the point of things like this, besides "make every possible library/unix tool a service". What's next, "sprintf as a service"? Maybe just "println as a service". You make a request, and it returns the same string with "\n" appended.

The MaxMind GeoLite database will give you quite a lot more information than this does, with a single call to the library, and can be delivered as part of your main page response if necessary.

The MaxMind GeoLite database also isn't reliant on CloudFlare to work.

Does anyone know if AWS supports this?
Ip to rough location (to city level usually) can be done via the maxmind geolite database. Api support exists for most languages, and calls are almost instantaneous.

So any computing resource where you can install the maxmind database and library "supports" GeoIP lookups.