nmap scanning

Discover connected devices on your network

sudo nmap -sn 192.168.32.0/24

 

Scan a specific port only

sudo nmap -p 22 host
sudo nmap -p 22 host -Pn

-Pn (Skip network discovery)

 

Scan for OS

sudo nmap -O host

Scan multiple hosts

sudo nmap -Pn 192.168.0.1/24
sudo nmap -Pn 192.168.0.1-254

 

Scan for TCP or UDP

sudo nmap -sT host
sudo nmap -sU host

 

List of common ports 

less /etc/services
less /etc/services | grep http
less /etc/services | grep ssh

 

Scan live hosts on LAN

sudo nmap $1 -n -sP 192.168.1.1/24 | grep report | awk '{print $5}'

Scan live host between 200-254

sudo nmap $1 -n -sP 192.168.1.200-254 | grep report | awk '{print $5}'

 

ARP-tables after nmap scan (works even if a host blocks ICMP)

arp -a -n

 

Check version

sudo nmap -Pn -p 22 -sV host
sudo nmap -Pn -p 80 -sV host
sudo nmap -Pn -p 443 -sV host

SYN scan

sudo nmap -sS host
sudo nmap -sS -Pn host
sudo nmap -sN -Pn host -p 22

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top