I would like to blacklist anyone who tries to access /admin on my website by listing them in a db. Basically, once they try to access a forbidden path, their ip address get added to a table for a certain amount of time, and I can use the information in that table to deny access to other pages.
It's easy to do this using PHP but I would like to know if this can be done from just nginx and it's modules/addons.