Rate Limit | Check Point WAF

CloudGuard WAF Rate Limiting

CloudGuard WAF agents have the ability to limit the number of requests to a matched URI within a configured time scope, according to the source identifier.

How to set up rate limit

Step 1: Activate Rate Limit from the Practices tab when editing an asset

Browse to Policy->Assets and edit the relevant Web Application / API asset.

Once the asset edit window opens, select the Rate Limit tab and click on Click to add a new Rate Limit Practice.

Pay attention to the configuration of Source Identity. When counting requests to see if a limit was exceeded, the source identity is the key according to which they are counted.

i.e. "X requests from the same source identifier..."

If the source identity configuration doesn't match a value, the source IP address is used instead for the purposes of counting the request.

Step 2: Add a New Rate Limit Rule

Click on Click to add a new Rate Limit rule. When creating a new rule or editing an existing rule, a configuration window will open:

A rate limit rule consists of:

If Limit is set to 7000 and Unit is set to "Minute" then an Active Rate Limit practice will prevent requests to the matched URI if they exceed 7000 requests from the same source identifier, in a single minute.

In Detect/Learn mode, the Trigger is the only action that will occur if the rate of matched URIs from the same source identifier has exceeded configured limits.

After clicking OK, you will see the full rule:

Match priority - The rate is enforced according to a single matched rule. When the URI of the request matches multiple URIs in multiple rules, the longest match takes precedence and determines the rate limit count.

Example - If there are 2 rules - one limiting the URI "/docs" for 10000 requests from the same source identifier in one minute, and the second limiting "/docs/external" for 3000 requests from the same source identifier in one minute, then requests to /docs/external/latest will be blocked if they exceed 3000 requests from the same source identifier in one minute, as this rule creates a longer match.

Step 4: Enforce Policy

Click Enforce on the top banner of the Infinity Portal.

Advanced option in CloudGuard WAF's AppSec Gateways - Limit only according to IP addresses

CloudGuard WAF's AppSec Gateway deployments provide a Check Point-managed reverse proxy as part of the deployment. It is possible to configure a CloudGuard WAF AppSec Gateway to enforce rate limit by using the reverse proxy settings. As the Reverse Proxy server does not have access to the agent's parsing capabilities, the rate limit in this case is done only using source IP addresses as the key to count requests.

To configure rate limit using this enforcement method, go to your CloudGuard WAF AppSec Gateway profile in Policy-> Profiles and open the Advanced tab. In the Advanced Settings table add the following key-value: agent.rpmanager.enableNginxRateLimit : true

Click "Enforce Policy".