0

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

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

0

First, you configure Virtualbox to use bridged networking

bridge

Next you install dnsmasq on your dns server. I assume this is Ubuntu with an ip address of 192.168.178.10 , 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

192.168.178.91 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 192.168.178.10 in as the dns server.

dns

  • Yap, my problem was, that I pointet to 127.0.0.1 in my /etc/hosts file, not 192.168.178.91. 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.