[Dnsmasq-discuss] How to make dnsmasq continue querying other servers when the previous one returned NXDOMAIN?
/dev/rob0
rob0 at gmx.co.uk
Sat May 11 20:07:46 BST 2013
On Sat, May 11, 2013 at 09:43:48PM +0300, Evgeniy Afonichev wrote:
> I'm trying to use dnsmasq as forwarding dns server in the following
> way - if first server returns NXDOMAIN then dnsmasq should ask
> another server from the list
Perhaps you'd get better help here if you described the ultimate
goal, why you want to do this? AFAIK this is not possible (but I
haven't gone through the man page to see if there's an option for
this purpose.)
> my dnsmasq.conf file
> all-servers
> no-poll
> server=192.168.0.1
> server=192.168.0.2
> strict-order
>
> log output
> $ dnsmasq -d -q --conf-file=dnsmasq.conf
> dnsmasq: started, version 2.59 cachesize 150
>
>
>
> dnsmasq: compile time options: IPv6 GNU-getopt DBus i18n DHCP TFTP
> conntrack IDN
> dnsmasq: using nameserver 192.168.0.1#53
> dnsmasq: using nameserver 192.168.0.2#53
> dnsmasq: read /etc/hosts - 8 addresses
> dnsmasq: using nameserver 192.168.0.1#53
> dnsmasq: using nameserver 192.168.0.2#53
> dnsmasq: using nameserver 192.168.0.1#53
> dnsmasq: query[A] github.example.com from 172.18.194.4
> dnsmasq: forwarded github.example.com to 192.168.0.1
> dnsmasq: reply github.example.com is NXDOMAIN-IPv4
> dnsmasq: query[A] github.example.com from 172.18.194.4
> dnsmasq: cached github.example.com is NXDOMAIN-IPv4
>
> as we can see - as soon as the first server 192.168.0.1 returns
> NXDOMAIN, dnsmasq returns NXDOMAIN too no matter if there's still
> another server 192.168.0.2, which can resolve the required domain.
>
> How to make dnsmasq continue querying other servers when the
> previous one returned NXDOMAIN?
My best guess here is that github.example.com (or example.com itself)
is somehow representing a special name, one for which 192.168.0.2
might be authoritative. In that case, you need to specify the domain
in the server directive:
server=/github.example.com/192.168.0.2
Do this in addition to "server=192.168.0.2" if 192.168.0.2 should
also be providing resolver service for you.
--
http://rob0.nodns4.us/ -- system administration and consulting
Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
More information about the Dnsmasq-discuss
mailing list