On Sunday, 20-10-2024 at 04:51 Chris Green wrote:
> I am using nmap to scan my LAN with:-
>
> sudo nmap -sn 192.168.1.0/24
>
> It works as expected except that it doesn't show the MAC address for
> the system that it's being run on:-
>
> chris$ sudo nmap -sn 192.168.1.0/24
> ...
> ...
> ...
> Nmap scan report for jrbb.zbmc.eu (192.168.1.227)
> Host is up (0.018s latency).
> MAC Address: 90:59:AF:7E:E4:3F (Texas Instruments)
> Nmap scan report for homepi.zbmc.eu (192.168.1.228)
> Host is up (0.0020s latency).
> MAC Address: D8:3A:DD:53:83:9C (Unknown)
> Nmap scan report for t470.zbmc.eu (192.168.1.128)
> Host is up.
> Nmap done: 256 IP addresses (15 hosts up) scanned in 3.10 seconds
> chris$
>
> So, is there any way to get it to tell me my own MAC address?
Can depend on the version of nmap, and also whether running nmap as root.
$ nmap -sn 192.168.1.0/24 does not provide me with MAC addresses on my local
network, but running the command as root ...
# nmap -sn 192.168.1.0/24 does provide me with MAC addresses.
as does
# nmap -snP 192.168.1.0/24 (which also finds our wifi connected Android
phones)
George.
>
> --
> Chris Green
>
>