Skip to content
Cloudflare Docs

Setup

In order to enable automatic mitigation of random prefix attacks:

  1. Set up DNS Firewall.

  2. Send a PATCH request to update your DNS Firewall cluster.

    Required API token permissions

    At least one of the following token permissions is required:
    • DNS Firewall Write
    Update DNS Firewall Cluster
    curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/dns_firewall/$DNS_FIREWALL_ID" \
    --request PATCH \
    --header "X-Auth-Email: $CLOUDFLARE_EMAIL" \
    --header "X-Auth-Key: $CLOUDFLARE_API_KEY" \
    --json '{
    "attack_mitigation": {
    "enabled": true,
    "only_when_upstream_unhealthy": true
    }
    }'

Once you receive a 200 success response from the API, queries identified as being part of a random prefix attack will receive a REFUSED response.

OSZAR »