After upgrading to 12.10 from 12.04 none of my virtualbox virtual machines can use NAT to access the network. I have tried vboxmanage modifyvm –natdnsproxy1 on and/or –natdnshostresolver1 on, but still doesn't work. What can I do to resolve this? I have also upgraded to Virtualbox 4.2.4 to attempt to resolve this issue.
Ubuntu – vitualbox NAT stopped working after Ubuntu upgrade to 12.10
nat;virtualbox-networking
Related Solutions
Ok it works like this, when you are INSIDE the virtual environment just forget about virtualbox. Assumming you have the following setup, it should all work out:
MAIN HOST (The one where you are running virtualbox with both guess insides) - It should have an internet access. Does not matter if it through a proxy, inside an intranet or a normal connection to your ISP. It should have access to the internet.
VIRTUALBOX - VIRTUAL HOST (UBUNTU) - It should have one network connection to your MAIN HOST which provides internet and one network connection (Called by default Internal Network) which we will use to share the connection. It should be noted that after finishing the whole sharing explanation this can also work if the HOST is Windows.
VIRTUALBOX - VIRTUAL GUEST (WINDOWS) - It should have one network connection to the "Internal Network".
With all of this setup in that specific way you can do the following:
VIRTUAL HOST (Ubuntu)
- In your Ubuntu 10.04 go to Connection Indicator in the Panel (Network Manager Applet)
- Go to Edit Connections.
- Select your INTERNAL NETWORK interface (Since you will see 2, example eth0 and eth1. One of them is the internal one that connects to the rest of the virtual guests and the other one connects to your MAIN HOST) and open it.
- Go to IPv4 Settings and in the Method field select "Shared with Other Computers".
- Apply and you are done with the VIRTUAL HOST (Ubuntu). Now for the VIRTUAL GUEST (Windows).
NOTE - Some people might suggest a little more complicated iptables, masquerade console commands. There is no need for this since (I think) Ubuntu 9.04 or higher. Since the Network Manager updated itself several years ago everything from Modem, Cellphones and shared wifi connections has been easier than ever.
VIRTUAL GUEST (Windows)
Go to the "Network Manager" in Windows and select the only connection you have. Go to the Ipv4 TCP Protocol and verify that it has the IP set to Dynamic/Auto. It should now see the connection from the ubuntu box. IF by any case it does not work, since you have Windows 7 which includes a pretty nifty way of checking for internet acces you should run this tool from the network manager in windows and make it look for the internet. in this same manner I have made around 50 setups for windows xp, windows vista and windows 7. Most of which are for windows 7. So I might be going out of a limb here but for 50 tests am pretty sure this will work ^^.
NOTE - There is actually no need for a DHCP Server like in Ubuntu server to share. There is also no need for a DNS server in windows. The default setup that comes in ubuntu and windows can deal with a simple task like this. The thing to remember here is that, when inside the virtual environment just forget about the host. Imagine yourself in a lan party with 2 PCs which one has an internet connection and another connection to the lan and the other PC wants to have internet shared to. Eliminating the association between the virtual place and the real place (MAIN HOST) helps in solving several network problems.
NOTE 2 - Additional you NEED (Let me rephrase that, YOU REALLY REALLY!!! NEED) to use the version from VirtualBox and the Extension of Virtualbox to have everything working as it should. The latest version up to this moment which is the 4.1.4 version which came on October 3rd has many problems solved and since version 4.1.2 I can vouch that the horrible problems about random mouse movement and sharing virtual folders is gone.
The latest version can be found here: https://www.virtualbox.org/wiki/Linux_Downloads
And the extension for the latest here: https://www.virtualbox.org/wiki/Downloads
Why am I making such a big fuss over using the Virtualbox from the site and not a PPA or the OSE version. Because first Virtualbox will add after installing the package (Just double click it after downloading it) the ppa or repo to get the latest updates. Second the OSE has many less features than the one in the webpage (This difference started from when innotek was the main company and in those days OSE and virtualbox normal were the same). Now the virtualbox from the main page has way too many more things. Also many PPA out there are obsolete or not updated so fast as the main repo from virtualbox.
NOTE 3 - Since Virtualbox 4.1.4 there is no need to download the extension again. Virtualbox will automatically check to see if the extension is compatible or up to date with the latest version installed. But you still need to install it if you haven't yet done so. At least the first time. After that there is no more need to do it.
In addition to VBoxManage modifyvm "name" --natdnsproxy1 on
, I also had to run VBoxManage modifyvm "name" --natdnshostresolver1 on
on each of my VMs to get DNS working. I found that tip on this page.
Related Question
- Ubuntu – How to share internet access between Ubuntu and Windows guests OS in VirtualBox
- Ubuntu – Virtualbox DNS stopped working on upgrade to 12.10
- Ubuntu – I upgraded ubuntu to 12.10, and the internet does not work on vbox
- Ubuntu – How to let a VirtualBox guest (running Windows) access the Internet
- Ubuntu – Configuring Ubuntu vmware guest NAT
Best Answer
I had the same problem, but without updating to 12.10: I already was in 12.10 last Wednesday, the last time I used the virtualmachine, but on Sunday I couldn't access the network from any virtual OS (tried both Windows 7 and Windows 8). Also tried to update from virtualbox 4.1 (bundled with ubuntu) with virtualbox 4.2 from the Oracle website, but nothing changed.
I guess an Ubuntu update broke something.
I've tried an answer from another thread and it does work
(PS: I couldn't add this as a comment to the original question, don't have enough reputation, but thought it could be useful)