New Tool: IP Range to CIDR

Posted 1221 days ago - Development

IP Range to CIDR Screen Shot At least twice a week I find myself visiting ip2cidr.com, the IP to CIDR converter. Since the owner/author of the site hasn't release the source code, and I love a challenge, I developed my own version. The guys at the job find the tool useful, and after a few minor bug fixes, I've made the IP Range to CIDR tool available for use here at Nullamatix.com.

Using IP to CIDR

The tool is very easy to use. The first text input field is the first IP address or start of the range. The second text input field is the second IP address or end of the range. For instance, supplying 172.0.0.0 in the first field and 192.168.255.255 in the second field will produce:

192.0.0.0/9
192.128.0.0/11
192.160.0.0/13
192.168.0.0/16
172.0.0.0/6
176.0.0.0/4

172.16.0.0 and 172.17.255.255 will produce:

172.16.0.0/15

I'll eventually implement on-the-fly htaccess, null route, and iptables policy generation.

IPtables Drop Policies

In addition to the new IP Range to CIDR tool, I've also added drop lists for ThePlanet, Softlayer, APNIC, and Amazon, courtesy of robtex.com. While looking over firewall and httpd access logs, malicious attacks and comment spam seem to originate from these sources the most. If there's a network or company you'd like me to add, just submit a comment to this post.

Word Count: 327

Tags: , , , , , ,

Click Here to Submit a Comment

Permalink / Last Modified:

Support Nullamatix.com:

See Also:

  • 11/22/2009 -- Count the Total Number of IPs From CIDR
    Excerpt: "After adding a few IPs to a firewall drop list, I wondered, "exactly how many IPs are in this drop list?" Since the list contained 187 entries, all in CIDR notation, adding up the total number of IPs in my head was impossible. So, I put together this little ..."
  • 12/28/2009 -- Invalid Packets From the DoD
    Excerpt: "The firewall policies on Nullamatix.com DROP invalid connection attempts. Specifically, if an attempt to start a new tcp connection is not a syn packet, the packet is rejected. This morning I noticed a few dropped connection attempts from an unusual source, ..."
  • 05/13/2009 -- IPTables Drop Log For 05.12.09
    Excerpt: "The Internet; so magical and dangerous, getting connected is a risk we're all willing to take. Whether you're infiltrating some moron's botnet, or just surfing the web, the possibility of becoming a victim in a cyber attack is real. Everyday, without fail, ..."
  • 01/22/2008 -- 301 Redirect Codes For PHP, ASP, Coldfusion, and More
    Excerpt: "301 is an HTTP status code that basically instructs search engines and browsers that a page has moved, permanently. If you've changed a file name, domain, folder path, whatever, a 301 redirect will update the search engines. This ensures your content remains ..."

Leave a Reply