CAPTCHA page

IskWaf1 min readPage 3 of 13

CAPTCHA page

As described in the system settings, create a MODX resource to show the CAPTCHA. It must not be cacheable and must contain the snippet call [[!IskWafCaptcha? &tpl=`your_form_chunk_name`]] (the &tpl parameter is optional, the default is `iskWafCaptchaFormTpl`).

GeoIP setup (IP2Location)

IskWaf uses the IP2Location LITE databases to determine geolocation, ASN and other information about IP addresses. The database files are not included in the package; they are downloaded by a dedicated CRON script.

  1. Get a token: sign up at lite.ip2location.com and get your personal download token. Enter it in the iskwaf_ip2location_download_token system setting.
  2. IP2Location PHP library:

    Working with IP2Location BIN files requires the IP2Location PHP library. IskWaf uses the library’s PHP files, which must be placed in core/components/iskwaf/lib/ip2location/src/. Download the “IP2Location PHP Module” (for the BIN Data File) from the official IP2Location site and put the contents of its `src` folder there.

  3. Database folders: make sure these folders exist and are writable by PHP (relative to core/components/iskwaf/):
    • tmp_db_download/ (temporary files during download)
    • geoip_db/ (the unpacked BIN database files)
  4. Initial download: after setting the token and adding the PHP library, run the ip2location_download.php CRON script (see CRON jobs) once manually from the server command line to download the databases (IP2LOCATION-LITE-DB11.BIN and IP2LOCATION-LITE-ASN.BIN).