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):
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
deny 10.9.0.0/16;