I'm attemtping to host my own development web server in a virtual box guest, Ubuntu Server. I would like this virtual machine to be accessible from not only my home network, but outside the LAN as well. As such, I've set up a static IP (so I can later forward ports to this static IP.) My virtual box settings have this vm only using one adapter -- in bridged mode.
Here's what my /etc/network/interfaces looks like:
iface eth0 inet static
address 10.0.1.203 /*this is outside the DHCP range*/
netmask 255.255.255.0
gateway 10.0.1.1
network 10.0.1.0
broadcast 10.0.1.255
dns-nameservers: 8.8.8.8 8.8.8.4
Here's what the output of ifconfig looks like: https://dl.dropbox.com/u/2241201/locker/ubuntu.png
Here's ifconfig -a https://dl.dropbox.com/u/2241201/locker/Screen%20Shot%202012-09-07%20at%2012.20.32%20PM.png
Here's the output of lspci: https://dl.dropbox.com/u/2241201/locker/Screen%20Shot%202012-09-07%20at%2012.25.23%20PM.png
and Here's my virtualbox settings: https://dl.dropbox.com/u/2241201/locker/Screen%20Shot%202012-09-07%20at%2012.21.16%20PM.png
My Host is a mac mini, running OS X 10.7.
From within the guest, if I ping google.com:
$ ping google.com
# outputs 'ping: unknown host google.com' immediately
Why am I unable to access the web?
ifconfigandlspci. This will tell us if your guest vm detects the virtual network device. Also tell us if you have installed the VB guest additions. – invert Sep 7 '12 at 7:10ping 10.0.1.1andping 8.8.8.8/ping 8.8.8.4to ensure you are reaching the gateway and the nameserver(s)? The immediate unknown host response indicates that your VM isn't resolving 'google.com'. – StarNamer Sep 7 '12 at 17:07ifconfig eth0 up? – Sean C. Sep 7 '12 at 17:37/etc/network/interfacesyou're missing theauto eth0statement that brings the interface online at boot, so I suspect that the interface is just down andifconfig eth0 upwill fix it. See: wiki.debian.org/… – Sean C. Sep 7 '12 at 17:43