2
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?
2Please update your post with these outputs:
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. – invert – 2012-09-07T07:10:06.507[Obvious question] Have you checked the results of
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'. – StarNamer – 2012-09-07T17:07:00.953says 'connect: Network is unreachable' when i Ping 10.0.1.1 I'm positive this is my router's address though. I'm looking at in my Mac host's network settings – jessh – 2012-09-07T17:08:04.430
@jessh in your ifconfig screenshots -- your eth0 interface is down. Have you tried
ifconfig eth0 up
? – Sean C. – 2012-09-07T17:37:33.130@jessh in addition, after looking at your
– Sean C. – 2012-09-07T17:43:56.790/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: http://wiki.debian.org/NetworkConfiguration#Configuring_the_interface_manuallyYou can't build out a network behind a WiFi client connection. Per the WiFi specification, an AP will only send traffic to a client if the traffic is addressed to that client (or broadcast). Since the vm isn't a client of the AP, traffic to the vm will not be sent to the host machine by the AP. (This is why you need WDS. Otherwise, you could just bridge WiFi connections like you do Ethernet connections.) – David Schwartz – 2013-10-26T07:25:38.780