Score:0

Forward subdomain to another dns-server with dnsmasq

cr flag

I have dnsmasq as main dns-server in localnet(192.168.0.14). It's serve local domain 'example'. Also I have another dns-server(bind9 - 192.168.222.67) that serve domain 'virt.example' Here part of dnsmasq config:

auth-zone=example,192.168.0.14/32
auth-zone=land.example,192.168.0.14/32
server=/example/192.168.0.14

host-record=land.example,192.168.0.14
host-record=host1.example,192.168.0.14
...
host-record=hostN.example,192.168.0.14
...
server=/*.virt.example/192.168.222.67

In this configuration server 192.168.0.14 answers on all queries about domain .example but returns NXDOMAIN about any host in virt.example. In logs I can see that at start all looks fine:

Apr 19 12:51:45 dnsmasq[7982]: using nameserver 192.168.222.67#53 for domain *.virt.example (no DNSSEC)
Apr 19 12:51:45 dnsmasq[7982]: using nameserver 192.168.222.67#53 for domain *.virt.example (no DNSSEC)

but query was not forwarded correctly

Apr 19 12:52:56 dnsmasq[7982]: query[A] vm04-mail.virt.example from 192.168.0.10
Apr 19 12:52:56 dnsmasq[7982]: auth vm04-mail.virt.example is NXDOMAIN

bind9 works fine:

$ nslookup vm04-mail.virt.example 192.168.222.67
Server:         192.168.222.67
Address:        192.168.222.67#53

Name:   vm04-mail.virt.example
Address: 10.10.10.4

Why dnsmasq don't forward query to bind?

Saïmonn avatar
in flag
I'm not sure of the answer, but I would try two options to see if it changes anything : 1. change the last line from `server=/*.virt.example/192.168.222.67` to `server=/virt.example/192.168.222.67` as this seems to be the way it is written in the man page of dns-masq. 2. I'd also try to comment out the first line : `#auth-zone=example,192.168.0.14/32` To see if the `auth-zone` took priority over the server directive on the `virt` subdomain.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.