No internet connection for Linux guest

Discussions related to using VirtualBox on Windows hosts.
Post Reply
UmbrellaMan
Posts: 12
Joined: 27. Oct 2017, 16:32

No internet connection for Linux guest

Post by UmbrellaMan »

I have an Ubuntu guest on a windows 7 host running in VirtualBox 5.2.16. This VM has worked fine in the past (with VB 5.2.8 ), but now cannot connect to the internet with VB 5.2.8 or 5.2.16. Web browsers cannot load websites- server not found. In the terminal, I can ping internet sites by IP address, but not by name. I have this problem whether I use "VBoxManage modifyvm [machine name] --natdnsproxy1 on" or "VBoxManage modifyvm [machine name] --natdnsproxy1 off". Any ideas on how to troubleshoot this? I don't know what changed to keep this from working.
The VirtualBox program itself has internet access because it is able to check for software updates and inform me when an updated version is available.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: No internet connection for Linux guest

Post by socratis »

UmbrellaMan wrote:I can ping internet sites by IP address, but not by name.
That would indicate a DNS problem. What is your DNS server? Can you ping your DNS server? What mode do you use, NAT or Bridged? The DNS server should be the same as your host's. If not, something's going on...
UmbrellaMan wrote:whether I use "VBoxManage modifyvm [machine name] --natdnsproxy1 on" or "VBoxManage modifyvm [machine name] --natdnsproxy1 off"
And may I ask why you felt the need to start messing with those things? Was that the first thing that you did to troubleshoot the problem?

Please describe your host's and your guest's network setup. Post the output from the host of:
  • ipconfig /all
and the output from the guest of:
  • ifconfig -a
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
UmbrellaMan
Posts: 12
Joined: 27. Oct 2017, 16:32

Re: No internet connection for Linux guest

Post by UmbrellaMan »

Thanks, @socratis
I put the ipconfig info in the attached file

Code: Select all

C:\>ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : WW123PC0F4545
   Primary Dns Suffix  . . . . . . . : abcd.com
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : abcd.com
                                       intranet.abdc.com
                                       nam.abcd.com
                                       efgh.net
                                       efgh.com
                                       ij.net
                                       eur.abcd.com
                                       lam.abcd.com
                                       abcdclouddmz.com
                                       ddnet1.net
                                      

