Skip to content

sitewho mod that adds user IP and GeoIP2 Country Code

Notifications You must be signed in to change notification settings

silv3rr/sitewho-plus2

Repository files navigation

sitewho+2

/saīthuːplʌstu/

Why +2? Because this version of sitewho adds 2 things:

  • Users's ident@host and IP address
  • GeoIP2 County Code

Requirements

Make sure you have libmaxminddb installed or you will get errors about "missing header" and "record_info_for_database failed".

Debian: apt install libmaxminddb-dev geoipupdate

RedHat: yum install libmaxminddb-devel geoipupdate geoipupdate-cron

Or download from:

Installation

Now run make: make && make install

make install will not copy/create any sitewho files to your glftpd dir, to keep it seperate from the normal version. So just run sitewho+2 from current dir.

geoipupdate downloads and updates the required /var/lib/GeoIP/GeoLite2-Country.mmdb file. It needs /etc/GeoIP.conf which should have been created by make install. If not, try: make geoipconf.

If geoipupdate runs OK you can add a weekly cron to keep mmdb updated:

ln -s `which geoipupdate` /etc/cron.weekly/geoipupdate

On RedHat installing geoipupdate-cron takes care of this

Usage

Only raw mode is changed, not normal output and the other modes. The new IP and CC fields should show up at the end of each line: sitewho --raw

About

sitewho mod that adds user IP and GeoIP2 Country Code

Resources

Stars

Watchers

Forks

Packages

No packages published