I would like to blacklist IPs that are spamming a particular URL, but only for a determined amount of time. let's say 10 minutes.
I'm thinking of creating a stick-table, and store the src IP and increment a counter. Once the counter exceed X retries, I deny it.
stick-table has an expire parameter, but I noticed that as long as there's new data that are written in it, the expire counter is resetted. So the expire parameter is table-wide. Thus, entries will never expire until nothing is added for 10 minutes.
Is there any way to achieve this sort of temporary blocking ?