Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Comprehensive Cloudflare platform skill covering Workers, D1, R2, KV, AI, Durable Objects, and security.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/ddos/gotchas.md
1# DDoS Gotchas23## Common Errors45### "False positives blocking legitimate traffic"67**Cause**: Sensitivity too high, wrong action, or missing exceptions8**Solution**:91. Lower sensitivity for specific rule/category102. Use `log` action first to validate (Enterprise Advanced)113. Add exception with custom expression (e.g., allowlist IPs)124. Query flagged requests via GraphQL Analytics API to identify patterns1314### "Attacks getting through"1516**Cause**: Sensitivity too low or wrong action17**Solution**: Increase to `default` sensitivity and use `block` action:18```typescript19const config = {20rules: [{21expression: "true",22action: "execute",23action_parameters: { id: managedRulesetId, overrides: { sensitivity_level: "default", action: "block" } },24}],25};26```2728### "Adaptive rules not working"2930**Cause**: Insufficient traffic history (needs 7 days)31**Solution**: Wait for baseline to establish, check dashboard for adaptive rule status3233### "Zone override ignored"3435**Cause**: Account overrides conflict with zone overrides36**Solution**: Configure at zone level OR remove zone overrides to use account-level3738### "Log action not available"3940**Cause**: Not on Enterprise Advanced DDoS plan41**Solution**: Use `managed_challenge` with low sensitivity for testing4243### "Rule limit exceeded"4445**Cause**: Too many override rules (Free/Pro/Business: 1, Enterprise Advanced: 10)46**Solution**: Combine conditions in single expression using `and`/`or`4748### "Cannot override rule"4950**Cause**: Rule is read-only51**Solution**: Check API response for read-only indicator, use different rule5253### "Cannot disable DDoS protection"5455**Cause**: DDoS managed rulesets cannot be fully disabled (always-on protection)56**Solution**: Set `sensitivity_level: "eoff"` for minimal mitigation5758### "Expression not allowed"5960**Cause**: Custom expressions require Enterprise Advanced plan61**Solution**: Use `expression: "true"` for all traffic, or upgrade plan6263### "Managed ruleset not found"6465**Cause**: Zone/account doesn't have DDoS managed ruleset, or incorrect phase66**Solution**: Verify ruleset exists via `client.rulesets.list()`, check phase name (`ddos_l7` or `ddos_l4`)6768## API Error Codes6970| Error Code | Message | Cause | Solution |71|------------|---------|-------|----------|72| 10000 | Authentication error | Invalid/missing API token | Check token has DDoS permissions |73| 81000 | Ruleset validation failed | Invalid rule structure | Verify `action_parameters.id` is managed ruleset ID |74| 81020 | Expression not allowed | Custom expressions on wrong plan | Use `"true"` or upgrade to Enterprise Advanced |75| 81021 | Rule limit exceeded | Too many override rules | Reduce rules or upgrade (Enterprise Advanced: 10) |76| 81022 | Invalid sensitivity level | Wrong sensitivity value | Use: `default`, `medium`, `low`, `eoff` |77| 81023 | Invalid action | Wrong action for plan | Enterprise Advanced only: `log` action |7879## Limits8081| Resource/Limit | Free/Pro/Business | Enterprise | Enterprise Advanced |82|----------------|-------------------|------------|---------------------|83| Override rules per zone | 1 | 1 | 10 |84| Custom expressions | ✗ | ✗ | ✓ |85| Log action | ✗ | ✗ | ✓ |86| Adaptive DDoS | ✗ | ✓ | ✓ |87| Traffic history required | - | 7 days | 7 days |8889## Tuning Strategy90911. Start with `log` action + `medium` sensitivity922. Monitor for 24-48 hours933. Identify false positives, add exceptions944. Gradually increase to `default` sensitivity955. Change action from `log` → `managed_challenge` → `block`966. Document all adjustments9798## Best Practices99100- Test during low-traffic periods101- Use zone-level for per-site tuning102- Reference IP lists for easier management103- Set appropriate alert thresholds (avoid noise)104- Combine with WAF for layered defense105- Avoid over-tuning (keep config simple)106107See [patterns.md](./patterns.md) for progressive rollout examples.108