Nginx comes with a module called ngx_http_access_module that allows you to allow or deny access to IP address.
Simply open your nginx.conf and add to the server block:
allow my.ip.address;
deny all;
or
deny bad.ip.address;
allow all;
VN:F [1.9.22_1171]
Rating: 5.0/5 (2 votes cast)
Block And Deny IP Address OR Network Subnets with Nginx, 5.0 out of 5 based on 2 ratings
This is cool!
Short, sweet, to the point, FREE-exalcty as information should be!