26

Is there a way to scan an entire network using nmap?

What I want to do is scan my network for all the devices that are currently connected to it.

2 Answers 2

45

Scan a network and find out which servers and devices are up and running:

nmap -sP 192.168.1.0/24

Scan a single host:

nmap 192.168.1.2

Scan multiple IP addresses or subnets:

nmap 192.168.1.1 192.168.1.2 192.168.1.3

Scan by excluding a host:

nmap 192.168.1.0/24 --exclude 192.168.1.10

That will exclude the host while scanning.

Fast nmap scanning for a network range:

nmap -F 192.168.1.10/24

To see packets sent and received received using nmap:

nmap --packet-trace 192.168.1.10

Scan for a port:

nmap -p 22 192.168.1.10

Scan for multiple ports:

nmap -p 80,22,21,111

Scan all ports using nmap:

nmap -p "*" 192.168.1.10

I hope that will help you. If you need to know more just run the command:

man nmap
5
  • Thank you very much my friend this has helped me tremendously. Just to be clear is that IP address 192.168.1.0 a universal network IP or what? Just curious lol.
    – Fofaster
    Nov 16, 2013 at 5:19
  • No its your local Network , Network Address Nov 16, 2013 at 5:33
  • 2
    Option -sP is deprecated. The new equivalent is -sn.
    – H2ONaCl
    Mar 2, 2017 at 21:04
  • 2
    sudo arpscan list is probably worth looking at to if you're just wanting a list of hosts/clients in the network you're connected to.
    – pbhj
    Nov 2, 2017 at 20:46
  • Is it possible to achieve something similar using the IP command? Sep 5, 2022 at 15:26
0

for entire scan you should be use -p- it means all port scannig .You need to scan entire server with subnet you should use command 192.168.1.1-255.1.255 first you add hope you got it if i had any mistake please comment.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .