Documentation exists for the old MaxMind GeoIP databases but I found myself needing to add some RFC1918 addresses into the DB for a logstash configuration. This was a bit of a pain so I figured I’d share for others who want to do the same. This script is setup to use the MaxMind::DB::Reader::XS and MaxMind::DB::Writer::Tree perl modules. (I gave up perl 20 years ago. Every time you think you’re out, they pull you back in!) Anyway, the XS module requires you to build the libmaxminddb library on your machine but you can probably get away with the standard reader. Anything you put into the custom_ranges hash will get inserted or updated in the default DB. This script takes a while to run (23min on my machine) but so far so good. Consider it beta. YMMV.