other:cloudflare

Enable interaction with the Cloudflare firewall using the Cloudflare API.

juggernaut --task=other:cloudflare
Option
Value Default Description
--CF_ENABLE <1|0> 0 Enable the Cloudflare Firewall. Cloudflare have provided a Firewall feature within the user account where rules can be added to block, challenge or whitelist IP addresses. Using the Cloudflare API, this feature adds and removes attacking IPs from that firewall and provides CLI (and via the UI) additional commands.
--CF_BLOCK <block|challenge> block Block: Block will simply block the request entirely, with no option to bypass it for that request. Challenge: Will display a challenge (CAPTCHA) page that must be completed before the request in question is allowed access. (see Cloudflare docs)
--CF_TEMP <digit> 3600 How long the temporary block will apply within csf and Cloudflare, keeping them in sync. Block duration in seconds - overrides perm block or time of individual blocks in lfd for block triggers. This should be configured taking into account the maximum number of rules that the Cloudflare account allows.
--default <yes> Reset all settings to their default values.
--default_option <option> Reset a specific setting to its default value.
--restart <yes> Restart the service after saving settings.

Examples

// enable Cloudflare
juggernaut --task=other:cloudflare --CF_ENABLE=1 --restart=yes

// reset CF_ENABLE to default
juggernaut --task=other:cloudflare --default_option=CF_ENABLE --restart=yes

// reset all settings back to default
juggernaut --task=other:cloudflare --default=yes --restart=yes

// challenge instead of hard block, with a 2 hour temporary block synced to Cloudflare
juggernaut --task=other:cloudflare --CF_ENABLE=1 --CF_BLOCK=challenge --CF_TEMP=7200 --restart=yes

Related Pages