nginx ban ip problem
怪我咯
怪我咯 2017-05-16 17:27:58
0
2
728

May I ask all the experts, can nginx directly ban an IP for a period of time? The module ngx_http_limit_req_module seems to only be able to limit the frequency but cannot ban the IP for a period of time.

I didn’t know the IP before. This IP list is dynamic and cannot be written into the configuration file in advance):

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(2)
为情所困

Reference here:
Nginx Block And Deny IP Address OR Network Subnets

If you want to dynamically modify this IP list, you only need to write a program to update the IP list file regularly.
After updating, check whether the configuration file is correct and reload nginx.

There is also a lua implementation method:
http://stackoverflow.com/questions/13917866/nginx-ip-whitelist

过去多啦不再A梦

deny 10.9.0.0/16;

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template