You can use Nmap to scan multiple IP addresses at once by specifying the IPs directly in the command or by using a file that contains the IP addresses. Here are two methods:
Method 1: Directly in the Command
You can list multiple IP addresses separated by spaces:
nmap 192.168.1.1 192.168.1.2 192.168.1.3
Method 2: Using a File
-
Create a text file (e.g.,
targets.txt) with the IP addresses, one per line:echo "192.168.1.1" > targets.txt echo "192.168.1.2" >> targets.txt echo "192.168.1.3" >> targets.txt -
Use the
-iLoption to read from the file:nmap -iL targets.txt
Both methods will allow you to scan multiple IP addresses in a single Nmap command.
