Page 1 of 1

[Solved] set DNS to hosts static vboxnet0 address

Posted: 23. Jan 2018, 17:09
by JayLL
My setup:
I have two virtual machines running on virtualbox which is on a Mint host.

The two virtual machines are connected to a host-only network: vboxnet0
The DHCP server for vboxnet0, is set on one of the virtualmachines, using nethserver.
This nethserver also does the DNS.

The idea is that the other guest OS, gets dhcp, domain, AD etc from nethserver.
(Nethserver itself connects to the internet using a bridged connection on the wireless interface. )
This works.
From nethserver CLI, I can ping, and I can find that machine doing nslookup, using the IP, and reverse, using the hostname.

The problem:
I can't connect to the guest OS's using the hostname

My host system can ping both the guests.
However, when I try to do a nslookup, I get the NXDOMAIN reply, because the host only looks at 127.0.0.1

The vboxnet address on the host is static so it doesn't get the DNS data from the Guest.
In Virtualbox, it's not possible to set the DNS for vboxnet0 static config. (Using the GUI)

Is this possible using the CLI with vboxmanage?
Should I use another network type?
- Bridged may be an option, but then I need an external switch. Since I want to duplicate this setup a number of times, I want to avoid external hardware.

thoughts?

Re: set DNS to hosts static vboxnet0 address

Posted: 25. Jan 2018, 17:12
by JayLL
Ok, solved it myself, but as this may help others, here's what caused the issues.

The wireless router, needs it's own DHCP, to be able to connect to it.
Also, the host OS needs to bring up the wireless link, so you cannot use it on the VBox guest without having it active on the Host.

I'm now only using a bridged network connection on the wired connection.
I also have a host-only network, to have an additional administrative connection to my server. This one is static addresses only.
The only DHCP server in the network is now on my server.

DHCP, DNS, etc, are now all working fine.

I can now also connect other hosts and guests to this wired network through a switch/hub, which can all be pinged, reached and looked up using hostnames.

Re: set DNS to hosts static vboxnet0 address

Posted: 26. Jan 2018, 09:45
by socratis
I'm not quite sure that this is a VirtualBox issue, but thank you nonetheless, it may help future searchers. Marking as [Solved].