Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 192.168.1.188:3000/). 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

127.0.0.1:3000 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.

share|improve this question
    
Why does the guest not have a static IP? –  user3463 Aug 14 '12 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 '12 at 3:12
    
Ah, no that's fine. Ignore me :-) –  user3463 Aug 14 '12 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".

share|improve this answer

Your Answer

 
discard

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.