Site got attacked, 2 IPs ate all our bandwidth. How do we stop this via Cloudflare

That could work for one IP, but I fear this could happen again. Is there no way to detect this pattern of high usage and then block the IP automatically?