How can scan a spec...
 
Share:
Notifications
Clear all

How can scan a specific range of IP addresses with Nmap?

1 Posts
1 Users
0 Likes
69 Views
(@kajal)
Posts: 147
Estimable Member
Topic starter
 

To scan a specific range of IP addresses with Nmap, you can use a variety of syntax options. Here are some common methods to achieve this:

Scanning a Range of IP Addresses

  • Specify a Range Using a Hyphen: You can specify a range of IP addresses by using a hyphen (-). For example, to scan all IPs from 192.168.1.10 to 192.168.1.20, you would use:
nmap 192.168.1.10-20
  • Specify a Range Using CIDR Notation: If you want to scan a subnet, you can use CIDR notation. For instance, to scan all IPs in the 192.168.1.0/24 subnet (which covers 192.168.1.1 to 192.168.1.254), you would use:
 
nmap 192.168.1.0/24

  • Scan Multiple Specific IPs or Ranges: If you need to scan multiple specific IP addresses or ranges, you can list them separated by spaces. For example, to scan 192.168.1.10, 192.168.1.15, and 192.168.2.0/24, you would use:
 
nmap 192.168.1.10 192.168.1.15 192.168.2.0/24

  • Use a File with IP Addresses: If you have a large number of IP addresses, you might want to use a file containing a list of IPs or ranges. Create a file (e.g., iplist.txt) with each IP or range on a new line, then use the -iL option:
nmap -iL iplist.txt
 
Posted : 12/08/2024 10:09 pm
Share: