1 Answer
"create blockips.conf in /usr/local/nginx/conf/, enter
#vi blockips.conf
Append / add entries as follows:
deny 1.2.3.4;
deny 91.212.45.0/24;
deny 91.212.65.0/24;
Save and close the file. Test the config file, enter:
#/usr/local/nginx/sbin/nginx -t
Finally,
Reload the new config, enter
#/usr/local/nginx/sbin/nginx -s reload
If allow ....
location / {
#block one workstation
deny 192.168.1.1;
#allow anyone in 192.168.1.0/24
allow 192.168.1.0/24;
#drop rest of the world
deny all;"
Your Answer
x