Remove all IPs from IP Access Rules

Hi guys,

I have about 20231 ip added to IP Access Rules, now i want to remove them from the list.

Is there a quick way to do it? instead of doing 1 by 1 manualy?

I have a script using api to add block ip to this list, but dont know how to remove them from the list. And i dont current store the list of those IPs.

Hi @phim88com,

If by quick way you mean a button you could click on the UI, I’m afraid there isn’t such solution. You’d have to create an script to make API requests to list your rules (each request is limited to 1,000 responses), and to delete them in batches.

You can both list and delete these rules using specific api requests:

https://api.cloudflare.com/#firewall-access-rule-for-a-zone-properties

1 Like

Thanks, is there a shell script could do that?
get ip list from the rules then remove them one by one?

This topic was automatically closed after 30 days. New replies are no longer allowed.