Welcome! Log In Create A New Profile

Advanced

[ANNOUNCE]nginx_limit_access_module - support to deny request by specific variable

Weibin Yao
November 29, 2010 03:26AM
Hi folks,

I develop a module which can deny request by specific variable. The
module's URL is: https://github.com/yaoweibin/nginx_limit_access_module

A simple deny ip example:
http {

limit_access_zone zone=one:5m bucket_number=10007 type=ip;

server {
listen 80;
server_name localhost;

limit_access_variable zone=one $limit_access_deny;

location / {
root html;
index index.html index.htm;

if ($limit_access_deny) {
return 403;
}
}

location /limit_interface {
allow 192.168.1.0/24;
deny all;
limit_access_interface zone=one;
}
}
}

The request method sent to the interface location is POST, and the
content-type is application/x-www-form-urlencoded. The content is like this:

ban_type=ip&ban_expire=3600&ban_list=192.168.1.1,192.168.1.2

And then the requests from 192.168.1.1 and 192.168.1.2 are banned in
3600 seconds.

--
Weibin Yao



_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

[ANNOUNCE]nginx_limit_access_module - support to deny request by specific variable

Weibin Yao November 29, 2010 03:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 303
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