Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have dedicated server where I planned to run virtualbox virtual machines. Since the VMs are managed with vagrant/chef I may end up with many different ones. I thought it would be a great idea to deploy a dnsmasq on the server, which is going to dynamically assign the ip addresses to the VMs. Since each Vagrant/Chef recipe is configured to set the VM's host name I can find/reference the appropriate VM by the host name.

Finally, the entire infrastructure is not directly accessible via internet, so the dedicated Server is the OpenVPN host. So the entire infrastructure may be seen as:

|         Dedicated Server            |     
|                                     |     
|  +-------------+    +------------+  |         +------------------+
|  |   DNSMasq   |    |   OpenVPN  |<==========>|      Client      |
|  +-------------+    +------------+  |         |                  |
|    ^   ^                            |         +------------------+
|    |   |                            |
| +--+   |                            |
| |   +-------+                       |
| |   |  VM1  |                       |
| |   +-------+                       | 
| |     ...                           |
| | +-------+                         |
| +-|  VM2  |                         |          
|   +-------+                         |

Now some questions which I am struggling with:

  1. Are there any other suggestions to access private infrastructure, because I don't want to reinvent the wheel.
  2. On the Dedicated Server I don't see the vboxnet0 interface but VirtualBox is installed without GUI. Accessing of virtual boxes via ssh works fine. Did I miss smth?

    OK, got it! vboxnet0 is only enabled/visible when hostonly networking is used.

  3. DNSMasq must serve the local VMs only, otherwise there is a chance that local DNSMasq start to serve other server's on the network, what I don't want. Because I don't see vboxnet0 I tend to use no-dhcp-interface=eth0 config option. Are there any thoughts on that despite, the fact that a second NW-card (which is not the case), might start serving DHCP-Requests?

  4. How should I config the VM's network interface that I am able to access it via OpenVPN and resolve the hostnames using the DNSMasq. I think it should be the host-only network card.
  5. Should I do bridging in the OpenVPN config or is it sufficient to use routing.
share|improve this question
Have you considered just using a bridged network setup, you get to use existing dhcp infrastructure and remote access could be simplified. The VM's would become just another server on the local network, then just configure OpenVPN as per standard setup. – Aaron Tate Aug 23 '13 at 14:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.