Thanks. That was what I came up with as a backup plan, although I was hoping 
there might be a way where I didn't have to maintain two copies of the CNAME 
records. That's alright though, I'm glad that should at least work.

Thanks for the advice.

Cheers,
Dominick

On Fri, Aug 24, 2018, at 5:34 PM, Simon Kelley wrote:
> If I've understood the situation correctly, the solution is to replicate
> the CNAME in dnsmasq
> 
> cname=host.dcpx.org,host.cityname.dcpx.org
> 
> 
> that way you'll get an answer to the query for host.dcpx.org which a
> cname to host.cityname.dcpx.org and an A record for
> host.cityname.dcpx.org from /etc/hosts.
> 
> 
> Cheers,
> 
> Simon.
> 
> 
> 
> On 24/08/18 21:14, Dominick C. Pastore wrote:
> > Hello,
> > 
> > I would like to to configure Dnsmasq so that when it receives a CNAME 
> > record, if the target is in /etc/hosts, it overrides whatever else the 
> > public DNS server says about that target and uses /etc/hosts instead. Is 
> > this possible? After studying the manual, it seems like not, but I'm 
> > wondering if I missed something.
> > 
> > Here's why:
> > I have split-horizon DNS set up and the router runs Dnsmasq. Within the 
> > network, host.cityname.dcpx.org points to the host's private IP address, 
> > and outside the network, the public DNS record for that name points to the 
> > router's external IP address. For convenience, I created a public CNAME 
> > record for host.dcpx.org -> host.cityname.dcpx.org.
> > 
> > This CNAME record works well across the Internet, but behind the router, 
> > not so much. Dnsmasq goes to the public DNS server for the CNAME record, 
> > which also has the public A record for the canonical name. Once Dnsmasq has 
> > to hit the public DNS server, it seems to take all of its word as law, and 
> > returns the external A record to the client that's inside the network. Even 
> > though it has an entry in /etc/hosts for the same name.
> > 
> > I saw the --local=/cityname.dcpx.org/ and --auth-zone=cityname.dcpx.org 
> > options and got hopeful that one of those would fix my problem, but 
> > unfortunately, neither did.
> > 
> > Thanks,
> > Dominick
> > 
> > _______________________________________________
> > Dnsmasq-discuss mailing list
> > Dnsmasq-discuss@lists.thekelleys.org.uk
> > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> > 
> 
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to