[Dnsmasq-discuss] Deferring to external nameserver for certain local domain names

rance at frontiernet.net rance at frontiernet.net
Thu Jan 10 08:33:11 GMT 2008


Quoting Brandon Beck <bmbeck at gmail.com>:

> Hi all,
>
> I apologize if this has been asked and answered already.  I'm looking for a
> way to tell dnsmasq to use an external nameserver for certain names in my
> local domain.
>
> My situation is interesting, but I don't think it's an unreasonable one.
> I'm using Google's "apps for your domain" service for my email, and in my
> public dns entry have a CNAME record that points mail.mydomain.com to
> ghs.google.com.  On my local network however, dnsmasq believes it knows
> everything there is to know about mydomain.com and that since it doesn't see
> a dhcp record for mail.mydomain.com one must not exist.  Is there a way I
> can get dnsmasq to see that CNAME on the public dns server while still
> retaining the ability for dnsmasq to pull entries for mydomain.com from
> DHCP?
>
>
> Thanks,
> Brandon

First to answer your question: Is there a way I can get dnsmasq to see  
that CNAME on the public dns server while still retaining the ability  
for dnsmasq to pull entries for mydomain.com from DHCP?

Yes and No.

dnsmasq is authoritative (or should be) for a particular domain by  
design, so no you won't be able to "bypass" dnsmasq for a particular  
dns record.

I don't remember a "do not resolv these names locally" option in the  
config file.

There is a way to resolv the name locally and force a particular  
answer that doesn't have to be on your network.

use your /etc/hosts file on your dnsmasq box and specify the external  
ip address for the name "mail"  (For the sake of brevity, I'll assume  
you know how to do this)

IF google ever changed the ip address of its mail server you would  
need to update your dnsmasq config.

In order for this to work you need to make sure that dnsmasq is  
reading /etc/hosts in addition to the dhcp lease pool.






More information about the Dnsmasq-discuss mailing list