Nmapポートスキャンで、すべての65000 ubuntu(20.04)ポートが閉じていることが示される


2

これが愚かな質問である場合は、ご容赦ください。現在、教育目的でnmap / metasploitをいじっています。メタスプロイタブルOSの使用に少しうんざりしたので、少し面白くて、自分のホームOS(ubuntu 20.04)に損傷を与えることができるかどうかを確認しましたが、自分のマシンのnmapスキャンを実行すると0と表示されます-p-を使用して65,000のバッガーすべてをスキャンした場合でも、ポートを開きます。そのうちの1つは、当然のことながら開かれているのでしょうか。しかし、違います。以下は、nmapから得られる応答です

nmap scan = nmap -sV -p- ***.***.***.***
nmap results = All 65535 scanned ports on hostname (ip address) are closed

これらすべてのポートが閉じていると表示される論理的な理由は考えられません。私はubuntuにかなり慣れていないので、現在使用しているツールはさらに新しいので、どこかで根本的に誤解しているのではないかと思います。入力については、事前に感謝します

1

The nmap needs the ping 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.

$ nmap -sV -p- 4.2.2.1

Starting Nmap 7.40 ( https://nmap.org ) at 2020-06-30 21:58 WEST
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.38 seconds

But when you enable the -Pn flag the to disable the normal "ping probe" behaviour it is able to scan the host:

$ nmap -Pn 4.2.2.1

Starting Nmap 7.40 ( https://nmap.org ) at 2020-06-30 21:59 WEST
Nmap scan report for a.resolvers.level3.net (4.2.2.1)
Host is up (0.090s latency).
Not shown: 999 filtered ports
PORT   STATE SERVICE
53/tcp open  domain

Nmap done: 1 IP address (1 host up) scanned in 9.64 seconds

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.