Linux Lite Forums
Hostname differs from what is seen by nmap scan of local network - Printable Version

+- Linux Lite Forums (https://www.freecinema2022.gq/forums)
+-- Forum: Software - Support (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=5)
+--- Forum: Installing Linux Lite (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=17)
+--- Thread: Hostname differs from what is seen by nmap scan of local network (/showthread.php?tid=8542)



Hostname differs from what is seen by nmap scan of local network - gunitinug - 11-05-2022

Hello.

If I do

$ hostname
logan-asus

But given my private IP is 192.168.0.102

$ sudo nmap -sn 192.168.0.0/24 | grep 192.168.0.102
Nmap scan report for LINUX (192.168.0.102)

So strangely the hostname set on my linux lite laptop is different from what is seen by nmap (logan-asus vs LINUX).

How to fix this? Thx!




Re: Hostname differs from what is seen by nmap scan of local network - Valtam - 11-05-2022

nmap reports my correct hostname here. Have you made any edits in regard to anything on the 192.168.0.102 machine?


Re: Hostname differs from what is seen by nmap scan of local network - trinidad - 11-05-2022

Not sure how you're scanning and from what. In this case the only thing sure is that Linux is the hostname assigned by your router which may or may not be allowing reverse DNS lookup (in this case maybe not) or you have DNS and/or mDNS disabled on your Linux Lite machine somehow (nsswitch. conf I think) Have you tried to set a Samba connection hostname different than the hostname you assigned to your laptop? Are you running this scan from a Windows or a Linux machine? Are you scanning from the laptop itself? I can't give a definitive answer without knowing what machine you are running the scan from.TC