I configured my Ubuntu 14.04, Nginx 1.6.2 server fail2ban to block noscript requests. This server runs two WordPress sites.
When I’m doing wp-admin area works, randomly I got banned. When I’m looking at the fail2ban logs, I can see fail2ban.actions: WARNING [nginx-noscript] Ban xxx.xxx.xxx.xx
. I have enabled email, notifications, but I didn’t receive any email notifications regarding this ban. But SSH ban I get the email notifications.
I would like to know are there any way to stop this false/incorrect banning action?
Also how do I get every IP banning actions email alerts?
jail.local file:- http://pastebin.com/4ThbnzKD
jail.conf :- http://pastebin.com/zPZ0975W
The
nginx-noscript
filter is meant to completely block access to direct access to scripts, for example URLs that end in.php
. As the WordPress admin panel depends on many such URLs (e.g./wp-login.php?...
), this filter is completely incompatible with it and will ban any users logging in or using the admin panel. The front end of the site might work well because although it uses PHP files, its URLs don’t contain “.php” because of URL rewriting.To solve this you can:
nginx-noscript
filter entirelyignoreregex
section, start with something like(wp-admin|wp-login)
Default
nginx-noscript.conf
: