Skip to content
This repository was archived by the owner on May 14, 2020. It is now read-only.

Commit 1018ef5

Browse files
committed
Better document legacy convertion procedure
Add text with instructions for a simple conversion utility.
1 parent 0d46956 commit 1018ef5

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

crs-setup.conf.example

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,18 +626,34 @@ SecDefaultAction "phase:2,log,auditlog,pass"
626626
# There are two formats for the GeoIP database. ModSecurity v2 uses v1 (.dat files),
627627
# and ModSecurity v3 uses v2 (.mmdb files).
628628
#
629-
# MaxMind provides a binary for updating, see https://github.com/maxmind/geoipupdate.
629+
# If you use ModSecurity 3, MaxMind provides a binary for updating GeoLite2 files,
630+
# see https://github.com/maxmind/geoipupdate.
631+
#
630632
# Download the package for your OS, and read https://dev.maxmind.com/geoip/geoipupdate/
631633
# for configuration options.
632634
#
633-
# You should also update the database regularly, see Step 3 of the configuration link above.
635+
# Warning: GeoLite (not GeoLite2) databases are considered legacy, and not being updated anymore.
636+
# See https://support.maxmind.com/geolite-legacy-discontinuation-notice/ for more info.
637+
#
638+
# Therefore, if you use ModSecurity v2, you need to regenerate updated .dat files
639+
# from CSV files first.
640+
#
641+
# You can achieve this using https://github.com/sherpya/geolite2legacy
642+
# Pick the zip files from maxmind site:
643+
# https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip
644+
#
645+
# Follow the guidelines for installing the tool and run:
646+
# ./geolite2legacy.py -i GeoLite2-Country-CSV.zip \
647+
# -f geoname2fips.csv -o /usr/share/GeoliteCountry.dat
648+
#
649+
# Update the database regularly, see Step 3 of the configuration link above.
634650
#
635651
# By default, when you execute `sudo geoipupdate` on Linux, files from the free database
636652
# will be downloaded to `/usr/share/GeoIP` (both v1 and v2).
637653
#
638654
# Then choose from:
639655
# - `GeoLite2-Country.mmdb` (if you are using ModSecurity v3)
640-
# - `GeoLiteCountry.dat` (a.k.a. `GeoIP.dat` if you are using ModSecurity v2)
656+
# - `GeoLiteCountry.dat` (if you are using ModSecurity v2)
641657
#
642658
# Ref: http://blog.spiderlabs.com/2010/10/detecting-malice-with-modsecurity-geolocation-data.html
643659
# Ref: http://blog.spiderlabs.com/2010/11/detecting-malice-with-modsecurity-ip-forensics.html
@@ -647,7 +663,7 @@ SecDefaultAction "phase:2,log,auditlog,pass"
647663
#
648664
# For ModSecurity v3:
649665
#SecGeoLookupDB /usr/share/GeoIP/GeoLite2-Country.mmdb
650-
# For ModSecurity v2:
666+
# For ModSecurity v2 (points to the converted one):
651667
#SecGeoLookupDB /usr/share/GeoIP/GeoLiteCountry.dat
652668

653669
#

0 commit comments

Comments
 (0)