• caglararli@hotmail.com
  • 05386281520

How to perform focused scan of public IP using nmap? [duplicate]

Çağlar Arlı      -    16 Views

How to perform focused scan of public IP using nmap? [duplicate]

Scanning my router using the private IP address using nmap reveals the open ports:

enter image description here

Obtaining the public IP address of the router can be achieved by executing the command:

nslookup myip.opendns.com resolver1.opendns.com

If I scan my router using the public IP address, I get a whole more open ports than those revealed in the scan using the private IP address:

enter image description here

Am not sure why is that; If I scan the public IP for the ports found in the private IP scan, I get the same result of the private IP scan as expected:

nmap -p 21,22,23,80,139,445,5431 <Public_IP>

How can I perform accurate scan of a public IP address to reveal the actually open ports of the corresponding device?