Wireless LAN adapter Wireless Network Connection:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) Dual Band Wireless-AC 8260
   Physical Address. . . . . . . . . : E4-A4-71-8C-56-C7
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::4455:2ef4:78dc:3bdf%18(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.100.110.11(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Thursday, August 02, 2018 5:55:57 PM
   Lease Expires . . . . . . . . . . : Friday, August 03, 2018 5:55:56 PM
   Default Gateway . . . . . . . . . : 10.100.110.1
   DHCP Server . . . . . . . . . . . : 10.100.110.1
   DHCPv6 IAID . . . . . . . . . . . : 769959025
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1D-A8-12-4B-00-15-5D-78-B2-48

   DNS Servers . . . . . . . . . . . : 10.100.110.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Local Area Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : abcd.com
   Description . . . . . . . . . . . : Intel(R) Ethernet Connection I219-LM
   Physical Address. . . . . . . . . : C8-5B-76-4C-22-FB
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Ethernet adapter VirtualBox Host-Only Network:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
   Physical Address. . . . . . . . . : 0A-00-27-00-00-2D
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::9d4e:99b8:ace7:803e%45(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.56.1(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 755630119
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1D-A8-12-4B-00-15-5D-78-B2-48

   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Code: Select all

Ifconfig -a
enp0s3    Link encap:Ethernet  HWaddr 08:00:27:9a:55:2a  
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::c2ac:fec6:545b:11d6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:152 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:710 (710.0 B)  TX bytes:14351 (14.3 KB)
          Interrupt:19 Base address:0xd020 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:121 errors:0 dropped:0 overruns:0 frame:0
          TX packets:121 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:8311 (8.3 KB)  TX bytes:8311 (8.3 KB)
Regarding the natdnsproxy1 command, previously, I had a guest dns resolution problem and an internet search revealed that turning the proxy on would correct the problem. In that case, that turned out to be correct. Is there something I need to fix there? Maybe that is related to my new problem.
Last edited by socratis on 3. Aug 2018, 08:08, edited 1 time in total.
Reason: Replaced attachment with actual text.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: No internet connection for Linux guest

Post by socratis »

UmbrellaMan wrote:In that case, that turned out to be correct.
How is it that it turned out to be correct, since your problems are DNS based? ;)
I would revert to the defaults by removing the proxy from the NAT engine:
  • VBoxManage modifyvm <VM> --natdnsproxy1 off
UmbrellaMan wrote:I have an Ubuntu guest
I shouldn't have asked for the "ifconfig" output in that case, sorry, I should have asked you for the output of:
  • nmcli dev show
Post the output, but take a look at the "IP4.DNS" value. That should match your host's DNS server.

In any event, I believe this to be a problem with the guest configuration, not VirtualBox. Start taking a look from that side as well...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
UmbrellaMan
Posts: 12
Joined: 27. Oct 2017, 16:32

Re: No internet connection for Linux guest

Post by UmbrellaMan »

Code: Select all

nmcli dev show

GENERAL.DEVICE:                         enp0s3
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         08:00:27:9A:55:2A
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     Wired connection 1
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/0
WIRED-PROPERTIES.CARRIER:               on
IP4.ADDRESS[1]:                         10.0.2.15/24
IP4.GATEWAY:                            10.0.2.2
IP4.ROUTE[1]:                           dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000
IP4.DNS[1]:                             10.100.110.1
IP6.ADDRESS[1]:                         fe80::c2ac:fec6:545b:11d6/64
IP6.GATEWAY:                            

GENERAL.DEVICE:                         lo
GENERAL.TYPE:                           loopback
GENERAL.HWADDR:                         00:00:00:00:00:00
GENERAL.MTU:                            65536
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
IP4.ADDRESS[1]:                         127.0.0.1/8
IP4.GATEWAY:                            
IP6.ADDRESS[1]:                         ::1/128
IP6.GATEWAY:                            
My previous DNS problem happened last year. At that time, turning the DNS proxy on restored internet access. This time, neither setting (either on or off) works.

I question if this problem is a result of guest configuration. I have another linux guest on VirtualBox on this machine and that one stopped working at the same time. I had uninstalled VirtualBox and when I reinstalled it a month later (recently), neither guest worked. I'm not aware of any change that I might have made, however.
UmbrellaMan
Posts: 12
Joined: 27. Oct 2017, 16:32

Re: No internet connection for Linux guest

Post by UmbrellaMan »

Update: I installed a fresh download of a different Linux distro and ran the same tests and got the same result- I can ping by IP number, but not by hostname. That would hint to me that the problem is either with my host or VirtualBox.
Any suggestions on things to try?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: No internet connection for Linux guest

Post by socratis »

ZIP the following two files:
  • C:\Users\<you>\.VirtualBox\VirtualBox.xml (note the period before the "VirtualBox").
  • The .vbox of a VM that fails to communicate.
Your problem is clearly the DNS. I can see that you have the same DNS for both the host and the guest (10.100.110.1). But at the same time I see that you have plenty of search domains in your host's entries. Not your typical setup. Can you remove those search domains? Can you make sure that your host's DNS is setup correctly? Because VirtualBox takes directly that information and uses that. My suspicion about something not being setup correctly is leaning towards the host.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
UmbrellaMan
Posts: 12
Joined: 27. Oct 2017, 16:32

Re: No internet connection for Linux guest

Post by UmbrellaMan »

Can you remove those search domains?
Do you recommend I try removing them from the host's wireless adapter DNS settings, or the VirtualBox Host-Only Network adapter's? Or both?
Can you make sure that your host's DNS is setup correctly?
I've never done this before. Can you list some steps to do this or point me toward some other resource that would guide me in troubleshooting?

I guess I assumed the host's DNS was set up correctly because I don't seem to have any internet connectivity problems when using the host's connection directly. I only have the problem within VirtualBox. I'm trying to understand how an incorrectly configured host DNS would prevent VirtualBox machines from connecting to the internet, but the host's connections would keep working fine.

When I mentioned that pinging by IP address worked but pinging by hostname didn't, maybe I should mention that what I tried was pinging 8.8.8.8 and 8.8.4.4. I got quick responses for all packets, but pinging "google.com" or "www.google.com" times out without a response. Is that sufficient and the proper way to test this?
Attachments
VB.zip
(2.93 KiB) Downloaded 108 times
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: No internet connection for Linux guest

Post by socratis »

UmbrellaMan wrote:or the VirtualBox Host-Only Network adapter's?
You don't have a HostOnly adapter installed in the VM, you have enabled the "NAT" mode (which is a good move):
<Adapter slot="0" enabled="true" MACAddress="080027624C34" type="82540EM">
  <NAT/>
</Adapter>
UmbrellaMan wrote:Can you list some steps to do this or point me toward some other resource that would guide me in troubleshooting?
Just search for "DNS Suffix Search List". Here are a couple: Unless you're in a domain, the DNS suffixes are really suspicious. You should be having so many top-level entries.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
UmbrellaMan
Posts: 12
Joined: 27. Oct 2017, 16:32

Re: No internet connection for Linux guest

Post by UmbrellaMan »

After some further reading, I can say that those DNS search entries are related to access to my work intranet and work domain. Does that make sense, or is there something else there that I should investigate?

I'm confused as to why the host's internet connection works fine but virtual machines don't. If a DNS setting was wrong, wouldn't that affect the host, too?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: No internet connection for Linux guest

Post by socratis »

Download a Linux LiveDVD. I'd go with Mint or Ubuntu. Create a new VM. Give it only one network adapter, set to NAT. That's the default in any event. Try it out, see what happens.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
UmbrellaMan
Posts: 12
Joined: 27. Oct 2017, 16:32

Re: No internet connection for Linux guest

Post by UmbrellaMan »

I had done this on Aug 6th when I posted that I tried a new Linux machine. It has only 1 nat-ed adapter and it doesn't work- Can ping by IP, not by hostname.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: No internet connection for Linux guest

Post by socratis »

I have no clue then what's wrong with your setup. VirtualBox seems perfectly normal. I suggest you try another computer and see if it works (it will).
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Simple07
Posts: 133
Joined: 5. Nov 2014, 16:05

Re: No internet connection for Linux guest

Post by Simple07 »

Try adding a second Network Adapter, attached to (Bridged Adapter) and under advanced, ensure that Promiscuous Mode is set to (Allow All) and see if you get different results.
Post Reply