Forum Moderators: phranque
GeoIP [maxmind.com] offers an up-to-date CSV file that maps IP blocks to country codes. I don't know if up-to-date information is available for free anywhere.
If you need to look up the countries of a large number of IPs and have some programming resources you might try one of their APIs. I use their C API [maxmind.com]. They have a free version of that, but it comes with a slightly outdated database.