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

Commit 0d46956

Browse files
committed
Correct example text regarding GeoIP. Add maxmind tool for downloading files
1 parent fe3be41 commit 0d46956

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

crs-setup.conf.example

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -622,20 +622,33 @@ SecDefaultAction "phase:2,log,auditlog,pass"
622622
#
623623
# To use geolocation, we make use of the MaxMind GeoIP database.
624624
# This database is not included with the CRS and must be downloaded.
625-
# You should also update the database regularly, for instance every month.
626-
# The CRS contains a tool to download it to util/geo-location/GeoIP.dat:
627-
# util/upgrade.py --geoip
628625
#
629-
# This product includes GeoLite data created by MaxMind, available from:
630-
# http://www.maxmind.com.
626+
# There are two formats for the GeoIP database. ModSecurity v2 uses v1 (.dat files),
627+
# and ModSecurity v3 uses v2 (.mmdb files).
628+
#
629+
# MaxMind provides a binary for updating, see https://github.com/maxmind/geoipupdate.
630+
# Download the package for your OS, and read https://dev.maxmind.com/geoip/geoipupdate/
631+
# for configuration options.
632+
#
633+
# You should also update the database regularly, see Step 3 of the configuration link above.
634+
#
635+
# By default, when you execute `sudo geoipupdate` on Linux, files from the free database
636+
# will be downloaded to `/usr/share/GeoIP` (both v1 and v2).
637+
#
638+
# Then choose from:
639+
# - `GeoLite2-Country.mmdb` (if you are using ModSecurity v3)
640+
# - `GeoLiteCountry.dat` (a.k.a. `GeoIP.dat` if you are using ModSecurity v2)
631641
#
632642
# Ref: http://blog.spiderlabs.com/2010/10/detecting-malice-with-modsecurity-geolocation-data.html
633643
# Ref: http://blog.spiderlabs.com/2010/11/detecting-malice-with-modsecurity-ip-forensics.html
634644
#
635-
# Uncomment this rule to use this feature:
645+
# Uncomment only one of the next rules here to use this feature.
646+
# Choose the one depending on the ModSecurity version you are using, and change the path accordingly:
636647
#
637-
#SecGeoLookupDB util/geo-location/GeoIP.dat
638-
648+
# For ModSecurity v3:
649+
#SecGeoLookupDB /usr/share/GeoIP/GeoLite2-Country.mmdb
650+
# For ModSecurity v2:
651+
#SecGeoLookupDB /usr/share/GeoIP/GeoLiteCountry.dat
639652

640653
#
641654
# -=[ Block Countries ]=-

0 commit comments

Comments
 (0)