Methods for Defining the Target for Scanning in Nmap.

Nmap allows different ways to specify the target(s) you want to scan. Here are all the possible ways:

  1. Single IP Address
  2. Multiple IP Addresses
  3. IP Range
  4. CIDR Notation
  5. Hostname (Domain Name)
  6. Subnet Scan
  7. Scanning from a File
  8. Scanning an Entire Network

 

1. Single IP Address:

This is the simplest way to scan a single target.

Syntax:

nmap <IP_ADDRESS>

Example:

nmap 192.168.1.1

As a result, nmap will scan the device at 192.168.1.1 IP address and return some information about this IP.

 


2. Multiple IP Addresses

Scan multiple IPs at once.

Syntax:

nmap <IP_ADDRESS 1> <IP_ADDRESS 2> <IP_ADDRESS 3> . . . .

Example:

nmap 192.168.2.11 192.168.34.12

As a result, Nmap scans all of these IP addresses and displays results for each.

 


3. IP Range

When you want to scan a continuous range of IP addresses. 

Syntax:

nmap <START_IP>-<END_IP>

Example:

nmap 192.168.1.1-100

It scans all the IP addresses from 192.168.1.1 to 192.168.1.100.
Menas it scans 192.168.1.1, 192.168.1.2, 192.168.1.3, ... .. . . . .. . . . .. ., 192.168.1.99, 192.168.1.100. 

 


4. CIDR Notation / Using subnet:

Scan a block of IP addresses using CIDR notation.

Syntax:

nmap <SUBNET>

Example:

nmap 192.168.1.0/24

As a result, Nmap scans all of these IP addresses and displays results for each.

 

 

 

 

 

 

 

 

 

 

 

Leave a comment

You must be logged in to post a comment.

0 Comments