Cloudflare integration
  • 25 Jun 2024
  • 2 Minutes to read
  • PDF

Cloudflare integration

  • PDF

Article summary

Cloudflare WAF (Web Application Firewall) helps protect applications and APIs from cybersecurity threats. Traceable integrates with Cloudflare's WAF to block IP addresses and threat actors. As part of the integration, Traceable identifies the IP address that has violated some rule, such as a rate-limiting rule. These IP addresses are communicated to Cloudflare WAF. Once the IP addresses are sent to Cloudflare, you can individually view and edit them in Cloudflare. Before proceeding with Cloudflare integration, ensure that the Traceable Platform agent is installed and configured in your environment.

You can choose between using an agentless deployment or using an agent-based deployment. For more information on Traceable agents, see the Installation section. Traceable's integration with Cloudflare supports the following two types of rules:

  • IP range rules

  • Threat actor rules

  • Custom signature rules


    Cloudflare only supports header, parameter based custom signature rule where header key or parameter key is being matched only using equals operator.

The following is a high-level integration diagram:

The threat actor module detects malicious activities as threats. The Custom Policy Module is used to set custom policies.

Before you begin

Make sure that you have the following information before you proceed with the integration:

  • Authorization email  The email address you use to log in to your Cloudflare account.

  • Zone information – When you log in to Cloudflare, the zone information is available on the home page. For example, in the screenshot below, the zone is

  • API token — If you do not already have a token, complete the following steps to create one. 

    1. Navigate to My Profile → API Tokens → Create Token, as shown in the screenshot below. 

    2. On the API Tokens page, navigate to the Custom token section to create a token for integration with Traceable.  

    3. API token permission  You only need one permission, Zone → Firewall Services → Edit, for the API token as shown in the screenshot below. 


To integrate Traceable with Cloudflare, navigate to the Integrations page. Complete the following steps:

  1. Click on WAF.

  2. Click on Configure on the Cloudflare card. 

  3. Enter the Description, Zone, Authorization Email, and API Token, and click on Save

  4. Create an IP range rule. For more information on creating IP range rules, see Malicious sources in Custom policy. Navigate to Protection Custom Policy in Traceable UI.

After successful integration, the IP range or threat actor rules are communicated to Cloudflare to block or allow IP addresses. In your Cloudflare account, you will see the IP addresses identified by Traceable.

(Optional) Alternate threat actor flow

Traceable also provides an alternate flow to synchronize threat actors’ IP addresses to Cloudflare WAF. The new flow uses the concept of lists in Cloudflare. In the new flow, Traceable creates two lists in Cloudflare, one for IP addresses that would be blocked and one for IP addresses that would be allowed. With the new flow, Traceable maintains only these two lists in Traceable, and IP addresses are added to or removed from these two lists only.


The new flow to synchronize threat actor IP addresses to Cloudflare WAF is not available by default. If you wish to use this flow, contact Traceable’s support team at or your sales representative to enable it for you.

After enabling the new flow, you will see two lists in Cloudflare, as shown below. Click on each list to view more details.

The new flow does not support the x-forwarded-for header for threat actor-based rule IP addresses. However, the x-forwarded-for continues to be supported for IP range rules in the new flow.


For the new flow to be effective, you need to update the API token permissions in Cloudflare, as shown in the screenshot below.

Was this article helpful?

What's Next