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. :)


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.


  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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