IIS7 ban IP range [duplicate]
Possible Duplicate:
How does IPv4 Subnetting Work?
I have a list of IP ranges I would like to ban, an example being:
119.30.47.xx
Where xx
is anything.
I've added the domain and IP restrictions into IIS. When I click add deny entry, I see:
For my above example, what should I enter as the values?
IP Address Range: 119.30.47.0
Mask or Prefix: 255.255.255.0
Other examples:
Ban the lower half: 119.30.47.1 - 119.30.47.127
IP Address Range: 119.30.47.0
Mask or Prefix: 255.255.255.128
Ban the upper half: 119.30.47.128 - 119.30.47.254
IP Address Range: 119.30.47.128
Mask or Prefix: 255.255.255.128
In last two examples, the mask 255.255.255.128 is also known as a "/25", because 25 of the first 32 bits of the address are part of the network address, and the remaining 7 bits are used for host addresses.
Probably a good idea to read up on subnetting, if you need to have a thorough understanding.
https://en.wikipedia.org/wiki/Subnetwork#Subnetting
Or use an online calculator. This one is fairly decent:
http://www.subnetonline.com/pages/subnet-calculators.php
IP address range: 119.30.47.0
Mask or Prefix: 255.255.255.0