Posts Tagged 'virtualbox hostonly'

The fastest way to create host-only network with VirtualBox

Hello Internetland,

This took me a while to figure out, so I decided to write this post to share it with the world.

Since VirtualBox gives you the ability to attach a virtual ethernet adapter on Host to one of the ethernet adapters on the guest machine, it means that these two interfaces have a direct connection to each other. In other words, it’s like plugging a crossover ethernet cable between 2 computers. All you have to do is statically assign IP address to each machine and it will work.

In summary, in your guest settings, create a new adapter and attached it to “Host Interface”, then select the host interface you want to attach to. If you do not have any, you can add one through the interface. So it should look like the image below

vbox_hostonly

Then start the virtual machine, if running Linux use

ifconfig eth1 192.168.1.2 netmask 255.255.255.0 up

for Windows use

netsh interface ip set address name=”VirtualBox Host Interface 1″ static 192.168.0.1 255.255.255.0 

Once you have set static for both machines, you should be able to connect to your guest machine. Hope this helps.