Range blocks
Range blocks on a wiki are a method of blocking large ranges of IP addresses from editing pages using the CIDR address format . Used correctly, rangeblocks can stall or stop vandals from corrupting the work you've put into your pages and keep contributors contributing. Used incorrectly, rangeblocks can be worse than no blocks at all, blocking useful contributors and even your wiki staff.
MediaWiki allows rangeblocks from /16 (255.255.000.000) through /31 (255.255.255.254):
Doing it manually
You will probably find the following table helpful:
| CIDR | Class | Hosts* | Mask |
|---|---|---|---|
| /31 | 1/128 C | 2 | 255.255.255.254 |
| /30 | 1/64 C | 4 | 255.255.255.252 |
| /29 | 1/32 C | 8 | 255.255.255.248 |
| /28 | 1/16 C | 16 | 255.255.255.240 |
| /27 | 1/8 C | 32 | 255.255.255.224 |
| /26 | 1/4 C | 64 | 255.255.255.192 |
| /25 | 1/2 C | 128 | 255.255.255.128 |
| /24 | 1 C | 256 | 255.255.255.000 |
| /23 | 2 C | 512 | 255.255.254.000 |
| /22 | 4 C | 1024 | 255.255.252.000 |
| /21 | 8 C | 2048 | 255.255.248.000 |
| /20 | 16 C | 4096 | 255.255.240.000 |
| /19 | 32 C | 8192 | 255.255.224.000 |
| /18 | 64 C | 16384 | 255.255.192.000 |
| /17 | 128 C | 32768 | 255.255.128.000 |
| /16 | 256 C, 1 B | 65536 | 255.255.000.000 |
(*) Note that for practical purposes 2 often needs to be subtracted from this number.
You might want to check to make sure that you did it right by entering the range block that you wish to use here.
Doing it with the aid of a computer
You can use this calculator. Once you have it figured out, the range block you want to use is the IP address, followed by a slash (/), followed by the mask bits. For instance, your CIDR address might look like this: 1.2.3.4/26.