GICT knowledge base
How to Use Nmap Command
Published
Network Mapper is an open security tool used for network exploration, security scanning and auditing. The nmap command includes plenty of options which make the utility much more efficient, but difficult for new users. Nmap are commonly used for:
1) Security audits
2) Multiple systems and network administrators find it useful for routine tasks such as network inventory
3) Managing service upgrade schedules
4) Monitoring host or service up-time.
1) Install nmap
sudo apt-get install nmap
2) Version of nmap
nmap -V OR namp –version
3) Scan IP address
nmap 207.218.248.50
Sample outputs:
Output
Starting Nmap 5.00 ( http://nmap.org ) at 2012-11-18 14:41 IST
Interesting ports on 207.218.248.50:
Not shown: 997 closed ports
PORT STATE SERVICE
23/tcp open telnet
53/tcp open domain
80/tcp open http
MAC Address: 55:87:06:25:65:FC (Unknown)
Nmap done: 1 IP address (1 host up) scanned in 1.28 seconds
4) Scan a range of IP address
nmap 207.218.248.5-45
5) Scan entire subnet
nmap 192.168.2.0/24
6) Ping only scan
nmap -sP 207.218.248.50
7) Scan and do traceroute
nmap –traceroute IP-ADDRESS
nmap –traceroute DOMAIN-NAME-HERE
8) TCP SYN Scan
nmap -sS 207.218.248.50
9) UDP Scan
nmap -sU 207.218.248.50
10) IP protocol scan
nmap -sO 207.218.248.50
11) Scan port 80, 25, 443
nmap -p 80 207.218.248.50
nmap -p http 207.218.248.50
nmap -p 25 207.218.248.50
nmap -p smtp 207.218.248.50
nmap -p 443 207.218.248.50
nmap -p 80,24,443 207.218.248.50
12) Scan port ranges
nmap -p 512-1024 207.218.248.50
13) Scan for Operating System Detection
nmap -O 207.218.248.50
nmap -O –osscan-guess 207.218.248.50
14) Scan for application server version
nmap -sV 207.218.248.50
15) Scan a host name
nmap google.com
16) Scan a host name with more info
nmap -v google.com
17) Scan a host when protected by the firewall
nmap -PN 207.218.248.50
nmap -PN google.com
18) Perform a fast scan
nmap -F 207.218.248.50
19) Show host interfaces and routes
nmap –iflist
20) Scan for IP protocol
This type of scan allows you to determine which IP protocols (TCP, ICMP, IGMP, etc.) are supported by target machines:
nmap -sO 207.218.248.50
If you need any further assistance please contact our support department.
Related guides
How to Find Services That Need a Restart After Updates with needrestart
Find services using outdated libraries with needrestart on Ubuntu. Read restart reports, review automatic restart policy and plan maintenance safely.
Firewall and SecurityHow to Connect Two Servers Privately with WireGuard
Connect two servers with WireGuard and keep PostgreSQL on the tunnel. Verify peer traffic, private database access and denied public connections.
Firewall and SecurityGICTServer HIPAA Hosting: BAA and Shared Responsibilities
Review GICTServer HIPAA hosting responsibilities and download the BAA and provisioning checklist. Request service-specific coverage through a support ticket.
Firewall and SecurityHow to Sign and Verify Files with Minisign
Sign release files with Minisign, share an authenticated public key, verify downloads, and stop processing when signatures fail.
