Install libnet-subnet-perl by entering the following commands in the terminal:
sudo apt update sudo apt install libnet-subnet-perl
Fast IP-in-subnet matcher module for IPv4 and IPv6
Net::Subnet is a simple but fast pure Perl module for determining whether a given IP address is in a given set of IP subnets. It's iterative, and it doesn't use any fancy tries, but because it uses simple bitwise operations on strings it's still very fast. . The module supports both IPv4 and IPv6.