Install grepcidr by entering the following commands in the terminal:
sudo apt update sudo apt install grepcidr
Description:
Filter IP addresses matching IPv4 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.
Homepage: http://www.pc-tools.net/unix/grepcidr/
Version: 2.0-1build1
Section: universe/net