I’ve been going mad trying to understand how I’m supposed to set up my Ubuntu guest on Virtualbox so that it can serve web pages to my Windows host. I thought you were supposed to use the Bridged Adapter, but when I tried that Ubuntu lost its connection to the Internet.
Endless searching followed by a brief foray into the world of vbox IRC led to more dead ends. The IRC chat led me to the understanding that I needed to set a static IP address within Ubuntu. This led to more confusion and still no connections.
Finally, I discovered this post, leading me to further believe that one of the values of Drupal is that there is spin-off of documentation into many other areas other than Drupal:
The short-version of this solution is that you have to use two adapters: Host-only & NAT.
I can only surmise that NAT gives you access to the outside world, while Host-only allows your host to have access to your guest. Seems reasonable.
The very tricky part, that I still don’t understand is the configuration within the /etc/network/interfaces Ubuntu file:
auto eth1
iface eth1 inet static
name Ethernet alias LAN card
address 192.168.56.11
netmask 255.255.255.0
broadcast 192.168.56.255
network 192.168.56.0
auto eth1:0
iface eth1:0 inet static
name Ethernet alias LAN card
address 192.168.56.12
netmask 255.255.255.0
broadcast 192.168.56.255
network 192.168.56.0
auto eth1:1
iface eth1:1 inet static
name Ethernet alias LAN card
address 192.168.56.13
netmask 255.255.255.0
broadcast 192.168.56.255
network 192.168.56.0
I have a hazy idea of what it all means. The line “name Ethernet alias LAN card” did not appear in any of the posts I saw. And this post is pre VBox 4.1.8 which is what I’m using.
That concerns me a bit, because I believe this is the set up people needed to use before the latest VBox. The documentation suggests that using the Bridged Adapter is relatively configuration free when compared to previous versions. How, without configuration, you would access pages served from the Ubuntu guest, I do not know, which makes me wonder if I didn’t actually want Bridged Networking to begin with.
