Homebrew installed: geoiplookup shows no output - howto install GeoIP-data?
After installing geoipupdate and geoip with geoipupdate support navigate to the file /usr/local/Cellar/geoipupdate/2.3.1/etc/GeoIP.conf
and open it.
Replace:
# Please see http://dev.maxmind.com/geoip/geoipupdate/ for instructions
# on setting up geoipupdate, including information on how to download a
# pre-filled GeoIP.conf file.
# Enter your user ID and license key below. These are available from
# https://www.maxmind.com/en/my_license_key. If you are only using free
# GeoLite databases, you make leave the 0 values.
UserId 0
LicenseKey 000000000000
# Enter the product IDs of the databases you would like to update.
# Multiple product IDs are separated by spaces.
ProductIds GeoLite2-Country GeoLite2-City
...
with:
# The following UserId and LicenseKey are required placeholders:
UserId 999999
LicenseKey 000000000000
# Include one or more of the following ProductIds:
# * GeoLite2-City - GeoLite 2 City
# * GeoLite2-Country - GeoLite2 Country
# * GeoLite-Legacy-IPv6-City - GeoLite Legacy IPv6 City
# * GeoLite-Legacy-IPv6-Country - GeoLite Legacy IPv6 Country
# * 506 - GeoLite Legacy Country
# * 517 - GeoLite Legacy ASN
# * 533 - GeoLite Legacy City
ProductIds GeoLite2-City GeoLite2-Country GeoLite-Legacy-IPv6-City GeoLite-Legacy-IPv6-Country 506 517 533
...
and update the database with geoipupdate
.
Entering geoiplookup 8.8.4.4
now will yield:
GeoIP Country Edition: US, United States
GeoIP City Edition, Rev 1: US, N/A, N/A, N/A, N/A, 37.750999, -97.821999, 0, 0
Update:
According to adejones' comment the GeoIP.conf file moved to /usr/local/etc/GeoIP.conf
in newer versions of "brew-installed" geoipupdate.
I still can not understand how I made this work, and why is it so unintuitive,
This is what I did:
brew install geoipupdate
brew install libmaxminddb
then
mmdblookup -i xx.xx.xx.xx -f /usr/local/var/GeoIP/GeoLite2-City.mmdb