My Rails application frequently receives bogus traffic from hackers scanning for vulnerabilities, hitting URLs like /vb/showthread.php%3C/a
. These show up as noise in our logs and I would like to filter them out or handle these in some way (such as alerting someone to the scanning attempts).
Is there a Rails or Rack gem that already does this, or are there similar libraries in other frameworks that do the same thing?
The rack-attack middleware gem is general enough to block requests based on any attribute of a request, and provides other advanced features for handling malicious traffic, such as request throttling, blocklists, and request logging.