Alex Rivera | Logout

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

Asked 2009-04-22T00:20:02.057
35

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.

Edit
Report

1 Answer

4

I gave it up as not possible at the time, and I haven't revisited the problem since.

My current solution is to laboriously add each subdomain of interest to the hosts file on the local machine.

answered 2010-03-14T01:01:40.730

Your Answer