Skip to content
  • There are no suggestions because the search field is empty.

Cloudflare rate limiting rules

Checks that every selected Cloudflare zone has at least the minimum number of enabled rate limiting rules, and lists the rules.

Cloudflare rate limiting rules

This check verifies that your Cloudflare zones (domains) have rate limiting rules, which slow down password guessing, scraping and floods of requests before they reach your server. It answers the question an auditor asks: are your websites protected against abuse by volume, and can you show that you keep checking?

In short: ISOPlanner reads the rate limiting rules of your Cloudflare zones with a read-only API token that you create in Cloudflare. A zone passes when it has at least the number of enabled rules you require; a rule that only logs counts only when you allow it. When one zone fails, the run is rejected and a task is created that says per zone what was found and what to do. Every scheduled run is kept as evidence and is linked to the controls named below. The check is one of the six checks of the Cloudflare app in the Store, and the six share one connection.

What the check verifies

A rate limiting rule blocks or challenges a visitor who sends more matching requests than its limit, for example to your login page. For every zone you select, the check reads the rate limiting rules of the zone. A rule counts when it is enabled and does more than log, unless you switch on Count log-only rules. A zone passes with at least Minimum enabled rules counted rules. Account-level rulesets (Enterprise) and the deprecated old rate limiting are not read. The run is accepted when every evaluated zone passes.

FrameworkControls this check gives evidence for
ISO 27001:2022A.8.6 Capacity management, A.8.20 Networks security
SOC 2CC6.6 Protection against threats from outside the system boundaries, A1.1 Processing capacity
NIS2 Quality Mark (High)4.8 Manage and secure networks

When you add the check, ISOPlanner links it to the controls in this table of the frameworks your organization uses, and to the controls of your other frameworks that are related to them. A framework you add later is linked the same way. The NIS2 Quality Mark has three levels (Basic, Substantial and High) and your organization uses one of them; each NIS2 row names the levels it applies to. You can change the links. The check is evidence for these controls; it does not cover them completely.

Before you start

  • Automated control monitoring is part of the Business and Premium subscriptions of ISOPlanner.
  • The check belongs to the Cloudflare app. Add the app first: go to Administration > Store, click More info on the Cloudflare tile and then Start free trial. The trial takes 30 days and renews into a paid subscription unless you cancel it. If your organization already uses another Cloudflare check, this check is already there.
  • You need a licensed manager or administrator role in ISOPlanner to add the app and to set up the check.
  • Rate limiting rules exist on every Cloudflare plan, the Free plan included; the number of rules a zone can have grows with the plan.
  • Somebody must be able to create an API token for the Cloudflare account that owns the zones. A token can never read more than the person who creates it.
  • To make a failing zone pass, somebody must be able to add rate limiting rules to the zone in Cloudflare (Security > WAF).

The token is read-only and needs these permissions, for all zones of the account:

PermissionWhy
Zone > Zone > ReadLists your zones. Needed by every Cloudflare check.
Zone > Zone Settings > ReadNeeded to test the connection, and by the TLS and HTTPS checks.
Zone > Zone WAF > ReadReads the rate limiting rules. Needed by this check only.

If you cannot open the WAF settings of your zones, have an administrator of the Cloudflare account create the token. The Connect Cloudflare dialog also lists Zone > DNS > Read, which only Cloudflare DNSSEC needs.

1. Connect Cloudflare

You connect once. All six Cloudflare checks use the same connection.

  1. Go to Administration > Settings > Automation, open the tab Control monitoring and click the card Cloudflare rate limiting rules.
  2. Under Authorization click Connect Cloudflare. Use Create a user API token or Create an account API token to open Cloudflare, create a custom token with the permissions above, and copy it. Cloudflare shows the token only once.
  3. Enter the Cloudflare account id (the 32 character code in the address of the Cloudflare dashboard) and the API token, and click Save and test connection.

The Connect Cloudflare dialog with the account id, the API token and the permissions to give the token

ISOPlanner stores the token encrypted and never shows it again. To replace it, click Edit Cloudflare connection and paste the new token; an empty field keeps the stored one. To end the access, delete the token in Cloudflare (My Profile > API Tokens).

2. Set the options

Zones

Click Test under Test and manage results, then Options.

