How to route all subdomains to a single host using mDNS?

Posted by John Mee on Stack Overflow See other posts from Stack Overflow or by John Mee
Published on 2009-04-22T00:20:02Z Indexed on 2010/03/14 1:05 UTC
Read the original article Hit count: 435

Filed under:
|
|

I have a development webserver hosting as "myhost.local" which is found using Bonjour/mDNS. The server is running avahi-daemon.

The webserver also wants to handle any subdomains of itself. Eg "cat.myhost.local" and "dog.myhost.local" and "guppy.myhost.local".

Given that myhost.local is on a dynamic ip address from dhcp, is there still a way to route all requests for the subdomains to myhost.local?

I'm starting to think it not currently possible...

http://marc.info/?l=freedesktop-avahi&m=119561596630960&w=2

You can do this with the /etc/avahi/hosts file. Alternatively you can
use avahi-publish-host-name.

No, he cannot. Since he wants to define an alias, not a new hostname. I.e. he only wants to register an A RR, no reverse PTR RR. But if you stick something into /etc/avahi/hosts then it registers both, and detects a collision if the PTR RR is non-unique, which would be the case for an alias.

© Stack Overflow or respective owner

Related posts about mdns

Related posts about bonjour