mbarrick: (Default)
[personal profile] mbarrick
I'd like a little help with testing a geographical lookup I'm working on. All I need is for you to visit this link (the link will open in another window and you will get a page showing the IP you are visiting from and what country you are in) and let me know if the country is reported correctly or not.

Date: 2006-05-09 10:09 pm (UTC)
From: [identity profile] bonez.livejournal.com
so far so good.

Date: 2006-05-09 10:35 pm (UTC)
From: [identity profile] mbarrick.livejournal.com
Yup. I've had one glitch where I'd forgotten to account for proxy-forwarded IP address that get picked up in REMOTE_ADDR in the format "xxx.xxx.xxx.xxx, yyy.yyy.yyy.yyy" (fixed that).

Date: 2006-05-09 11:17 pm (UTC)
From: [identity profile] robbat2.livejournal.com
If you find higher resolution data for IP addresses, without having to pay what GeoIP wants, I'd love to hear about it.

Date: 2006-05-10 12:38 am (UTC)
From: [identity profile] valerian.livejournal.com
Took forever to load, but when it did the IP came up but no country (it was just blank).

Date: 2006-05-10 02:06 am (UTC)
From: [identity profile] mbarrick.livejournal.com
That's because you are accessing it from the LAN.

Date: 2006-05-10 02:28 am (UTC)
From: [identity profile] mbarrick.livejournal.com
No idea. This is running of a Domino DECS connection to a MySQL DB of the GeoLite data from GeoIP that distributes with MailScanner. Once upon a time you could get all sorts of useful information on IP allocations from IANA, but they don't do that anymore.

Date: 2006-05-10 02:30 am (UTC)
From: [identity profile] robbat2.livejournal.com
You can still get the IANA data, but the commercial data from GeoIP was always higher resolution - eg for my IP, it would return 'Vancouver, BC, Canada', instead of just 'Canada'.

Date: 2006-05-10 02:48 am (UTC)
From: [identity profile] mbarrick.livejournal.com
Not exactly. I know what you are talking about with the commercial GeoIP data resolving to the city level. All I am saying is that the IANA data used to be more accurate, down to a semi-workable city level, when then exclusively manage IP allocations. The IANA listing, where it now says "Various Registries", used to (10+ years ago) list all the actual allocations like "142.80.0.0 - 142.191.255.255: British Columbia Telephone Company, Vancouver, BC, Canada" from which putting together a somewhat reasonable database with city-level resolution was doable. It would suffer from things like all AOL addresses appearing to come from Richmond, VA and the like, but it was reasonably good.

Date: 2006-05-10 04:02 am (UTC)
From: [identity profile] robbat2.livejournal.com
The IANA data still exists, just in a slightly different location.

Run a Whois on the IP address, and it will still resolve the netblock and give the registrant for the netblock.

Eg:
# whois 142.90.0.0
OrgName: TRIUMF (Tri-University Meson Facility)
OrgID: TTMF
Address: 4004 Wesbrook Mall
City: Vancouver
StateProv: BC
PostalCode: V6T-2A3
Country: CA
NetRange: 142.90.0.0 - 142.90.255.255
CIDR: 142.90.0.0/16
NetName: TRIUMF
NetHandle: NET-142-90-0-0-1
Parent: NET-142-0-0-0-0
...

There is somewhere I saw to bulk-download the WHOIS tree, but I can't find it right now.

I agree it does still suffer from the problem of large allocations pointing the registrants home location (eg Shaw netblocks point to Calgary right now).

Date: 2006-05-10 04:23 am (UTC)
From: [identity profile] mbarrick.livejournal.com
Heh. I used to work just up the street from TRIUMF at BCRI...

I did some poking around and it and it turns out MaxMind has a GPL version of GeoIP City (GeoLite City (http://www.maxmind.com/app/geolitecity)) that just isn't quite as accurate and up-to-date as the commercial version.

I might play with this later, but for now country-level resolution is all I need.

Date: 2006-05-10 06:13 am (UTC)
Page generated Jan. 26th, 2026 03:15 pm
Powered by Dreamwidth Studios