1
I have a virtual network set up between an Ubuntu VM and my Windows 8.1 laptop, hooked into the Host-Only network adapter. This provides an Apache server and DNS for this specific connection. This will direct all DNS inquiries for .local
to itself, instead of manually maintaining my Windows Hosts file. Note that the VM also has an internet connection through the VirtualBox NAT Interface
When connected to WiFi, nslookup
always works. However, actual connections intermittently do not. How I assume accessing google works normally is this (but nslookup
only requests the "default" DNS server unless a server is specified, and doesn't show attempts to all DNS servers)
DNS Request:
Server: my.router
Address: 192.168.1.1
Name: google.com
Address: 74.125.226.14
etc...
If not found:
Server: johnrom.local
Address: 192.168.56.1
Then, when I try to access something like apache.local:
DNS Request:
Server: my.router
Address: 192.168.1.1
Not Found
Server: johnrom.local
Address: 192.168.56.1
Name: apache.local
Address: 192.168.56.1
However, every once in a while, the internet will not work. Disabling the host-only interface fixes this, and enabling it again breaks it. I've tried changing the order that I enable them, etc. It seems like the only thing that works is to keep host-only disabled for a while, then at some later time turn it back on.
The curious thing is that nslookup returns the same thing as the first code sample above. It knows where google.com is (or any random address aka DNS works). But when I connect to google.com, I can only assume it is sending an already-resolved (on the other interface!) request to 74.125.226.14 through the host-only virtual adapter.
My question is two-fold:
- Is there any way to see the entire DNS lookup process experienced by, for example, Google Chrome? That way I can verify that it requests my.router first, then johnrom.local
- Is there any way to set the gateway of johnrom.local or its interface to be last in the process, making sure that any WiFi connection takes priority at all times, but will fallback to host-only if the request fails?
This is a pretty stressful situation while in the middle of coding, when all of a sudden the internet stops working for 20 minutes. Here's an ipconfig, minus some physical addresses
> ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : johnrom
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : johnrom.local
Wireless LAN adapter Local Area Connection* 3:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) Wireless-N 7260
Physical Address. . . . . . . . . : 00-00-00-00-00-00
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::3db4:f10f:63b7:2449%4(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.10(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Monday, June 30, 2014 1:13:26 PM
Lease Expires . . . . . . . . . . : Monday, June 30, 2014 1:20:55 PM
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DHCPv6 IAID . . . . . . . . . . . : 123423093
DHCPv6 Client DUID. . . . . . . . : 00-00-00-00-00-00-00-00-00-00-00-00-00-00
DNS Servers . . . . . . . . . . . : 75.75.75.75
75.75.76.76
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter VirtualBox Host-Only Network:
Connection-specific DNS Suffix . : johnrom.local
Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::61b9:8e41:2688:4882%9(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.56.2(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Monday, June 30, 2014 1:16:08 PM
Lease Expires . . . . . . . . . . : Tuesday, July 1, 2014 1:16:07 PM
Default Gateway . . . . . . . . . : 192.168.56.1
DHCP Server . . . . . . . . . . . : 192.168.56.1
DHCPv6 IAID . . . . . . . . . . . : 234509822
DHCPv6 Client DUID. . . . . . . . : 00-00-00-00-00-00-00-00-00-00-00-00-00-00
DNS Servers . . . . . . . . . . . : 192.168.56.1
Primary WINS Server . . . . . . . : 192.168.56.1
NetBIOS over Tcpip. . . . . . . . : Enabled
Tunnel adapter isatap.johnrom.local:
Connection-specific DNS Suffix . : johnrom.local
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-00
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::5efe:192.168.56.2%7(Preferred)
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 123423092
DHCPv6 Client DUID. . . . . . . . : 00-00-00-00-00-00-00-00-00-00-00-00-00-00
DNS Servers . . . . . . . . . . . : 192.168.56.1
NetBIOS over Tcpip. . . . . . . . : Disabled
Tunnel adapter Teredo Tunneling Pseudo-Interface:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-00
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter isatap.{7C8B695E-E17C-4699-88A9-362BC3AC3B5C}:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-00
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::5efe:192.168.1.10%14(Preferred)
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 369098752
DHCPv6 Client DUID. . . . . . . . : 00-00-00-00-00-00-00-00-00-00-00-00-00-00
DNS Servers . . . . . . . . . . . : 75.75.75.75
75.75.76.76
NetBIOS over Tcpip. . . . . . . . : Disabled
Do you have any bridging of any kind enabled? This is a common result from trying to bridge incorrectly to a wireless interface. – David Schwartz – 2014-06-30T02:29:23.527
I just realized my reply didn't answer your question. I don't specifically have any bridging enabled, but is it possible that VirtualBox's NAT system uses bridging somehow? I don't see anything that points to that fact. Either way, the best answer I could find is below. – johnrom – 2014-07-01T19:03:02.300
No. VB's NAT is a form of routing, not bridging. – David Schwartz – 2014-07-01T19:28:09.003