I used to have a utility called ip2cc which looked-up the country code for an ip address, but I seem to have lost it and I don't know which port installed it. I assumed it was a dependency of spamassassin's relaycountry option, which pulls in net/p5-Geo-IP and net/GeoIP, but they're installed.