Nginx: Block And Deny IP Address OR Network Subnets

Nginx comes with a simple module called ngx_http_access_module to allow or deny access to IP address. The syntax is as follows:

 

deny IP;
deny subnet;
allow IP;
allow subnet;
# block all ips
deny all;
# allow all ips
allow all;

Read More/Original

 

Tags: , , , , , ,

One Comment

  1. Nginx: Block And Deny IP Address OR Network Subnets « Error404NotFound | IP address.co.uk says:

    […] Here is the original post: Nginx: Block And Deny IP Address OR Network Subnets « Error404NotFound […]

Leave a Comment