0

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.

enter image description here

5
  • Ubuntu 22.04. Wan port. I need to know the ip of the router in order to comnect to it. It is simple. There is no nat. I need to acces my router from my laptop. They are connected through a cable on the same subnet. Computer gave the router an IP address. I just do not know where to look for which address it have.
    – sup
    Commented Apr 30 at 20:10
  • Guyes, I am not sure you understand my question. I do not even really need the admin portal, I can SSH just fine. I just need to know the ip. I can Ping broadcast, but I was interested in the NetworkManager way. Again, forget this is a router. My laptop gives as a DHCP server an IP adress to another computer, its DHCP client. As my laptop is DHCP server, it must know what IP addres it gave. I just would like to find that out.
    – sup
    Commented May 1 at 21:39
  • Yes, that works!
    – sup
    Commented May 3 at 11:08
  • Thanks (for posteriority, my comments do not make sense - there were some other comments that got deleted). Also, if anybody knew which dhcp server networkmanager uses and where it stores it logs, I would still be curious. Once upon a time it was using dnsmasq, but no more.
    – sup
    Commented May 4 at 15:02
  • Well, I would argue it is already in the question (I mean that was the answer I was expecting). 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).
    – sup
    Commented May 5 at 18:06

1 Answer 1

2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .