Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

1 Answer 1

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.