Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed VirtualBox on a Windows 7 PC and installed Xubuntu (Ubuntu with XFCE) on it. Now on the Windows, I am connected to the internet through a LAN which automatically authenticates to connect to the network(because its my work computer). I have also installed the guest additions on this virtual machine (Xubuntu). I tried both NAT and bridging to set up internet connection but I still cannot connect to the internet.

For NAT: The browser doesn't say website not found but it keeps trying to load it forever and the network status monitor (the one provided by VirtualBox) doesn't show any green light (no incoming packets).

For Bridging: Same as for NAT but the network status monitor shows incoming packets and outgoing packets. But internet still doesn't work.

I tried a lot of different things but none worked.

share|improve this question

4 Answers 4

I just upgraded the the latest version of VirtualBox and had the same problem. In the networking settings, open 'advanced' and make sure the 'cable connected' box is checked. When I upgraded, it unchecked and caused me about an hour of frustration before I figured it out.

share|improve this answer
    
How is this an answer to anything? This is just a rant! Please avoid posting rants in answer spaces. If you really want to say something like this, post it in the comments to the appropriate question/answer. Thank you. –  mtahmed Jan 18 '13 at 23:34
    
mtahmed - please allow me to disagree, i am having this problem right now and found this post. Z.K.'s answer solved the problem for me, indeed the 'cable connected' box was unchecked after an upgrade. Thanks Z.K! –  Shlomi Apr 11 at 21:07

Do you have multiple network cards/devices showing in Xubuntu? I have seen this issue before where the guest connects to a network without internet.

You could try making the guest connect to a network that has internet avaliable. In your case this would be the networking device that is connected as NAT through the host.

share|improve this answer
    
No Xubuntu shows only one network card (eth0). And with bridging, the guest network adapter gets an IP similar to the host IP but on NAT, the guest IP is completely different? Is this supposed to happen? –  mtahmed Sep 8 '11 at 13:34

Do you have multiple network adapters in Windows? If so, check that Virtual Box is using the adapter that has access to the Internet.

share|improve this answer
    
No I only have one adapter and VirtualBox is using that one I believe. –  mtahmed Sep 8 '11 at 13:33

I'm new to VirtualBox myself, but using FreeBSD guest I had no problem when using NAT on the interface.

Did you run a DHCP client for interface when trying NAT? What's the output of ifconfig?

share|improve this answer
    
dhclient executes successfully and ifconfig shows that if have one lo (loopback) and one eth0. Their ips are as mentioned in a comment to one of the other replies. –  mtahmed Sep 8 '11 at 13:35
    
That's a good start to narrow the problem down. You should activate connection sharing for the internet connection of your host system, this might be the problem. –  Nornagest Sep 8 '11 at 13:41
    
I have already shared the internet connection, doesn't work. Also, VBox installed a "Host-Only" network adapter on the Windows machine; does that need to be enabled for bridging/NAT? –  mtahmed Sep 8 '11 at 13:46
    
If you want to do some reading, the manual is quite good: virtualbox.org/manual/ch06.html The Host Only adapter should be enabled. I hope you already rebooted your host - this might always help with Windows. ;-) Your guests IP via NAT should be 10.0.2.x, try pinging 10.0.2.2, your hosts IPs (the Host Only adapter, your usual NIC and maybe your internet gateway). Which of these work? –  Nornagest Sep 8 '11 at 13:59
    
I pinged my gateway, the DHCP servers, the DNS, all work. But I still cannot access the internet. –  mtahmed Sep 8 '11 at 14:31

Your Answer

 
discard

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.