brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: nmap -sV asks open ports what software is really listening

Nmap
~/tips/tip-nmap-version-detection-sv

nmap -sV 192.0.2.10

Identify the service and often the version behind each open port.

A port scan that says 8080 is open and calls it http-proxy is only guessing from the port number. With -sV, nmap connects and probes the service to find out what answers.

nmap -sV 192.0.2.10

The output gains a VERSION column, where you may see a web server name and release, or an SSH implementation with its version. I find it the quickest way to notice that something old is still running, or that a port I assumed was one app belongs to another.

To save time, limit it to the ports you care about:

nmap -sV -p 22,80,443,8080 192.0.2.10

There is also --version-light, which sends fewer probes and runs much faster but identifies a bit less. --version-intensity takes a value from 0 to 9 if you want to tune it yourself, with 7 as the default.

Treat a version string as a hint. Distributions often patch security bugs without changing the version number, and a service can be set up to report anything. The probes also show up in logs, and nmap skips port 9100 by default because some printers print whatever they receive. Only scan machines you own or have permission to test.

Further reading: Nmap version detection

More Nmap tips nmap --packet-trace -p 22,80 192.0.2.10 nmap -p 22,80,443 -oG scan.gnmap 192.0.2.0/24 sudo nmap -sU -p 53,67,123,161 192.0.2.10 nmap -sL 192.0.2.0/28 nmap -oX before.xml 192.0.2.10 All Nmap tips (12) All topics

Link