In Debian/Ubuntu,
sudo apt-get install libgeoip-dev
OR
follow instructions at https://github.com/maxmind/geoip-api-c
sudo cpan
install Geo::IP
OR
Follow instructions at http://search.cpan.org/~maxmind/Geo-IP-1.45/
sudo cpan
install Regexp::Common::net
- [geoipupdate] (https://github.com/maxmind/geoipupdate), follow instructions there for installation
- Replace the /usr/local/etc/GeoIP.conf (on Debian/Ubuntu at least) with the below GeoIP.conf
- sudo geoipupdate
OR
- Download the GeoLite ASN (optional) and GeoLite Country manually from [GeoLite Legacy Downloadable Databases] (http://dev.maxmind.com/geoip/legacy/geolite/)
- Extract to /usr/share/GeoIP (or another place, but change settings according to Configuration section below), do not change the names of the files (GeoLiteASNum.dat & GeoLiteCountry.dat)
UserId 999999
LicenseKey 000000000000
ProductIds 506 517
DatabaseDirectory /usr/share/GeoIP
Toggle if the script does lookups on recevied IPs, either in query or in channel, does not impact manual lookup,
/set ipdetective_enabled OFF|ON
Toggle if ASN is not to be used,
/set ipdetective_asn OFF|ON
If the GeoLite databases reside in another directory than /usr/share/GeoIP,
/set ipdetective_db_dir /home/user/mydbdir
Toggle lookups on IP's received in private messages,
/set ipdetective_query OFF|ON
Specify a space separated list of channels to look up IPs from, used in combination with setting below
/set ipdetective_channels #chan1 #chan2 ##chan3
Toggle lookups on IP's only from specific channels,
/set ipdetective_specific_channels OFF|ON
To make a manual lookup of an IP address,
/ipdetective 8.8.8.8