nmap scan

New to Debian (Or Linux in general)? Ask your questions here!

nmap scan

Postby Patrigo » 2018-03-08 08:12

Hello

I'm at work and doing a VPN-connection to my home network. Now I wanted to find out which hosts are up but I can't find a way with nmap to make it work.

I tried:
nmap -sP 192.168.1.* (all hosts are up)
nmap -sn 192.168.1.* (all hosts are up)
nmap -PE 192.168.1.* (all hosts are up)

I thought they are ping requests and don't get it why they get an reply. What else could I try to get the right result? I also tried other variations with different timings -T but i still don't get the desired result.

When I manually ping or use Angry IP Scanner I get the right result which is about 3 Hosts. Any pointer?

Thanks
Pat
Patrigo
 
Posts: 7
Joined: 2017-11-04 06:09

Re: nmap scan

Postby p.H » 2018-03-08 09:18

Are you sure that 192.168.1.* is a valid address specification ?
What about 192.168.1.0/24 ?
p.H
 
Posts: 397
Joined: 2017-09-17 07:12

Re: nmap scan

Postby TonyT » 2018-03-08 12:18

Scan a single IP nmap 192.168.1.1
Scan a range of IPs nmap 192.168.1.1-20
Scan a subnet nmap 192.168.1.0/24
TonyT
 
Posts: 539
Joined: 2006-09-04 11:57

Re: nmap scan

Postby Patrigo » 2018-03-08 12:24

Yep wildcard is allowed and your examples work as well. But anyway there is no difference to the result. Any idea?
Patrigo
 
Posts: 7
Joined: 2017-11-04 06:09

Re: nmap scan

Postby acewiza » 2018-03-08 13:52

The last -PE switch set in your examples needs root. But they all three return expected results on my network:

Code: Select all
Nmap done: 256 IP addresses (19 hosts up) scanned in 2.15 seconds


Definitely something unusual going on there, but I have no idea exactly what.
Nobody would ever ask questions If everyone possessed encyclopedic knowledge of the man pages.
User avatar
acewiza
 
Posts: 358
Joined: 2013-05-28 12:38
Location: Out West

Re: nmap scan

Postby Patrigo » 2018-03-10 07:51

Okay I found the problem. I was running the distro in VirtualBox with NAT and as soon as I changed it to Bridged mode it worked.
Patrigo
 
Posts: 7
Joined: 2017-11-04 06:09

Re: nmap scan

Postby kopper » 2018-03-12 04:51

Patrigo wrote:Okay I found the problem..

Good for you. Could you mark the topic as solved?

Patrigo wrote:I was running the distro in VirtualBox with NAT...

For your next topic, stuff like this would be crucial to mention in the OP. Not that I would have known what's the solution in this specific case, but as a general note.
Debian 9.4 Stable with i3
Secure your stuff: Securing Debian Manual
Don't break your stuff: Source List Management DontBreakDebian
kopper
 
Posts: 115
Joined: 2016-09-30 14:30


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable