Forgive me if this is a stupid question, I'm currently messing around with nmap / metasploit for educational purposes. I got a bit sick of using metasploitable OS so I thought I'd have a bit of fun and see if I can do any damage to my home OS (ubuntu 20.04) however when I run an nmap scan of my own machine it shows 0 open ports, even if I use -p- to scan all 65,000 of the buggers. One of them is bound to be open right? But nope. Below is the response I get from nmap
nmap scan = nmap -sV -p- ***.***.***.***
nmap results = All 65535 scanned ports on hostname (ip address) are closed
I can't think of any logical reason why all these ports would be showing as closed. I'm pretty new to ubuntu and even newer to the tools I'm using at the moment so I think I may be fundamentally misunderstanding something somewhere? Many thanks in advance for any input
The
nmap
needs theping
feature enabled in the firewall that it can recognize a host. If the host does not respond to "ping probes" it will usually reported as down.But when you enable the
-Pn
flag the to disable the normal "ping probe" behaviour it is able to scan the host:Now that you find all ports blocked might be that the host is blocking your "nmap host" where you run the scan.
Or the scanned host might recognize the "nmap probe pattern" and just ignore it.