Easy way to Get Hostnames(name of device) by IP address→#1.

praveenkumar
YavarTechWorks
Published in
Jul 27, 2022

Get the hostnames of device by using few method:
It may take more than one blog to explain my exploration on getting hostnames in our network”.

Using nbtscan

It’s a *mandatory to install nbtscan in your linux machine

sudo apt-get update
sudo apt-get -y install nbtscan

nbtscan is a program for scanning IP networks for NetBIOS name information.

sudo nbtscan -r {ip_address}

Using the above cmd to find host name of device which is connected in your network .

Option -r →Use local port 137 for scans.

It produce a report like above for a ip
sudo nbtscan -r {network/subnet mask}
"sudo nbtscan -r 192.165.569.0/24"

Instead of ip address also able to scan whole network.

It produce a report like above for network

Sometimes it fails to resolve linux names and android device names.

In that case we can take look on Nslookup on next blog

--

--

praveenkumar
YavarTechWorks

Proficient in Python automation for networking tasks, PoC deployment, Experienced in resolving network issues and contributing to feature development.