Page 1 of 1

Country to IP block mapping

Posted: Sun Jul 01, 2012 6:32 pm
by DeltaV
Where can I find an up-to-date mapping of countries to IP address blocks?
There are some hooligan states that I want to permanently ban from my inbox.

Posted: Mon Jul 02, 2012 8:12 am
by quixote
I use MaxMind at work.

Posted: Mon Jul 02, 2012 2:52 pm
by DeltaV
Thanks.

Posted: Mon Jul 02, 2012 7:00 pm
by krenshala
You could also use arin.net for that, thought it may be more work. ARIN is the parent body for IP allocation.

Posted: Tue Jul 03, 2012 3:02 am
by quixote
Yeah, you can use ARIN, but you have to process the extracts yourself, and accumulate the records into a usable format. It's easy, but I don't know your comfort level with such things. If you're interested, you can find the latest files for all the registries here. Each registry has its own subdirectory. A description of the format can be found in the README file.

The main reason I use MaxMind is they offer apis in several languages to work with their database so you can just give it an IP and it spits out a country.