Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

The server: Ubuntu 10.10 Server as guest in a VirtualBox (IP

Simple Question: I want to access a virtual host named 'example.server' from outside my virtual box by simply using a browser and an address like http://example.server. The whole thing should be realized by using DNSMasq.
Thx. :)

share|improve this question
up vote 0 down vote accepted

First, you configure Virtualbox to use bridged networking


Next you install dnsmasq on your dns server. I assume this is Ubuntu with an ip address of , adjust accordingly

sudo apt-get install dnsmasq

You then add your virtualbox server into /etc/hosts on the dns (dnsmasq) server

# Graphical
gksu gedit /etc/hosts

# Command line
sudo -e /etc/hosts

Add in your server example.server www.example.server

You then point your clients to use your dns (dnsmasq) server for dns. You can do this with network manager, put in as the dns server.


share|improve this answer
Yap, my problem was, that I pointet to in my /etc/hosts file, not Formerly, I had a webserver directly on my pc - not virtualized via VirtualBox and there it was correct. Thanks for your help! :) – Boris Karl Schlein Mar 12 '12 at 19:43

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.