I’m attemtping to host my own development web server in a VirtualBox guest virtual machine running 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 VirtualBox settings have this virtual machine 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:
Here’s ifconfig -a
:
Here’s the output of lspci
:
And here’s my VirtualBox settings:
My host system is a Mac Mini, running Mac OS X 10.7.
From within the guest OS, if I ping google.com
:
$ ping google.com
# outputs 'ping: unknown host google.com' immediately
Why am I unable to access the web?
ifconfig
andlspci
. This will tell us if your guest vm detects the virtual network device. Also tell us if you have installed the VB guest additions.ping 10.0.1.1
andping 8.8.8.8
/ping 8.8.8.4
to ensure you are reaching the gateway and the nameserver(s)? The immediate unknown host response indicates that your VM isn't resolving 'google.com'.ifconfig eth0 up
?/etc/network/interfaces
you're missing theauto eth0
statement that brings the interface online at boot, so I suspect that the interface is just down andifconfig eth0 up
will fix it. See: wiki.debian.org/…