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:
  • 10.10.0.0/16
  • 10.10.0.0 netmask 255.255.0.0
  • 10.10.0.0 netmask 0xffff0000
  • 10.10.0.0 16
  • 10.10.0.0 netmask 16
  • 10.10.0.0 255.255.0.0
  • 10.10.0.0 / 255.255.0.0
  • 10.10.0.0, 0xffff0000