Issue with WAF
hello is there an issue with cloudflare WAF? custom rules?













[Definition]
# Option: actionstart
actionstart =
# Option: actionstop
actionstop =
# Option: actioncheck
actioncheck =
# Option: actionban
actionban = curl -s -o /dev/null -X POST "https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/firewall/rules" \
-H "Authorization: Bearer <YOUR_API_TOKEN>" \
-H "Content-Type: application/json" \
--data '{"mode":"block","configuration":{"target":"ip","value":"<ip>"},"notes":"Fail2Ban"}'
# Option: actionunban
actionunban = id=$(curl -s -X GET -H "Authorization: Bearer <YOUR_API_TOKEN>" \
-H "Content-Type: application/json" \
"https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/firewall/rules?mode=block&configuration_target=ip&configuration_value=<ip>&page=1&per_page=1¬es=Fail2Ban" \
| jq -r '.result[0].id'); \
if [ -z "$id" ]; then echo "Fail2Ban: id for <ip> cannot be found"; exit 0; fi; \
curl -s -o /dev/null -X DELETE -H "Authorization: Bearer <YOUR_API_TOKEN>" \
"https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/firewall/rules/$id"
[Init]
cftoken = <YOUR_API_TOKEN>
cfuser = <YOUR_EMAIL>