Blocking IP Address Ranges in CIDR

Wiki.TerraBase.info
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
...if you wanted to block all IP Addresses except the private ones in the 192.168.X.Y range using CIDR, here is how:

IP Address Ranges;

000.000.000.000 - 000.255.255.255    (reserved)

001.000.000.000 - 192.167.255.255

                  192.168.000.000    (the next number which is the first private IP Address #)

192.168.255.255                (the last number in the private IP Address range)

192.169.000.000 - 255.255.255.254

255.255.255.255 - 255.255.255.255    (reserved)

Same as above, but expressed in CIDR;

1.0.0.0/8

2.0.0.0/7

4.0.0.0/6

8.0.0.0/5

16.0.0.0/4

32.0.0.0/3

64.0.0.0/2

129.0.0.0/8

130.0.0.0/7

132.0.0.0/6

136.0.0.0/5

144.0.0.0/4

160.0.0.0/3

192.0.0.0/9

192.128.0.0/11

192.160.0.0/13

192.169.0.0/16

192.170.0.0/15

192.172.0.0/14

192.176.0.0/12

192.192.0.0/10

193.0.0.0/8

194.0.0.0/7

196.0.0.0/6

200.0.0.0/5

208.0.0.0/4

224.0.0.0/4

240.0.0.0/5

248.0.0.0/6

252.0.0.0/7

254.0.0.0/8

255.0.0.0/9

255.128.0.0/10

255.192.0.0/11

255.224.0.0/12

255.240.0.0/13

255.248.0.0/14

255.252.0.0/15

255.254.0.0/16

255.255.0.0/17

255.255.128.0/18

255.255.192.0/19

255.255.224.0/20

255.255.240.0/21

255.255.248.0/22

255.255.252.0/23

255.255.254.0/24

255.255.255.0/25

255.255.255.128/26

255.255.255.192/27

255.255.255.224/28

255.255.255.240/29

255.255.255.248/30

255.255.255.252/31

References;

  https://en.wikipedia.org/wiki/Reserved_IP_addresses

  https://ip2cidr.com/

...and if you really need it: https://www.ipaddressguide.com/cidr