OptionWhat it does
All zones of the accountThe default. Every active zone is checked, also a zone you add to Cloudflare later.
Zones to leave outWith all zones: the zones that are not checked, at most 100 names. Record why you leave a zone out.
Selected zonesOnly the zones you name are checked, at least 1 and at most 100. A new zone is not checked until you add it here.

A run evaluates at most 200 zones. A zone that is not active in Cloudflare yet is skipped and listed under the result; it does not fail the check.

Options

The options are in a row above the result, in the same dialog.

OptionWhat it does
Minimum enabled rules1 by default, from 1 to 100. The number of counted rules every zone needs.
Count log-only rulesOff by default. A rule that only logs limits nothing, so it does not count unless you switch this on.

3. Test and read the result

The test starts when you open the dialog; Run starts it again after you change the zones or the options. A test shows the result and stores nothing.

ColumnWhat it shows
ZoneThe domain.
PlanThe Cloudflare plan of the zone.
FoundThe number of counted rules, for example 2 enabled rules.
ExpectedThe minimum you set, for example at least 1.
RulesEach rule with its description, action and limit (requests per period in seconds), at most 25 per zone. A disabled rule is marked (disabled).
ResultWhether the zone passes.

Above the table a line sums up the result, for example "2 of 2 zones have at least 1 enabled rate limiting rules". When every zone passes, Run outcome: shows Evidence Accepted.

4. Schedule and switch on

  1. In the test dialog choose the Incident response template: the task template ISOPlanner uses when a run is rejected. Give the template an assignee.
  2. Under Set a schedule click Schedule. The check can run daily at most.
  3. Under Status switch the check to Active.

From then on every run stores Evidence Accepted or Evidence Rejected. A rejected run creates a task from the template with one checklist item per failing zone: what was found and where to change it. How the results show in the annual plan, on dashboards and on the controls is in Automated Control Monitoring.

The statuses at a glance

Rate limiting rules per zone

FoundMeaningWhat to do
The minimum or moreThe zone passes.Nothing.
Fewer than the minimumToo few counted rules, or none. The zone fails.Add a rule (Security > WAF > Rate limiting rules), for example on the login path.
Not readableThe token could not read this zone. The zone fails.Add Zone > Zone WAF > Read to the token in Cloudflare.

The outcome of a run and the status of the check

StatusMeaning
Evidence AcceptedEvery evaluated zone passed.
Evidence RejectedAt least one zone failed, no zone could be evaluated, or not every zone could be read.
ActiveThe check runs on its schedule.
Needs AttentionThe check is switched on but the Cloudflare connection is not authorized, for example because the token expired or was deleted.
DisabledThe check does not run. This is the status right after you add the app.

Questions and troubleshooting

The check fails although the zone has rules

Look at the Rules column: disabled rules never count, and log-only rules count only with Count log-only rules on. Also check that the minimum is not higher than your plan allows.

The result says the Cloudflare token lacks Zone WAF Read

Add Zone > Zone WAF > Read to the token in Cloudflare (My Profile > API Tokens); you do not have to connect again. If the message stays, have an administrator of the Cloudflare account create the token: a token cannot read what its creator cannot see.

Minimum enabled rules must be a whole number between 1 and 100.

Enter a whole number from 1 to 100; the test runs once the value is valid.

Cloudflare does not accept the API token, or it is not valid for the account

The token is invalid, expired or deleted, or it belongs to another account than the account id. A stored token that stops working puts all Cloudflare checks on Needs Attention. Enter a new token or the right account id with Edit Cloudflare connection.

The token sees no zones of this Cloudflare account

The account id belongs to another account than the token, or the token has no Zone Read on the zones. The message names the accounts in which the token does see zones.

A zone is listed under "Zones not found" or "Skipped zones"

Not found: a zone under Selected zones is not in the account or not visible to the token; the run is rejected until you correct or remove the name. Skipped: the zone is not active in Cloudflare yet, usually because the nameservers at the registrar do not point to Cloudflare; it does not fail the run.

Only the first 200 zones were evaluated

A run evaluates at most 200 zones, and a run that could not read every zone is rejected. Choose Selected zones, or leave zones out, so that at most 200 remain.

I cannot delete the check

A check of an app you subscribe to cannot be removed, only switched to Disabled. To stop paying for the Cloudflare app, cancel it in the Store. Cancelling in ISOPlanner does not delete the token in Cloudflare: delete it there yourself.

Related articles