ipwhere is a tool that looks up and presents the country and city of a specified IP adress. It has the entire lookup table built-in so the result is instant. Of course the downside is that it needs to be updated every now and then to prevent the data from growing too old and irrelevant! It uses the geomapping info from hostip.info.
It is the 18th project on sourceforge that I’m a member of, and the 16th I admin.