How can I find out IP adresses of DHCP clients when I setup internet connection sharing with Network Manager (Linux)?
5,193
You can check your DHCP lease file (in the case of dhcp isc server /var/lib/dhcp/dhcpd.leases
), the DHCP log, or the Network Manager log (depending the distribution could be /var/log/syslog
, /var/log/NetworkManager*
, etc.).
The format of these leases could be in the form of:
lease 192.168.42.1 {
starts 0 2000/01/30 08:02:54;
ends 5 2000/02/04 08:02:54;
hardware ethernet
00:50:04:53:D5:57;
uid 01:00:50:04:53:D5:57;
client-hostname "PC0097";
}
Of course, this may vary the implementation, but any ISC DHCP based implementation should be like this.
Related videos on Youtube
Author by
Marc Torrellas Socastro
Updated on September 18, 2022Comments
-
Marc Torrellas Socastro over 1 year
I sometimes configure routers with my laptop and use connection sharing with Network manager and so my laptop acts as DHCP server. I then need to connect (via ssh usually) to the servers that are DHCP clients. Is there a simple way to find out the adresses they leased?
-
Marc Torrellas Socastro over 10 yearsHm, I am on Ubuntu. Networkmanager log indeed goes to
/var/log/syslog
but I cannot find the leases there. I found/var/lib/misc/dnsmasq.leases
that works though. Thanks for the pointer!