An Nmap result is useful only when it answers an authorized assessment question. A host that replies, an open TCP port, an application banner and an operating-system guess are different kinds of evidence. They do not automatically prove a vulnerability or give permission to test further. The seven commands below move from discovery to a reviewable record, using a small, deliberately bounded example instead of scanning everything in reach.
All addresses here are documentation examples, not live lab targets. 192.0.2.10 and 192.0.2.0/29 use the RFC 5737 documentation address space. Before substituting any real address, obtain written permission and record the permitted hosts, protocols, time window, traffic limits and stop contact. Nmap’s advice on written authorization applies before sending probes, including seemingly small discovery scans. The output states discussed below are illustrative, not observations from an executed test.
For a useful experiment, configure a disposable lab host with a known SSH or web service, keep its configuration record, and capture the scan time, scanner location and installed Nmap version. Keep a written expected-results matrix: this host should answer on these authorized TCP and UDP ports, and these processes should be responsible. That makes later discrepancies actionable and reduces the temptation to expand the scan merely because a tool has more options. Start with a small port set and a single target. Do not copy these probes into production, industrial-control, customer or third-party infrastructure without a separately approved scope.
1. Discover which approved hosts respond (-sn)
nmap -sn 192.0.2.0/29
The -sn switch performs host discovery without a port scan. It asks which addresses in the approved range respond to Nmap’s selected probes. Probe behavior varies with scanner privileges and network position: for example, local Ethernet discovery often uses ARP rather than an ICMP echo request. Nmap’s host-discovery probe options make clear why -sn is not a universal ping test. A missing response does not establish that an address is unused.
In a controlled lab, compare any reported “Host is up” entries with the lab’s expected inventory. A host that does not respond is not proven offline: firewall filtering, host configuration or blocked probes can hide it. This command sends packets to each specified candidate address, so a larger subnet needs its own approved scope and maintenance plan. Write down responsive addresses and those without observations separately; use the inventory owner to reconcile discrepancies. A network scan is one evidence source, not proof that unmanaged or switched-off assets do not exist.
2. Identify a few TCP ports with a connect scan (-sT)
nmap -sT -p 22,80,443 192.0.2.10
A TCP connect scan uses the operating system’s connection API to test the three specified ports. It is a practical choice when the scanner lacks raw-packet privileges. The output can label a port open, closed or filtered from this scanner’s viewpoint. If a lab machine has an SSH listener on port 22, an open result may match your expectation; it is still not evidence that SSH authentication is weak or that the service version is known.
A TCP connection may appear in service and firewall logs, and even a small authorized scan can trigger monitoring. Agree on ports, test windows and rate limits with the defender, and record the scanner’s network position. If port 443 appears filtered from one location, do not infer that the service is absent everywhere. Nmap’s port-state meanings describe responses from a particular vantage point, not permanent classifications of the machine.
3. Compare the privilege-dependent SYN method (-sS)
nmap -sS -p 22,80,443 192.0.2.10
The -sS command requests TCP SYN scanning and normally requires suitable raw-packet privileges. Unlike -sT, it usually does not complete an application-level TCP connection, but that does not make it invisible: network controls may record or alert on either technique. Nmap’s description of SYN and TCP connect scanning explains both the privilege requirement and the packet-level difference. If privileges are unavailable, report the failure instead of pretending the comparison ran.
Only compare -sS with command 2 against the same authorized host and port list, within the same agreed time window. A difference in reported state can result from intervening filters or changing network conditions, not necessarily an error in either scan. Do not add random targets, evasion flags or high packet rates in an attempt to make a result look more convincing. The educational purpose is to understand what each method observed, under what privileges, and whether the defender saw corresponding log events. That is a more testable learning outcome than calling one command “stealthier.”
4. Identify services behind the open TCP ports (-sV)
nmap -sV -p 22,80,443 192.0.2.10
A port number alone does not identify the listening application. -sV uses service-specific probes and may infer a product or version from the replies; a web server on a nonstandard port can still be identified as HTTP. Nmap’s service and version detection can send additional application traffic, so obtain permission for those probes and avoid fragile services where the extra interaction is unsafe. A product string is not proof of an unpatched component.
Record the difference between a confirmed response, a likely product string, and an unverified version guess. Reverse proxies, custom banners, load balancers and deliberately modified server identifiers can mislead detection. A suspected outdated version is a triage lead, not a verified vulnerability: check the installed component with the system owner and obtain the applicable vendor security notice before assigning risk. When the observed product is inconclusive, ask the operator for a configuration record rather than stretching the banner into a specific CVE claim. Even version probes can upset fragile or legacy services, so exclude those assets unless the test scope explicitly permits them.
5. Check a small set of UDP services (-sU)
nmap -sU -p 53,123 192.0.2.10
TCP results cannot establish UDP exposure. This command probes only the authorized DNS and time-service ports on one example host. UDP scanning normally needs suitable packet privileges; an unprivileged run may fail. Since UDP has no TCP-style connection handshake, silence after a probe can leave Nmap reporting open|filtered rather than confirmed access. Nmap’s UDP response classification also explains how ICMP rate limiting affects the speed and certainty of results.
A narrow UDP scan can still take time, and a nonresponse is not a confirmed open service. Compare any DNS or NTP replies with the approved lab configuration; where there is silence, mark the conclusion uncertain. Unlike a TCP connection, UDP datagram communication provides no connection-established signal to settle the question. Authorized packet captures or the service owner’s logs may add evidence, but increasing retries or probing other systems without permission is not a valid shortcut.
6. Assess whether an OS fingerprint is credible (-O)
nmap -O -p 22,80,443 192.0.2.10
OS detection sends TCP and UDP probes and compares response characteristics against known network-stack fingerprints. It typically needs raw-packet privileges, and intervening firewalls, virtualization or incomplete replies can mislead the result. Nmap notes that OS fingerprinting is more reliable when it can observe at least one open and one closed TCP port. The -p 22,80,443 list limits the normal port-scan selection, but it does not confine every OS-fingerprinting packet: additional TCP, UDP and ICMP probes may reach other ports. Obtain permission for that wider probe behavior; treat an OS guess as a hypothesis rather than a verified device identity.
A lab where every selected port is filtered is a poor basis for an exact OS claim. Compare the reported guess with the known lab image or an approved asset inventory, and label disagreements as items for follow-up. Do not equate an OS match with proof of a specific patch level or exploitability. For example, a device with a front-end proxy may fingerprint as the proxy rather than the protected workload. If the test window or device sensitivity makes extra fingerprinting unsuitable, skip this command and document why.
7. Preserve a reviewable result (-oX)
nmap -sT -p 22,80,443 -oX lab-scan.xml 192.0.2.10
The -oX option writes XML to lab-scan.xml while normal interactive output still appears on the terminal. This structured format is suitable for later parsing, but it contains potentially sensitive host and service details. Nmap’s XML output options also specify that an existing file is overwritten by default. Use a unique, protected filename for each authorized run and keep the source details needed to interpret it.
Retain the scan date, Nmap version, source network, authorized target, exact command and relevant operating conditions with the XML. Treat it as potentially sensitive infrastructure data. A scan snapshot is not an asset database, and a single machine’s visible ports cannot describe all of its workloads or identity exposure. For recurring operational records, connect evidence to a maintained network inventory rather than presenting the scanner’s current view as a complete configuration source. When comparing two runs, preserve both files and consider changes in routing, firewalls and scan timing before calling every difference a new exposure.
These seven commands provide separate observations, not automatic permission to run every probe on every host. A useful authorized exercise records expected services, actual responses, important uncertainties and approved follow-up. If discovery finds no responding host, do not automatically add -Pn or intrusive scripts to force a result. Nmap’s aggressive -A option enables OS detection, version probing, default NSE scripts and traceroute; some of those interactions can be intrusive. A result from --script vuln still needs script-level safety and accuracy review before anyone calls it a confirmed weakness.
For the single lab host, hand the system owner a short, reproducible record: the written scope, exact commands, observed states, disagreements with the expected configuration, and items requiring independent confirmation. Label what was inferred rather than directly observed. That report is a better measure of assessment competence than a claim to have discovered vulnerabilities merely because a port or product banner appeared.