Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Internet works perfectly on host (Ubuntu 13.04, 32 bit, fully updated) but cannot connect to internet on guest Windows 7 (under Virtualbox 4.2). Have tried NAT and Bridge Network - none worked. I had internet connection in the guest OS a couple of months ago, but I haven't tried the virtualbox since and now it's gone for some reason. I would be grateful if someone could help me re-connect the windows OS back online (without the need to format my computer or to uninstall and re-install the guest OS). Thanks!

share|improve this question
1  
Should be a misconfiguration in Windows. –  Naveen Oct 21 '13 at 12:44
    
Any thoughts on how to fix this? –  Ben Oct 21 '13 at 16:44
    
You can try to boot the guest using a Live CD, if it has internet connection it is a Windows issue, if it doesn't then it's likely a VB configuration issue. –  Javier Rivera Oct 22 '13 at 6:44

2 Answers 2

I was having the same problem on Ubuntu 12.10 64bit using Virtualbox 4.2.22. Here are the steps I took to solve my problem:

  1. Open Virtualbox Manager
  2. Select the machine you cannot get internet on in the left pane
  3. Click the Settings button in the top menu
  4. Click Network in the left pane in the settings window
  5. Switched to Bridged Adaptor in the Attached to drop-down menu
  6. Select the name of the internet adaptor you are currently using on your host machine. I am using wireless so I chose eth0 which is my wireless network adaptor. You can check which adaptor you are currently using by opening the terminal (CTRL+ALT+T by default) and running ifconfig. It will probably be the ethadaptor that shows an inet addr and shows data transfer next to RX bytes.
  7. Under Advanced, make sure the machine is using the Desktop Adaptor Type
  8. Under Advanced, make sure Promiscuous Mode is set to Allow VMs
  9. Under Advanced, make sure Cable connected is checked on
  10. Hit OK to save your changes
  11. Start your VM

At that point you should be able to start a web browser in your VM and get a connection. This video provided the information I listed above even though it was used on a Windows 7 host with a Windows Server guest.

Here is an image showing an example of the settings you need (taken from this answer): Virtualbox Network Settings

share|improve this answer

For wireless to work, in my machines anyway, the WiFi MAC address in Settings must match the hardware, and wlan0 must be selected.

Here's a quick HowTo:

First click your network icon and select Connection Information.

On the Hardware Address line, copy the MAC address (the six digit-pairs separated by colons).

Paste in a neutral location such as a text editor, where the colons can be edited out (remove them). Copy the rendered 12 characters remaining.

Note: Attempts to paste the MAC with the colons still present will fail.

With the latest VirtualBox (VBox) available from xbuntu repos, v4.1.12 at this writing:

In VBox, with the VM selected, click Settings. Click Network and on that page, typically under the Adapter 1 tab, click Advanced.

Click the dropdown at Attached to: and select Bridged Adapter. Highlight the 'Mac Address' data and delete it. Paste true MAC address copied above.

Check parameters are set as follows, in order from top-to-bottom:

  • Enable Network Adapter: checked
  • Attached to: Bridged Adapter
  • Name: wlan0

Under 'Advanced'

  • Adapter Type: the one with "Desktop" in the name
  • Promiscuous Mode: Allow All
  • Mac Address: as copied and pasted above
  • Cable Connected: checked

Note that in the VM window, for Win7 at least, the WiFi symbol appears different from what it is in native mode. But WiFi is running nevertheless.

share|improve this answer

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.