Is there a way to automatically turn on/off firewall rules based on analytics?
An example would be, if there are more than 1k requests over the last 1 hour, the firewall rule gets turned on.
If that’s not possible within the Cloudflare dashboard to be done automatically, is there an option to pull a number of requests from the API and with what call is it possible to turn a firewall rule on via the API?
All the best, Matic
I don’t think it is possible.
You’d need to query the GraphQL API for the Analytics [Edit: Analytics, not Firewall Events]
then update the firewall rule with the regular API
Perhaps a rate limiting rule would meet your needs.
Hi @cscharff & @cbrandt ,
Thank you to both of you so much for the info. It helped me a lot and was able to make it work with GraphQL API. I will definitely also check rate-limiting in case this setup proves to be not as effective.
All the best and have a great day, Matic
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.