On my laptop (Ubuntu 22.04), I needed to share my internet connection (from my phone's hotspot) with another box (a router) connected to my laptop connect through ethernet. The router is the laptops client (through router's WAN port). I used Network manager, where under IPv4 (see screenshot), I selected "Shared to other computers". How can I learn the IP address given to the router? One used to be able to read /var/lib/misc/dnsmasq.leases
but that no longer exists. I tried looking for it via journalctl
but to no avail.
1 Answer
Command line to rescue
Open a terminal in your laptop by pressing Ctrl+Alt+T and enter the command:
arp -e
It will show you a list of IP addresses and corresponding MAC addresses. Find the MAC address of the WAN port of the router.
Hope this helps
arp -e
also works (though it would on a machine connected to more devices give more answers than just the DHCP's client IP address, but I can figure that out).