nmap says port is closed while nestat says it's listening nmap says port is closed while nestat says it's listening linux linux

nmap says port is closed while nestat says it's listening


By default nmap doesn't scan all ports. try this one.

nmap -sT -sU -p- 127.0.0.1


@Satish, you don't need to add -sU which will scan the UDP ports too, and take a while.

nmap -v -p 8020 127.0.0.1

This should be enough and instant.


By default nmap scans only the well know ports.You specify a port by using the -p parameter.

To scan all ports : nmap -v -p "*" 127.0.0.1

To scan only port 8020 : nmap -v -p 8020 127.0.0.1