VirtualBox MacOS add Host-only network to Ubuntu VM

VirtualBox -> Preferences -> Network -> “+”. Should add a network interface called vboxnet0.

UbuntuVM -> Settings -> Network -> “Adapter N” -> Attached to (change to Host-only). Select vboxnet0.

In Ubuntu VM:

sudo ifconfig ethN 192.168.20.1

In MacOS:

sudo ifconfig vboxnet0 192.168.20.2

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>