VirtualBox Linux local networking
From time to time, I run an Ubuntu virtual host on my Mac OSX machine (in VirtualBox) for testing and trying. It took me a while to figure out, how to setup this virtual machine so it has access to the Internet as well as local access to my host.
For referencial purposes, here goes:
In your VirtualBox preferences, add a ‘host-only network’ (vboxnet0).
Adapter Settings:
DHCP Server:
Make sure you have your VirtualBox instance set up with two networks interfaces: NAT (1) and Host-only (2). Default settings are ok.
On your Ubuntu guest:
And then restart your networing.
Additionally, I configure my local Linux machine as a headless OS, as a result I only access it through SSH.
And reboot