I use my own server (nginx, I use https://yunohost.org as a CP) as a screenshot uploader with ShareX (https://getsharex.com/). During the upload process of the screenshots the filenames are randomized.
The problem: Recently many people have been coding bruteforcers for these image uploading sites. They just write a small program that sends random httprequest to the url and check if it returns 404 and if not it saves the url. These people could gain access to semi-private screenshots they're not supposed to see.
The solution: These programs don't use any proxies, so you should be able to block these requests with fail2ban. I don't have any experience with it so I can't do it myself so I'm asking you.
I need a fail2ban regex and jail that blocks IP's of too many requests that result with error 404 (for example if someone sends 5 requests per second (404!), it bans them).
I hope anyone can help me.
Best regards KNIF