1

I Have a Router setup at my home. I Just have a private IP. I wanted to scan for active hosts on my network. When I do it locally, I use, Nmap,

nmap -sn -v x.x.x.*

So, is their any way to do it externally ?

P.S I have a port 80 Forwarded.

  • 1
    You could setup a small server (like a raspberry pi) on your local network, portforward the SSH port, and install nmap on it. If you aren't home, you can then SSH into the pi and execute a scan from there. – redfast00 Mar 22 '16 at 15:40
1

Are you looking for something like this:

nmap -sP 192.168.2.0/24

If you are indeed thinking of a NAT'ed 'foreign network', then no, you can't, other than portscanning the internet faced side of the NAT for open ports.

  • But I m not connected to my network. I just have IP address – M.S.P Mar 22 '16 at 14:51
1

I think the Answer is No.

Assuming the router has no port forwards set from Private Network to outside, Its not possible to scan a Private Network (NAT) from outside the Private Network(From the Internet).

Lets say your NAT has IP address like 192.168.0.xxx. Now these exact IPs will be located in many other NAT's.

If you scan something like 192.168.0.10 you either end with Host not found or will probably scan someone one else who is reachable from the private network you are currently on.

EDIT: If you really want to do it, you can setup Port forwarding for the hosts in Private network and then scan the router IP for open ports.

UPADTE: After setting up Port Forwarding,the command will be nmap -sn -v RouterIP . But lets say you mapped HostIP:8080 to RouterIP:9090. You will get port RouterIP:9090 open. So you require to know the Mapping between RouterIP and hosts ip

  • what if, I get an Open Port, which is forwarded ? – M.S.P Mar 22 '16 at 14:54
  • Then the Host IP:port which got mapped to the RouterIP:Port is open. – Sravan Mar 22 '16 at 14:55
  • then, what is the command for scanning it ? – M.S.P Mar 22 '16 at 14:56
  • @M.S.P The command will be nmap -sn -v RouterIP . But lets say you mapped HostIP:8080 to RouterIP:9090. You will get port 9090 open. So you require to know the Mapping between RouterIP and hosts ip – Sravan Mar 22 '16 at 14:58
  • Kindly, add that to your answer. Ill mark it correct. – M.S.P Mar 22 '16 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.