grepcidr

Filter IP addresses matching IPv4/IPv6 CIDR/network specification

Install

All systems
curl cmd.cat/grepcidr.sh
Debian Debian
apt-get install grepcidr
Ubuntu
apt-get install grepcidr
image/svg+xml Kali Linux
apt-get install grepcidr
Windows (WSL2)
sudo apt-get update sudo apt-get install grepcidr
OS X
brew install grepcidr
Raspbian
apt-get install grepcidr

grepcidr

Filter IP addresses matching IPv4/IPv6 CIDR/network specification

grepcidr can be used to filter a list of IP addresses against one or more Classless Inter-Domain Routing (CIDR) specifications, or arbitrary networks specified by an address range. As with grep, there are options to invert matching and load patterns from a file. grepcidr is capable of comparing thousands or even millions of IPs to networks with little memory usage and in reasonable computation time. grepcidr has endless uses in network software, including: mail filtering and processing, network security, log analysis, and many custom applications.