How can I use fail2ban on an Nginx server? What are the rules to put in the jails.conf?
closed as not a real question by Scott Pack, HopelessN00b, squillman, Jeff Ferland, Dave M Aug 24 '12 at 19:26
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.
New filter in /etc/fail2ban/nginx-dos.conf:
In our jail.local, we have (at the end of the file):
Of course, in case you would be logging all resources of your site (images, css, js, etc), it would be really easy to get to those numbers as a normal user. To avoid this, use the access_log off directive of Nginx, like so: