IPv4 country of origin

From: Ralph Doncaster (no email)
Date: Wed Oct 02 2002 - 23:21:04 EDT

I would like to restrict access from certain countries to content on my
network (for security and legal reasons).

So far the best algorithm I've been able to come up with is a combination
of reverse DNS and APNIC/ARIN/RIPE whois queries. I've written a perl
cgi that checks reverse DNS first, and if there is no gtld country code
for the reverse mapping, does a whois query and parses the response for
the address.

The problem I have is that the country for the company that owns the IP
block is sometimes not the country the IP block is used in. For example
Whois parsing indicates a country of UK, but from the reverse DNS a person
can see that it is Germany. I've built the pattern of cc.ibm.com into my
cgi, but I'm sure there are other blocks that I'm incorrectly identifying.

I've looked at RADB entries, as well as origin AS for various IP blocks,
and neither source looks any better than whois.

Is there a more accurate method to determine the country of origin for an
IP than the methods I've described above?


Hosted Email Solutions

Invaluement Anti-Spam DNSBLs

Powered By FreeBSD   Powered By FreeBSD