Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nmap IP range specification

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).

like image 961
user2463016 Avatar asked Jun 07 '13 09:06

user2463016


People also ask

How do you specify targets in Nmap?

Specifying Targets To scan a single host (or a few of them), simply add their names or IP addresses to the end of your Nmap command line. Nmap also has a structured syntax to make scanning large networks easy. You can give Nmap a file listing targets, or even ask Nmap to generate them randomly.

What is a target IP range?

An IP Range target is an agentless, scheduled scanning target that scans any IP range specified by you.


1 Answers

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
like image 50
bonsaiviking Avatar answered Dec 07 '22 20:12

bonsaiviking