Forum OpenACS Q&A: Response to Identify Country where you are surfing from via IP address

Google claims to be able to do this with 99% accuracy if you want to target ads at users in particular countries: https:// adwords.google.com/AdWords/faq.html#country. I don't know the methodology, though.