Nmap端口掃描顯示所有65000 Ubuntu(20.04)端口均已關閉


2

如果這是一個愚蠢的問題,請原諒我,出於教育目的,我目前正在使用nmap / metasploit。我對使用metasploitable OS有點厭煩,所以我想我會覺得很有趣,看看是否可以對家庭OS(ubuntu 20.04)進行任何損壞,但是當我對自己的計算機進行nmap掃描時,它顯示0即使我使用-p-掃描所有65,000個bugger,也可以打開端口。其中之一注定要開放嗎?但是不。以下是我從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.