I start most of my virtual machines using virtual box.

Most of the time I configure them with bridge networking. But this time I would like to set it up with nat network.

I added a virtual network on virtual box: and launch the box. Now I would like to connect to it from my host system. But I do not know how to add the virtual interface and take my IP with the ip command (Arch Linux).

A similar interrogation is how can I set up the virtual machine network (still in virtual box) so that the box can only be contacted from my host system.


Okay found it.

You need to add a host only network in virtual box.

Then configure the VM to use the host-only network.

And finally take an address on this virtual network with the command ip:

sudo ip addr add dev vboxnet

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.