Learn about Centmin Mod LEMP Stack today
Become a Member

Beta Branch update Centmin Mod's Maxmind GeoLite2 database routines in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Jan 2, 2020.

  1. eva2000

    eva2000 Administrator Staff Member

    53,190
    12,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,649
    Local Time:
    1:04 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    update Centmin Mod's Maxmind GeoLite2 database routines in 123.09beta01

    - This update allows Centmin Mod users to set MM_LICENSE_KEY variable with your Maxmind token key available when you sign up for Maxmind account at https://www.maxmind.com/en/geolite2/signup i.e.
    Code (Text):
    MM_LICENSE_KEY='YOUR_MAXMIND_TOKEN_KEY'
    in persistent config file at /etc/centminmod/custom_config.inc and on first run of centmin.sh either via initial install or thereafter, will populate the new variable MM_LICENSE_KEY in /etc/csf/csf.conf config file and restart CSF Firewall (if detected already running).
    - Maxmind GeoLite2 (GeoIP 2 Lite) database is used in CSF Firewall's country look up routines as well as optionally in Centmin Mod's Nginx GeoIP2 nginx module when enabled as per guide at
    - Maxmind has changed GeoLite2 database download policy to require users register and signup up for a Maxmind account and stopped providing a publicly available download link Significant Changes to Accessing and Using GeoLite2 Databases | MaxMind Blog
    - For CSF Firewall's GeoLite2 database to work, CSF folks released CSF 13.10 with new variable MM_LICENSE_KEY in /etc/csf/csf.conf config file that you need to fill in with Maxmind account token key obtained after you sign up for Maxmind account at https://www.maxmind.com/en/geolite2/signup. Details also at https://community.centminmod.com/th...download-available-any-more.18945/#post-80639

    Continue reading...


    123.09beta01 branch
     
  2. eva2000

    eva2000 Administrator Staff Member

    53,190
    12,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,649
    Local Time:
    1:04 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Part 2 of this update https://community.centminmod.com/th...ite2-database-routines-in-123-09beta01.18954/ further improves it so that if MM_LICENSE_KEY isn't set in /etc/centminmod/custom_config.inc & /etc/csf/csf.conf and if the variables aren't set and /var/lib/csf/Geo database files are missing, download last publicly available geolite2 databases for CSF Firewall as at Dec 23, 2019 & extend CC_INTERVAL to 365 days before next geolite2 database update to give me time to develop alternative arrangements. Once MM_LICENSE_KEY is set in /etc/centminmod/custom_config.inc and/or /etc/csf/csf.conf, then on next centmin.sh menu run, the CC_INTERVAL will be reset back from 365 days to default 14 days for geolite2 database update checks.