How to easily deaggregate an IP address range

A few days ago I needed to nullroute an address range, so I found myself with the incredibly tedious task of de-aggregating IP ranges.

Sure that I wouldn’t do such thing by hand, I googled around and found ipcalc, which can be installed on most Linux systems:

1
2
3
4
5
$ apt-get install ipcalc

$ ipcalc 1.2.168.0 - 1.2.169.255
deaggregate 1.2.168.0 - 1.2.169.255
1.2.168.0/23

As simple as that!


Hi there! I recently wrote an ebook on web application security, currently sold on leanpub, the Amazon Kindle store and gumroad.

It contains 150+ pages of content dedicated to securing web applications and improving your security awareness when building web apps, with chapters ranging from explaining how to secure HTTP cookies with the right flags to understanding why it is important to consider joining a bug bounty program.

Feel free to skim through some of the free chapters published on this blog and, if the content seems interesting enough to you, grab a copy on leanpub, the Amazon Kindle store, gumroad or simply checkout right down below!

Buy the Web Application Security ebook for $6.99

In the mood for some more reading?

...or check the archives.