Ubuntu 16.04 with Virtualbox 5.0.3 - When I setup a nat network, the VMs on that network can talk with each other. However, none of them can reach the Internet. I have tried static and DHCP (hence the DHCP server is working) assigned addresses to the same effect. $ VBoxManage list natnets - lists the nats just fine. When I change it to just NAT or Bridged, the VM can reach the Internet. I have removed the natnets and recreated them to the same effect. Any ideas as to why the nat network is not connecting to the internet?
Thank you!
Cannot Connect to Internet via Nat Network
-
- Oracle Corporation
- Posts: 3362
- Joined: 7. Jun 2007, 09:11
- Primary OS: Debian Sid
- VBox Version: PUEL
- Guest OSses: Linux, Windows
- Location: Dresden, Germany
- Contact:
Re: Cannot Connect to Internet via Nat Network
Cannot connect to the Internet is a blurry error description. In such cases I can imagine two problems: (1) there is no DNS server available to the guest so connecting to named servers (e.g. www.google.com) will not work. In such cases specifying the IPv4 address should still work. (2) Of course the guest will only have Internet if the host is able to connect to the Internet as well. As you pretend that your host connects successfully to the Internet I can only imagine that you can access IPv4 addresses from your guests but no server names. Is that true?
-
- Oracle Corporation
- Posts: 3362
- Joined: 7. Jun 2007, 09:11
- Primary OS: Debian Sid
- VBox Version: PUEL
- Guest OSses: Linux, Windows
- Location: Dresden, Germany
- Contact:
Re: Cannot Connect to Internet via Nat Network
To debug this issue further it makes sense to attach the log file of the corresponding NAT service. If your NAT network is named "natnet1" then there should be a log file natnet1.log in your VBox configuration directory. On Linux hosts this directory is located either in $HOME/.config/VirtualBox or in $HOME/.VirtualBox.
Re: Cannot Connect to Internet via Nat Network
I have the directory you mentioned but I don't see the log file regarding the net. I do see the net.leases but no log file. I just have VboxSVC logs and selectorwindow logs. Nothing looks unusual in them that I can tell. The host does have Internet connection and as I mentioned in either of the other 2 modes; bridged or NAT the Internet comes through to the VMs. Thanks so much for your help!
John
John
Re: Cannot Connect to Internet via Nat Network
I did everything from scratch with the same outcome. I uninstalled virtualbox, rebooted to clear any running processes, installed virtualbox again, installed ubuntu 16.04 VM from its ISO. When I brought it up by default it was running with the basic NAT and it connected to the internet. But I then created a Nat network from the preferences menu. I then switched the VM to use the new nat network I created. It came up fine but can no longer connect to the Internet. It has an IP address and can connect to other VMs. Is this just me? Thanks for the help.
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Cannot Connect to Internet via Nat Network
Post the guests log file ( as an attachment ). Right click on the guest in the Main Manager then click show log. Save and post as an attachment. Compress if it is too large to post.
And
From the hosts terminal type VBoxManage showvminfo <VM Name> --details and post here. Replace <VM Name> with the actual name of the VM. Use " " if the name has a space in it.
And
From the hosts terminal type VBoxManage showvminfo <VM Name> --details and post here. Replace <VM Name> with the actual name of the VM. Use " " if the name has a space in it.
Re: Cannot Connect to Internet via Nat Network
The log file is from a from scratch VM creation of Ubuntu 16.04. It first came up with NAT. Which did connect to the Internet. When I changed it to use a NAT network. It no longer could connect. I did find a workaround. I can add another network interface as a NAT. But I don't think that is way it should be.
Thank you!
John
Thank you!
John
- Attachments
-
- vblog.txt
- Log file from VM
- (72.64 KiB) Downloaded 126 times
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Cannot Connect to Internet via Nat Network
I really need to see the rest of what I asked for to be able to tell you what is really going on, but it looks like you had this guest set to IntNet ( Internal Network ) and that type would not have Internet access.
Code: Select all
00:00:00.397053 [/Devices/e1000/0/LUN#0/] (level 4)
00:00:00.397054 Driver <string> = "IntNet" (cb=7)
Re: Cannot Connect to Internet via Nat Network
Do you know how that gets set? I don't see any options that mention that.
Thanks!
Thanks!
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Cannot Connect to Internet via Nat Network
Since it is not a default setting it must be set manually in the guest setting under the network settings.
Some people choose that by mistake because they do not read the user manual that describes all of the various network modes.
http://www.virtualbox.org/manual/ch06.h ... rkingmodes
Some people choose that by mistake because they do not read the user manual that describes all of the various network modes.
http://www.virtualbox.org/manual/ch06.h ... rkingmodes