For my dev machine, I have windows 7 host with ubuntu guest. I run the guest as the server.

Every time I want to test from the host, I find my current guest IP address, and connect via that (for example, today it is Of course, this changes every time I connect to a different network.

I want to create a named address, dev.myapp.com that I can connect to from the host windows machine, or possibly any machine on the network (if that is possible, though it may be a security concern, somebody on the network would need to know my url name in order to access, so I'm not that concerned).

I've tried chaning the etc/hosts in ubuntu to include dev.myapp.com

but unfortunately, this isn't resolving from either the host or guest. I'm using a bridged network adapter, promiscuous mode is deny.

  • Why does the guest not have a static IP?
    – user3463
    Aug 14, 2012 at 2:43
  • @RandolphWest, should I be setting a static ip? I thought dynamic was the standard as I'm regularly switching from one network to another.
    – pedalpete
    Aug 14, 2012 at 3:12
  • Ah, no that's fine. Ignore me :-)
    – user3463
    Aug 14, 2012 at 3:21

1 Answer 1


I suggest you use Multicast DNS to fix this.

Ubuntu is using this by default via Avahi.

The Windows host needs an Avahi-client for it to discover other Avahi-services. If your host already uses some Apple software this is probably already there via a service called Bonjour. However, if this is not already installed then a small version of Bonjour is available for download here: Bonjour Print Services. After installation you should be able to access your guest via .local.

Note: The mDNS system seem to use the .local postfix by default. So, if your hostname is "dev.myapp.com", then the actual hostname will be "dev.myapp.com.local".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .