GeoIP helps you to locate a computer’s geographic location by identifying that computer terminal’s IP address. It uses GeoIP database and understands API to pinpoint IP location to a city.
Furthermore, GeoIP is not as accurate as GPS and mobile technology, though no geolocation system delivers perfect accuracy.
geoiplookup is a command line utility that can be used to find the Country that an IP address or hostname originates from.
Download the source of GeoIP
# yum install geoip
# geoiplookup <ip address>
example:
# geoiplookup 198.55.110.199