6

I'm trying to debug an issue and trying to figure out if a particular Machine of mine even has an IP. How can I show all the leases of a Virtualbox DHCP server? The reason I can't just log into the guest is, that it's a Vulnhub VM. Finding out a way to log into the machine is the whole point of the exercise.

4
  • You can always go into the guest and issue an ipconfig to find out if it has a lease or not. Otherwise it should show up in the network tab in the network manager of Virtual Box
    – LPChip
    Nov 14, 2019 at 15:42
  • @LPChip I should have mentioned that, I edited my original question.
    – Philippe
    Nov 14, 2019 at 15:45
  • Are you hosting this Vulnhub VM yourself or is it hosted elsewhere and are you trying to break in?
    – LPChip
    Nov 14, 2019 at 15:48
  • @LPChip I'm hosting it myself
    – Philippe
    Nov 14, 2019 at 18:59

1 Answer 1

5

On Linux :

cat $HOME/Library/VirtualBox/NatNetwork-Dhcpd.leases

On Windows :

%userprofile%\\.VirtualBox\HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter-Dhcpd.leases

This is the file:

<?xml version="1.0"?>
<Leases version="1.0">
...
  <Lease mac="08:00:27:45:fb:92" network="0.0.0.0" state="acked">
    <Address value="10.0.2.15"/>
    <Time issued="1594735097" expiration="600"/>
  </Lease>
...
</Leases>

You can find the mac from vm with vboxmanage showvminfo smp318 | grep MAC

You can list running VM with vboxmanage list runningvms

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.