Working with a simple IP is easy. Working on an IP range is a bit more complicated.
We will discuss about it here. I will discuss about the restriction case and you can follow the same method for "Allow IP " case also.
Follow the below steps:
- Make sure "IP Security" feature is installed on your IIS server machine.
- Goto Control Panel > On Left Pane select "Turn Windows features on or off".
- On Windows Features window, select "IP Security" and click "OK".
- Installing this you might be prompted for a reboot.
- Now browse to your website on IIS (Internet Information Services Management Services Console) and Open (Double Click) "IP Address and Domain Restrictions".
- Right Click > Select option "Add Deny Entry".
- Enter the IP Address Range and Subnet Mask to restrict.
- In the above example all IPs in the range: 22.214.171.124 - 126.96.36.199 will be blocked.
- To help you calculate the subnet mask, use the tool: http://www.subnet-calculator.com/subnet.php