System settings

IskWaf2 min readPage 2 of 13

After installing the component, configure a few system settings and the CAPTCHA page, and prepare the environment for the GeoIP databases.

1. System settings

Find them under “System” (the gear icon) -> “System Settings”, namespace iskwaf.

KeyDescriptionValues / action
iskwaf_iskwaf_captcha_resource_id ID of the MODX resource that shows the CAPTCHA page. Create a new MODX resource (for example with the alias captcha-verify) and make sure it is not cacheable. Put the [[!IskWafCaptcha]] snippet call in its content. Enter the resource ID here.
iskwaf_iskwaf_option_log WAF logging mode.
  • full: (default) all requests are logged (triggered rules + normal visits, including those where rules were skipped because of the session check).
  • triggered: only requests that triggered a rule are logged. Can optionally log skipped rule checks caused by the session check (see the plugin code).
  • off: logging is off (the rules keep working).
iskwaf_waf_check_mode WAF rule check mode.
  • on_every_request: (default) WAF rules are checked on every request.
  • once_per_session: WAF rules are checked only once per session. If the check passes, later requests in the same session skip the full WAF check (visits may still be logged according to iskwaf_iskwaf_option_log).
iskwaf_iskwaf_log_retention_days How many days to keep records in the iskwaf_logs log. Old records are deleted by a CRON script. A number (for example 7, 30). Script default: 7.
iskwaf_ip2location_download_token Your personal token for downloading databases from IP2Location. Get the token after signing up at lite.ip2location.com and enter it here.
iskwaf_ip_analysis_limit_per_run Maximum number of new/outdated IPs analysed per run of the analyze_ip2location_details.php CRON script. A number. Script default: 500.
iskwaf_ip_analysis_update_interval How often, in days, to refresh data for an IP already in the details table. A number. Script default: 30.
Automatic rule management and country blocking
iskwaf_iskwaf_blocked_countries Blocked countries Two-letter country codes (ISO 3166-1 alpha-2), comma-separated. Traffic from these countries is blocked except for trusted bots. Example: CN,RU,KP
iskwaf_iskwaf_auto_allow_as_names Allowed company names (AS Name) Company names (ASN) whose subnets are allowed automatically. Separator — a vertical bar (|). Example: GOOGLE|Yandex|Microsoft
iskwaf_iskwaf_auto_allow_as_numbers Allowed AS numbers (ASN) Autonomous system numbers (ASN) whose subnets are allowed automatically. Separator — |. Example: AS15169|AS13238
iskwaf_iskwaf_auto_block_as_names Blocked company names (AS Name) Company names (ASN) whose subnets are blocked automatically. Separator — |. Example: DigitalOcean|OVH
iskwaf_iskwaf_auto_block_as_numbers Blocked AS numbers (ASN) Autonomous system numbers (ASN) whose subnets are blocked automatically. Separator — |. Example: AS14061|AS16276