skip to content

An Nmap -O scan of an unidentified appliance's address returns a firewall's OS match; why might something else sit behind it, and how do you record the entry?

level: seniorimportance: should knowfreq 20%

answer

  1. Probes meet the first device that answers
  2. Proxies terminate TCP themselves
  3. Forwarded and local answers mix
  4. Observed is not authoritative
  5. Confidence and source belong in the record

basics

~20 s

Each probe is answered by whichever device holds the address, so a firewall, proxy or load balancer can be fingerprinted instead of the host behind it. Record the result as an observed hint with its confidence and source, then verify it another way.

solid answer

~40 s

OS detection measures the TCP/IP stack that answers, and at a published address that can be a TCP-terminating proxy or load balancer, a NAT or port-forwarding firewall, or the real host. A proxy completes the handshake itself, so the sequence, option and window tests describe the proxy. A firewall that forwards some ports and rejects others itself can return a mixture of two stacks that matches nothing exactly. Record the result as an observed OS with its percentage, device class, Nmap version, date and scan path, keep an authoritative field for the owner to fill, and verify with the owner or a scan from the inside.

code

yaml · 13 lines
yaml
asset: 203.0.113.20
role: unidentified appliance behind a perimeter firewall
observed:
  source: Nmap 7.991 -O
  scan_date: 2026-10-04
  scanner_position: external segment
  os_guess: <string exactly as printed>
  accuracy: <percentage as printed>
  device_type: <class as printed>
authoritative:
  os: null          # filled by the owner or configuration management
  verified_by: null
note: a middlebox may have answered; do not drive patch decisions from this record

go deeper

for a junior

Recall that Nmap fingerprints whatever device answers, which may be a firewall or proxy rather than the host behind it.

for a middle

Explain how a proxy, a NAT firewall and a port-forwarding firewall each change which stack the probes meet, and why a mixed fingerprint often matches nothing.

for a senior

Spot the signals in a report and design the record: observed and authoritative fields, provenance, and a verification route inside the scope.

for a principal

Set the policy for how scanner-derived fields may feed downstream systems, and which owner confirms them before they influence risk decisions.

## The inventory problem An inventory has an entry for an unidentified appliance. A scan with `-O` against its address returns a firewall OS match, but the owner says the appliance behind that address is something else, perhaps a Linux web server. Both can be true. Nmap measured the stack that answered its probes, and at that address a firewall may answer for the host. ## Which stack answers what | Device in front | What it does with probes | What `-O` ends up describing | |---|---|---| | TCP-terminating proxy or load balancer | completes the handshake itself and opens a separate connection to the backend | the proxy's stack | | NAT or port-forwarding firewall | forwards some ports to an inner host and answers or rejects the rest itself | a mixture, or the firewall alone | | Stateful firewall that rejects on the host's behalf | sends resets or ICMP errors in the host's place | the firewall's replies for the closed-port and UDP probes | | Direct, unfiltered host | answers every probe | the host itself | The mixture case is the awkward one. The open-port probes (the six SEQ probes, ECN, T2 to T4) may be forwarded and answered by the inner host, while the closed-port probes (T5 to T7), the ICMP echoes and the UDP datagram are answered or dropped by the firewall. The fingerprint then combines behaviours no real stack shows together, and it often matches no reference entry exactly. ## What Nmap itself does about it - The reference database has classes for these devices. The `firewall`, `load balancer` and `broadband router` device types exist because such systems are common answers. - The Nmap book notes that OS and version detection are reported independently, so you can see combinations such as a firewall forwarding port 80 to a Windows web server. - When version detection has marked an open port as `tcpwrapped`, the OS engine looks for another open port first, because a firewall may be what completed the connection. ## Signals that a middlebox answered 1. The device type reads `firewall` or `load balancer` for something you expect to be a server. 2. The same OS result appears for many unrelated addresses that sit behind one front. 3. The guess list mixes unrelated families, or Nmap says `No exact OS matches` with `test conditions non-ideal`. 4. Service banners point to a different system family than the OS match. ## How to record it - Keep observed and authoritative data in separate fields. The OS guess is an observation with a percentage, device class, source (`Nmap 7.991 -O`), date and the network position of the scanner. - Describe what the address is: a fronting device or a host. Do not write the observation into the field that drives patch or vulnerability decisions. - Confirm through the owner, the firewall's NAT or forwarding table, configuration management, or an authenticated check. A scan from the inside segment is an option only when it is inside the written scope. - Repeat scans do not verify. The same path and device give the same answer. ## A worked example An external scan of 203.0.113.20 prints a device type of `firewall` with a guess percentage in the nineties, while version detection on the open web port reports a Linux web server banner. The two systems report independently and disagree, which is the signal. The sound entry says: the address is a fronting device (observed), a web service answers on it (observed), the host behind it is unknown until the owner or the forwarding table says so. Nothing here suggests the scan was wrong; the scan answered what it was asked, which was about the address. ## What not to conclude - That the OS guess is wrong because the owner disagrees: it may be exactly right for the device that answered. - That no host exists behind the address. - That repeating the scan from the same position would reveal the backend. ## What this teaches A fingerprint is a statement about a path as much as a host. The inventory value of `-O` is high when it is read as a hint with provenance, and low when its output is copied into a field that nobody questions.

  • Which signals in an -O report suggest a middlebox answered?
    A firewall or load-balancer device type for a host expected to be a server; the same result across many unrelated addresses behind one front; a guess list mixing unrelated families or ending with test conditions non-ideal; and service banners that disagree with the OS family. None proves it, but each justifies checking the path.
  • Why do repeated scans not verify the result?
    They cross the same path and meet the same answering device, so they repeat one measurement. Verification needs an independent source: the owner, configuration data, the firewall's forwarding table, or a scan from a position inside the scope that reaches the host itself.

  • The OS match always describes the host that owns the address.
  • A firewall in front of a host is invisible to OS probes.
  • Port forwarding sends every probe to the backend server.
  • Record the top guess as the asset's OS.
  • A middlebox makes every -O result worthless and not worth recording.