In an Nmap report with 443 open, 22 filtered, 8080 closed and 53 open|filtered, what does each state imply about the firewall?
answer
- more than open and closed
- states describe Nmap's view
- closed answered, filtered stayed silent
- some states need particular scans
basics
~20 sNmap reports six states: open, closed, filtered, unfiltered, open|filtered and closed|filtered. Closed means the host answered and nothing listens; filtered means a filter hid the answer. Each describes what Nmap saw, not the port itself.
solid answer
~40 sNmap recognises **six** port states. `open` means an application accepts connections or datagrams. `closed` means the port is reachable and answers, but nothing listens. `filtered` means packet filtering stopped the probes, so open versus closed is unknown. `open|filtered` is silence, typical of UDP and the FIN, NULL and Xmas scans. `unfiltered` comes only from the ACK scan and `closed|filtered` only from the idle scan. In the report, 443 is served, 8080 is reachable with no listener, 22 sits behind a filter and 53 is undecided. Each state is a view from one vantage point, so the same host can read differently from another network.
code
bash · 3 lines# Authorised audit of one server named in the signed scope.
# TCP and UDP ports in one run: -sS for TCP, -sU for UDP.
nmap -sS -sU -p T:22,443,8080,U:53 --reason web01.example.internalgo deeper
Recall all six states by name and say in one line what open, closed and filtered each mean.
Explain how closed and filtered differ on the wire, why filtered ports slow a scan, and which states only particular scans produce.
Show that you treat every state as a result seen from one vantage point, and name the second view or log you would compare it with.
Describe how a scanning programme records vantage point, options and date so port states stay comparable between quarters and teams.
## The six states and what each claims Nmap's reference guide lists exactly six port states. The first thing to remember is that they are **not intrinsic properties of the port**: they describe how Nmap sees it, from one place, at one moment. A scan from the same network as a server may show port 135/tcp as open while a scan at the same time from across the Internet shows it as filtered. | State | What Nmap saw | What it implies | |---|---|---| | `open` | An application accepts TCP connections, UDP datagrams or SCTP associations | A service is reachable from this vantage point | | `closed` | The port answered the probe, but nothing is listening | Reachable, no listener; also shows the host is up | | `filtered` | Packet filtering stopped the probes reaching the port | Open or closed is unknown; a router, firewall or host firewall is in the way | | `unfiltered` | Reachable, but Nmap cannot say open or closed | Only the ACK scan classifies ports this way | | `open\|filtered` | No response, in a scan type where open ports give none | UDP, IP-protocol, FIN, NULL and Xmas scans end here | | `closed\|filtered` | Nmap cannot tell closed from filtered | Used only by the IP ID idle scan | The last three states come from particular scan techniques, and which answer each technique can produce is a separate subject. Here you need the vocabulary and what it commits you to. ## Reading the four ports in the report - **443 open**: something answers. A version scan can say what it is, and the owner should confirm the service is meant to be public. - **8080 closed**: the probe was answered and no application listens. Either the host itself answered or something acting for it did (see the section on inference below). The reference guide notes that an administrator who wants such ports to give less away can block them, after which they would read as filtered. - **22 filtered**: no usable answer arrived. Most filters simply drop the probe; some reply with an ICMP destination-unreachable (type 3, code 13, communication administratively prohibited). A drop looks like packet loss, so Nmap retries, which is why filtered ports slow a scan dramatically. - **53 open|filtered**: this appears where an open port stays silent, so Nmap cannot separate "an open service that did not answer" from "a filter swallowed the probe or its reply". It is not a half-open port; it is a gap in the evidence. ## How the report presents them A default report does not list every port. Nmap collapses the most common state into a line such as "Not shown: 995 closed ports" and prints rows only for the exceptions. The `--open` option goes further: it keeps only hosts and ports in the open, `open|filtered` or `unfiltered` states and hides closed and filtered ports entirely. That is convenient for an inventory and wrong for evidence about a firewall, because a report that omits the filtered ports cannot show which ports were protected. An assessor proving a rule set keeps the full table. ## Why this is an inference about the firewall Closed against filtered is the most useful split in a report and the most over-read. A firewall that answers with a TCP reset can make a port read as `closed`, and a host-based filter can make a port read as `filtered` while the network path is wide open. The state tells you what happened to Nmap's packets, not where a rule lives or what it says. 1. Record the vantage point (the scanner's address and network) beside every report. 2. Treat `filtered` as "no evidence about the port", never as "secure". 3. Compare with the host's own list of listening sockets and with the rule set the owner supplies. 4. If a result matters, repeat from a second authorised vantage point so the difference between two network paths is visible. ## Common mistakes - Reading `filtered` as `closed`, or as proof that a firewall exists on that exact host. - Reading `open|filtered` as "probably open". - Assuming one scan covered TCP and UDP; each protocol has its own ports and its own states. - Reading the report as a property of the host rather than of the path between scanner and host. - Forgetting that the default scan probes only the 1,000 most common ports per protocol, so an unlisted port may simply not have been probed. An assessor holding a signed scope reports the states together with the scanner's address, the options used and the date, so a reviewer can reproduce the view instead of arguing about the port.
- Why does a filtered port slow an Nmap scan down?A filter that silently drops probes gives Nmap nothing to react to, and a dropped probe looks like congestion. Nmap therefore retransmits several times before it gives up, and the reference guide says this slows the scan dramatically.
- Does closed mean there is no firewall in front of the host?No. Closed means the probe was answered and no application listens. A firewall that answers with a reset produces the same result as a host with no listener. The firewall's own rules and logs are the evidence for what it does.
- Why is open|filtered so common in a UDP result?A UDP service often sends nothing to a bare probe, and a filter also sends nothing, so silence cannot separate the two and Nmap reports open|filtered. A UDP reply marks the port open; the reference guide lists UDP among the scans that classify ports this way.
- Filtered means closed, so the port is safe.
- Closed ports prove no firewall exists.
- Open|filtered means probably open.
- Port states are permanent facts about the host.
- Nmap has only open and closed, or five states.