6

I need to specify specific IP range for Nmap scan, for example:

192.168.1.140 - 192.168.3.255

If I do it like:

192.168.1-3.140-255

IP addresses like 192.168.2.7,192.168.3.7 won't be scanned (only 140-255 in 4th actet).

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
user2463016
  • 63
  • 1
  • 1
  • 4

3 Answers3

14

You will probably need to specify this as two different ranges. Nmap will accept as many target specifications as you like on the command line. Here's one way to do it:

nmap 192.168.1.140-255 192.168.2-3.0-255
bonsaiviking
  • 5,825
  • 1
  • 20
  • 35
3

Can't we just do this instead

nmap 192.168.1.0/24 192.168.2.0/24
Z3R0_XP
  • 39
  • 2
-1

Try this command:

nmap 192.168.1.140-192.168.3.255