Does DirectAdmin Have a Mechanism to Upgrade MaxMind GeoIP Database?

davidc

Verified User
Joined
Jun 19, 2020
Messages
86
A recent CSF (ConfigServer) login alert notification identified Ukraine for a server located in Dallas, TX. When I looked in /var/lib/csf/Geo, this was listed:

[root@vps Geo]# ls -l total 15448 -rw------- 1 root root 55 Jul 9 2019 COPYRIGHT.txt -rw------- 1 root root 0 Jul 9 2019 GeoIP.dat.gz.tmp -rw------- 1 root root 12089829 Jul 9 2019 GeoLite2-Country-Blocks-IPv4.csv -rw------- 1 root root 3701966 Jul 9 2019 GeoLite2-Country-Blocks-IPv6.csv -rw------- 1 root root 0 Feb 7 2020 GeoLite2-Country-CSV.zip.tmp -rw------- 1 root root 9948 Jul 9 2019 GeoLite2-Country-Locations-en.csv -rw------- 1 root root 433 Jul 9 2019 LICENSE.txt -rw------- 1 root root 116 Jul 9 2019 README.txt

Evidently, they had not been updated in a long time!

The release notes for 1.645 mention this:
CustomBuild code has been cleaned up not to use geoipupdate, libmaxmind and lua compiled components. Lua is still installed from OS repositories on RHEL-based systems.

I am aware of the change made 2+ years ago to MaxMind - needing a license key and have obtained one.

So, is there any mechanism to update the database periodically? I'd like to know if this exists before implementing my own solution.

As a side note, is there any connect between this and AWStats location service?

David
 
Last edited:
You can just:
cd /usr/local/directadmin/custombuild
./build libmaxminddb
./build geoipupdate
register at their website, and generate up to 50 keys (for 50 servers) for free.
When you choose which key version - use newest one.
put key to: /usr/local/etc/GeoIP.conf
run: /usr/local/bin/geoipupdate
check for fresh database in: /usr/local/share/GeoIP/
 
./build libmaxminddb
This does not work. build just outputs the default text, as if no parameters were given.
It looks like support for libmaxminddb has been removed.
no-longer-needed-geoipupdate-libmaxmind-and-lua

No longer needed geoipupdate, libmaxmind and lua custombuild improved​

CustomBuild code has been cleaned up not to use geoipupdate, libmaxmind and lua compiled components. Lua is still installed from OS repositories on RHEL-based systems.

How do we get libmaxmind back, and why was this removed? Why is it called 'No longer needed'? It is in use on all of my DA servers/vpsses. Does DA not do any research when removing components? Most software keeps track of what is installed (globally, anonymously).
 
Bummer. I bookmarked this page to install maxmind later this year, just to find out it was abandoned by DA/CB. :confused:
 
Bummer. I bookmarked this page to install maxmind later this year, just to find out it was abandoned by DA/CB. :confused:
You can do it yourself. It is some work. I just did it myself earlier today. Only the geoipupdate did not work for me, as it is CentOS 7 software (for me, I installed in the far past using YUM).
But all info to install it is on github, even Google points to there. You do need sudo rights of course. Good luck!
 
Still getting:
CC Error: Country Code Lookups setting MM_LICENSE_KEY must be set in /etc/csf/csf.conf to continue using the MaxMind databases
in the lfd.log

what to do?
 
not Your key, but MM - I mean MaxMind.
I hope you registered on MaxMind website, there you can generate free keys for up to 50 servers per one account. Then you use this key for scripts that working with MaxMind databases, nginx/csf etc. each use own plugin to serve this DB and may ask for key. On one server each application will receive same key. If DA don't provide this stuff anymore - you can install it with manuals to your OS, there will be more steps but it not so hard.
like this: https://blog.vivacom.io/2019/05/how-to-install-geolite2-for-apache-22.html
but maybe more fresh versions
 
Last edited:
That worked. CentOS 7 and CSF. Registered at MaxMind, generated a license key. Pasted that key into CSF MaxMind License configuration

Thanks so much, Steve
 
Back
Top