Hi @thiagorangel
If such issues – as described – happen, then alternative to allowing all countries would be to allow specific IPs if you have a way to get such IPs. Unfortunately, not all services disclose all IPs used and some are not even using a “fixed” set/range of IPs.
So if it’s not possible to allow “by IP”, then yes – you either need to allow countries back or at least unlock countries these services do requests from.
There is no such “automated lock” for just adding products to the cart. If there are repetitive requests for 404 (non-existing) pages or repetitive login attempts – those can be blocked. Simply visiting a page numer of times, is not something that would be considered a security threat.
What you can possibly try would be to use “404 Detection” blocklist feature for such automated block. In “Defender -> Firewall -> 404 Detection” you have an option to define URLs (additionally to standard 404) that should be monitored. Those can be existing URLs so it can e.g. be your cart/checkout URL.
Then you need to carefully set the Threshold and Duration options. You can set them e.g. “if 20 hits in 300 seconds (5 minutes) – block temporarily for 24 hours” or similar way.
The URLs added to the “Blocklist” – even if they are existing URLs – will then be monitored and blocked according to these rules.
However, this option was not designed for this kind of protection of perfectly valid and available URLs so you need to be aware that it may in some cases “blow back” and affect legitimate users/visitors – so I’d suggest carefully testing it.
Other than this, the other two solutions – blocking identified (based on stats/server’s “access log”) bots using User Agent Blocking and adding reCaptcha to checkout – should help too.
Kind regards,
Adam