Block Abusive Traffic with Cloudflare Rate Limiting Rules

Problem

Discovered that my ghproxy had abnormal usage for two consecutive days, exhausting the 10K quota

Solution

CloudFlare's free plan cannot use the global WAF
You can only set up simple rules within the domain

After clicking on a specific domain,
Security -> Security rules -> Create rule -> Rate limiting rules

Fill in a rule name, whatever you like

Click Edit expression
Fill in
(http.host wildcard "ghproxy.*")
* Because my ghproxy domain is ghproxy.xxxx.yyyy.zzz, I wrote the matching rule like this

Set the Rate condition to 8 times within 10 seconds
* This is just an example, you can set 5 times within 10 seconds if you like

Set the action to Block

Set the duration to 10 seconds

Click Deploy

========

End

========

Related Recommendations

Comments