Welcome! Log In Create A New Profile


Limit 404 with req_limit

Posted by blar 
Limit 404 with req_limit
September 26, 2016 07:01PM
Some clients try a large amount of non existing urls to test for vulnerability (phpmyadmin, …). I try to limit the requests with the following (non working) code in the http section:

map $status $zone {
404 $binary_remote_addr;
default "";
# or 200 "";

limit_req_zone $zone zone=errors:10m rate=10r/m;
limit_req zone=errors nodelay;

any ideas how I can do this, and block any requests (even with non 404 status code) for some time from these ips?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 71
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready