You are not logged in.

#1 2014-02-15 21:12:01

apolyonn
Member
Registered: 2013-05-21
Posts: 46

List all computer names on network

Our former router would display: computer name, IP address, and MAC address.  Here, you can see that our "new and improved" router (issued by our benevolent ISP) only displays IP and MAC.  I was just wondering if there were any ways for me to display computer names to better assess if any unauthorized users are leeching onto our network.

One quasi-solution was the command:

sudo nbtscan -r 192.168.0.1/24

However, it only shows Windows client names, and only some of the time (for instance, it isn't displaying a roommate's laptop name, even though his laptop is online and running Windows).

Offline

#2 2014-02-15 21:56:26

teekay
Member
Registered: 2011-10-26
Posts: 271

Re: List all computer names on network

nmap -sn <subnet>/<mask>

Nmap does a reverse loopup here, so it only works for clients the DNS (dnsmasq or whatever) actually knows about, if not you only get the IP.

Last edited by teekay (2014-02-15 21:58:34)

Offline

#3 2014-02-15 21:57:57

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: List all computer names on network

Assuming hostnames are correctly set:

nmap -sP 192.168.1.0/24 

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2014-02-15 22:01:56

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: List all computer names on network

"nmap -sP 192.168.0.1/24" run as root may help.  Make sure you run it as root though, otherwise the result will be partial and useless.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#5 2014-02-15 22:43:00

apolyonn
Member
Registered: 2013-05-21
Posts: 46

Re: List all computer names on network

loafer wrote:

"nmap -sP 192.168.0.1/24" run as root may help.  Make sure you run it as root though, otherwise the result will be partial and useless.

As root, this command does produce some useful information; unfortunately, it mirrors what the router already detects (in the image on my first post).  I was hoping that I could also view the computer names; I always thought they were just called "computer names" or "hostname:" as a really generic example, BOB-PC.  In nbtscan, they would fall under the category of NetBIOS Names (when they actually do appear, that is.)  If I'm wrong about the terminology, please let me know as I'm still a little new at this.

teekay wrote:

so it only works for clients the DNS (dnsmasq or whatever) actually knows about

By "clients," do you mean the computers that are already connected to the internet (like this one I'm using)?  And, if so, are there any circumstances in which my router wouldn't read the client names?

Last edited by apolyonn (2014-02-15 22:45:14)

Offline

#6 2014-02-16 08:39:47

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: List all computer names on network

teekay wrote:

are there any circumstances in which my router wouldn't read the client names?

Check the devices documentation.  For example, it may only detect netbios names.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#7 2014-02-16 20:21:21

apolyonn
Member
Registered: 2013-05-21
Posts: 46

Re: List all computer names on network

loafer wrote:

Check the devices documentation.  For example, it may only detect netbios names.

I couldn't find anything about it in my router manual :\  If my router is unable to find hostnames (and, at that, only some netbios names), is it safe to assume that I couldn't implement a work-around on my desktop?

Offline

#8 2014-02-16 20:37:28

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,354

Re: List all computer names on network

Have you looked at Avahi?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2014-02-16 21:45:13

apolyonn
Member
Registered: 2013-05-21
Posts: 46

Re: List all computer names on network

ewaller wrote:

Have you looked at Avahi?

This may just prove to be the philosopher's stone for which I've sought big_smile  However, when I run the command to view network hosts, it only displays one, my roommate's Chromecast, and just kinda idles on that (I've redacted the username and IP):

root@Sera:~# avahi-browse -alr
+   eth0 IPv4 Username Chromecast                               _googlecast._tcp     local
=   eth0 IPv4 Username Chromecast                               _googlecast._tcp     local
   hostname = [Username\032Chromecast.local]
   address = [192.168.x.xx]
   port = [8009]
   txt = ["ic=/setup/icon.png" "md=Chromecast" "ve=02" "id=ed346d0f9965c73d2328545b8f55166e"]

EDIT: I seemed to have missed the part about avahi-browse detecting computers with Avahi installed :\  So, that might explain why most of the computers on the network aren't showing up -- although it doesn't explain why Chromecast shows up. 

Here's a screenshot of our old router, which shows the names of connected users.  I'd think it wouldn't be so hard to implement this on a 'newer' router.

Last edited by apolyonn (2014-02-17 03:28:21)

Offline

Board footer

Powered by FluxBB