Nmap: --exclude-ports not working properly with port 443 (and potentially others ?)

Created on 10 Apr 2019  路  1Comment  路  Source: nmap/nmap

Command :

nmap -p1-1000 --exclude-ports T:21,25,80,443 <host>

Got :

WARNING: a TCP ping scan was requested, but after excluding requested TCP ports, none remain. Skipping this scan type.
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.23 seconds

But works fine without excluding port 443 eg :

nmap -p1-500 --exclude-ports T:21,25,80,444 <host>
Starting Nmap 7.70 ( https://nmap.org ) at 2019-04-10 07:23 EDT
Nmap scan report for <host>
Host is up (1.1s latency).
rDNS record for <host>
Not shown: 493 closed ports
PORT    STATE    SERVICE
139/tcp filtered netbios-ssn
443/tcp open     https
445/tcp filtered microsoft-ds

Nmap done: 1 IP address (1 host up) scanned in 22.59 seconds
expected-behavior question

Most helpful comment

TCP ping used in host discovery is using ports 80 and 443 by default. You can use options -PS and/or -PA to specify different ports.

>All comments

TCP ping used in host discovery is using ports 80 and 443 by default. You can use options -PS and/or -PA to specify different ports.

Was this page helpful?
0 / 5 - 0 ratings