You can use IP ranges in Nmap by specifying the range in various formats. Here are a few examples:
-
Using a hyphen (-): This allows you to specify a range of IP addresses.
nmap 192.168.1.1-10This command scans the IP addresses from
192.168.1.1to192.168.1.10. -
Using CIDR notation: This allows you to specify a subnet.
nmap 192.168.1.0/24This command scans all IP addresses in the
192.168.1.0subnet (from192.168.1.1to192.168.1.254). -
Using a file with a list of IPs: You can create a text file with a list of IP addresses and use the
-iLoption.nmap -iL targets.txtHere,
targets.txtcontains the list of IP addresses you want to scan. -
Combining ranges: You can combine multiple ranges or individual IPs.
nmap 192.168.1.1,192.168.1.5-10,192.168.1.20This command scans
192.168.1.1,192.168.1.5to192.168.1.10, and192.168.1.20.
These methods allow you to efficiently scan multiple IP addresses or ranges using Nmap.
