How should a custom rule for knownbot be configured?

Jeetkune

Administrator
Setting up the Custom Rule DDoS protection rules.

As shown in the image, follow these steps:

  1. First, log in to your Cloudflare account.
  2. Then, select the domain you want to enable DDoS protection for.
  3. In the left menu, click on Security.
  4. Click on WAF, which is the sub-button under Security.
  5. From the page that appears, click the Custom Rules button.
1.PNG


Follow the steps in the images sequentially to complete the Knownbot setup.
2.PNG


When you click 'Edit Expression' in Step 3 shown in the third image, copy the following code into the opened field, but replace 'your_cookie' with the cookie you found and noted on your site earlier:
3.PNG

Code:
(cf.client.bot) or (http.cookie contains "your_cookie") or (http.referer contains "google.com") or (http.referer contains "play.google.com") or (http.referer contains "youtube.com") or (http.referer contains "giphy.com") or (http.referer contains "paypal.com") or (http.referer contains "icloud.com") or (http.user_agent contains " PlayStore-Google") or (ip.geoip.asnum in {15169})


Paste the code into the box as is and proceed with the next image to complete the process. Pay attention to the options in the image. Carefully follow the Skip and checked boxes.
4.PNG5.PNG

[ Now, let's move on to the fourth step. ] 👈 click
 
Last edited:
Back
Top