Help with blocking 47k ip addresses

Good afternoon, I have a file with 47k IP addresses (web stressors). I would like to somehow block all of them (to prevent many DDoS attacks).
But I’m having problems:

  1. WAF rules cannot exceed 4096 characters
    2)I can only insert one IP into the tools (47k one at a time is an eternity)

In short, dismiss the idea. Either block CIDRs or ASNs.

47,000 IPv4 addresses are about half a megabyte of text. A firewall rule is limited to four kilobytes, so you’d need about 130 rules, which might be tricky when you are limited to five on the free plan. IP lists are limited as well.

You could, in theory, use a Worker, as those are limited to one megabyte, but if you have more than 100,000 requests a day, you will need the paid plan.

The other approach could be IP access rules, which are limited to 50,000 - https://support.cloudflare.com/hc/en-us/articles/217074967-Configuring-IP-Access-Rules#qzSJfOKBCkNVFz0GX6kLi - but that will mean you enter them manually or use the API. Hardly manageable either.

So again, dismiss the idea and use CIDRs and ASNs. The search engine of your choice will be your friend for more details here.

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.