Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

enter image description here

For my above example, what should I enter as the values?

share|improve this question

marked as duplicate by Chris S Oct 7 '12 at 17:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
See How does IPv4 Subnetting Work? –  Michael Hampton Oct 7 '12 at 15:24

2 Answers 2

up vote 8 down vote accepted

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

share|improve this answer
    
The mask/prefix confuses me, should it always be 255.255.255.0? –  Tom Gullen Oct 7 '12 at 16:06
    
No, it would depend on the scope of addresses that you wanted to ban. I will insert a few more examples. –  Greg Askew Oct 7 '12 at 16:34

IP address range: 119.30.47.0

Mask or Prefix: 255.255.255.0

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.