[Dnsmasq-discuss] Can dnsmasq 'alias' a host name?

Simon Kelley simon at thekelleys.org.uk
Wed Sep 2 20:46:01 BST 2009


Chris G wrote:
> On Wed, Sep 02, 2009 at 05:51:15PM +0100, Simon Kelley wrote:
>> Chris G wrote:
>>> Can dnsmasq provide an alternative name for a client?
>>>
>>> This is going on from my problem with a system that insists on calling
>>> itself garage.local when I want it to be called garage.
>>>
>>> Is there a way that I can tell dnsmasq that garage.local is also
>>> garage so that requests for the address of garage will get the address
>>> of garage.local?
>>>
>> yes.
>>
>>
>> cname=garage,garage.local
>>
>> should do it.
>>
> It doesn't seem to work though.  I have added the following to the end
> of /etc/dnsmasq.conf :-
> 
>     cname=garage,garage.local
> 
> I have killed and restarted dnsmasq (it's still providing DNS OK).
> 
> However I can't ping or ssh to garage, but I can ping and ssh to
> garage.local. 
> 
> 

The fact that this thing is putting .local on the end of its name
suggests that is might be doing mDNS, and that the host you are testing
it with is also configured to use mDNS as a name-resolution method.
Since dnsmasq doesn't have anything to do with mDNS, it can't affect that.

Some things to check:

1) /var/lib/misc/dnsmasq.leases. Does the garage.local name appear
there, it will if the NAS is announcing that name in its DHCP requests.

2) /etc/nsswitch.conf does mdns appear in the hosts: line?

3) Try "dig garage.local" which just does a DNS query and doesn't try
the other name-resolution methods.

There are ways around this, but we need to know exactly what's going on
first.

Cheers,

Simon.




More information about the Dnsmasq-discuss mailing list