🌐 IP Address Range Optimizer

This tool will take your list of IP addresses or IP address ranges (in CIDR notation) and merge them into the smallest possible list of CIDR blocks for more efficient use by your applications. Optimization works by removing duplicate CIDR blocks, removing duplicate subnets, removing redundant IP ranges, and merging overlapping or adjacent CIDR blocks into a smaller number of larger CIDR blocks.

CIDR Count: 0
CIDR Count: 0

Squid Proxy Server

You can use this CIDR optimizer tool to clean your list of IP ranges before importing them into your Squid software, which generates warning messages if it finds any overlapping IP ranges in your list. These warning messages look like this:

proxy  | 2024/07/05 17:28:41| WARNING: (A) '3.25.178.128/26' is a subnetwork of (B) '3.24.0.0/14'
proxy  | 2024/07/05 17:28:41| WARNING: because of this '3.25.178.128/26' is ignored to keep splay tree searching predictable
proxy  | 2024/07/05 17:28:41| WARNING: You should probably remove '3.25.178.128/26' from the ACL named 'blocked_networks'

and if it receives too many warnings, Squid server will crash.

To avoid such warnings, use this tool to optimize your list of IP ranges before you import it to Squid.

Source Code

This tool uses JavaScript version of php-cidr-range-optimizer that was originally written in PHP, and can be downloaded at:
https://github.com/Athlon1600/php-cidr-range-optimizer.

You are free to download it and use it in your own projects, or make contributions to it to make it more efficient, etc.

To-do list