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.
Command line to rescue
Open a terminal in your laptop by pressing Ctrl+Alt+T and enter the command:
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