Is there any quick way to look up what ranges of IP adresses are assigned to which countries?
I don't think so. IP addresses are bought by organisations, so many different ranges may belong to the same organisation, and it's up to them which computers to assign them to (including their geographical location). Conversely, similar-looking IP addresses may have entirely unrelated owners.
While >>2 is right, ranges of IPs do get assigned to countries. It's an odd mess though since those IPs don't necessarily stay assigned; some blocks get moved around. The simplest method that I'm aware of is referring to the IANA (http://www.iana.org/assignments/ipv4-address-space) first. If you want more specific details by region, you'd have to refer to the APNIC, ARIN, RIPE NNC, and LACNIC directly:
http://ftp.apnic.net/stats/apnic/delegated-apnic-latest
ftp://ftp.ripe.net/ripe/stats/delegated-ripencc-latest
ftp://ftp.arin.net/pub/stats/arin/delegated-arin-latest
ftp://ftp.lacnic.net/pub/stats/lacnic/delegated-lacnic-latest
I don't know of a faster way. If there is one, I'd like to be enlightened.
Not that it would be hard to make a perl script that does it. Just leech all five files once a day and grep it. If you wanted to get fancy (hello WAHa), load up a db and allow people to query a web form.