A lot of people seem to ask this question, as there are a bunch of posts about it; however I feel like none truly answer the question (that I have found).

I want to understand why Nmap decides to tell me that a specific port is "filtered" when there are technically over 60,000 "filtered" ports.

For the sake of this example...

  • My host ( is listening on ports TCP 80, 443 and 3389

  • My firewall only permits TCP 80, 443, 135 and 445 (not 3389)   80      open   135     closed   443     open   445     closed   3389    filtered
  • Since my host is not listening on TCP 135 and 445, it responds with a TCP RST, and thus it is "closed"

  • Since my firewall is not permitting TCP 3389, it is technically filtered

However, this is what I don't get: TCP ports 21, 22, 23, 24, 25, 26, etc are ALL filtered by the firewall (ie, not permitted), but Nmap only tells me this particular port (3389) is being filtered.

Why?! Should it not be a gigantic list like this:   1       filtered   2       filtered   3       filtered   4       filtered   5       filtered
    ...        ...        ...   76      filtered   77      filtered   78      filtered   79      filtered   80      open
    ...        ...        ...   131     filtered   132     filtered   133     filtered   134     filtered   135     closed
  • Did you read this solution from the Unix & Linux portal?
    – user171922
    Mar 28, 2018 at 20:21
  • 1
    I actually came across this posting, but did not find it valuable. While the question is essentially identical to mine, the responses do not address the question. He asks: If it's normal to see 21,25 and 1863 as "filtered", then why aren't all the other ports appearing as "filtered" too!? This is my question.
    – Ryan B
    Mar 28, 2018 at 20:41
  • 1
    Even the official explanation on NMAPs website does not address this question: filtered : Nmap cannot determine whether the port is open because packet filtering prevents its probes from reaching the port. In my scenario, NMAP cannot determine whether ports 1, 2, 3, 4, 5 ,6 etc etc are open, because a packet filtering device blocks the probes, yet...we do not see all these ports listed in the output as filtered.
    – Ryan B
    Mar 28, 2018 at 20:45
  • 4
    Add --reason -v to your scan to see why Nmap chose each port state. filtered can mean "no response" but it can also mean "ICMP Admin Prohibited" and a few other ICMP codes. What is on the line that starts with "Not shown:" ? Mar 29, 2018 at 3:02

1 Answer 1


This largely depends on the used scan. The Nmap scan types page explains the status of the port and the reasons per scan.

Some examples:

TCP SYN Scan (-sS)

 - Sends a TCP packet with SYN flag set
 - If a SYN/ACK (or SYN) is received --> Port is Open, TCP initiation accepted
 - If a RST is received --> Port is closed
 - If no response is received --> Port is considered filtered
 - If a ICMP Unreachable is received --> Port is considered filtered

UDP Scans (-sU)

 - Nmap sends a UDP Packet to the specified ports
 - If an ICMP Port Unreachable comes back --> Port is closed
 - Other ICMP Unreachable errors --> Port is filtered
 - Server responds with UDP packet --> Port is opened
 - No response after retransmission --> Port is Open|Filtered

And a counter example that could produce different results than -sS:

TCP ACK Scan (-sA)

This scan never determines OPEN or OPEN|Filtered:

 - A packet is sent with only the ACK flag
 - If a System is unfiltered, both Open and Closed ports will both return RST flagged packets
 - Ports that don't respond, or send ICMP Errors are labeled Filtered.

Basically, your results will be influenced by the scan types and extra options you add. It is important to understand how the different Nmap scan types work at a higher level in order to perform a good and conclusive scan.

Multiple options might be required to get a proper view of your firewall rules.

Also, the --reason option might give you more insights as to why a port is being shown differently than you expect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.