Support Tools & Utilities For Sysadmins

Subnet IPs

The IP addresses in an IPv4 subnet.

Hint: The grep command can be used to find if any of the IPs in the range/subnet is present in the firewall rules, access logs etc. Examples:
  • iptables -L -n | grep '10\.22[4-7]\.'
  • grep '10\.22[4-7]\.' /var/log/apache2/access_log
The Subnet can be specified with one or more of space, comma or ‘netmask’ as separator. Examples:
  • netmask
  • netmask 0xffff0000
  • 16
  • netmask 16
  • /
  •, 0xffff0000