Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 /*this is outside the DHCP range*/

Here’s what the output of ifconfig looks like:

enter image description here

Here’s ifconfig -a:

enter image description here

Here’s the output of lspci:

enter image description here

And here’s my VirtualBox settings:

enter image description here

My host system is a Mac Mini, running Mac OS X 10.7.

From within the guest OS, if I ping

$ ping
# outputs 'ping: unknown host' immediately

Why am I unable to access the web?

share|improve this question
Please update your post with these outputs: ifconfig and lspci. 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:10
[Obvious question] Have you checked the results of ping and ping to ensure you are reaching the gateway and the nameserver(s)? The immediate unknown host response indicates that your VM isn't resolving ''. – StarNamer Sep 7 '12 at 17:07
says 'connect: Network is unreachable' when i Ping I'm positive this is my router's address though. I'm looking at in my Mac host's network settings – jessh Sep 7 '12 at 17:08
@jessh in your ifconfig screenshots -- your eth0 interface is down. Have you tried ifconfig eth0 up? – Sean C. Sep 7 '12 at 17:37
@jessh in addition, after looking at your /etc/network/interfaces you're missing the auto eth0 statement that brings the interface online at boot, so I suspect that the interface is just down and ifconfig eth0 up will fix it. See:… – Sean C. Sep 7 '12 at 17:43

Based on the information provided, it looks as though the eth0 interface is offline. Per the Debian wiki on /etc/network/interfaces you need to add:

auto eth0

to the top of your configuration in order to bring the card online at boot.

To bring the interface online after boot time, you can issue the command:

ifconfig eth0 up

If you happen to prefer iproute2 to the standard tools, you can use the command:

ip link set eth0 up

During discussions with @jessh a bug with MAC OS and bridging Wifi was found posted at VirtualBox. This may be what was causing the issue, but it's unconfirmed thus far.

share|improve this answer
hmm. still not working:… – jessh Sep 7 '12 at 17:54
Does ifconfig eth0 show that the connection is up? – Sean C. Sep 7 '12 at 17:55
I don't think so.. (no ip address)… – jessh Sep 7 '12 at 18:03
@jessh monitor the kernel log tail -f /var/log/syslog then toggle the virtual interface between disconnected and bridged, or off and bridged. Watch for a message in the log which indicates eth0 NIC Link is Up. I suspect there may be an issue with getting a carrier on the interface. You tried using ifconfig eth0 up already I assume? – Sean C. Sep 7 '12 at 18:08
Yep I tried the last thing you said. Unfortunately, I won't be able to tail the kernel log, as the vm must be off for me to make network changes. Here's an alternative idea. If i set the network mode to NAT, will it show up as a nother PC on my LAN? – jessh Sep 7 '12 at 18:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.