<div dir="ltr">Well, long story short - both nameservers (which are not connected to each other) resolve different names providing access to different private resources. In another words, the second nameserver doesn't know anything about the first's private resources and vice versa. And I need access to all of them at the same time. The problem is that resources are placed on different two-level subdomains. I mean not only on <a href="http://example.com">example.com</a>, but on a bunch of another subdomains which I can not predict, i.e. I can't use <span style="font-family:arial,sans-serif;font-size:13px">server=/</span><a href="http://github.example.com/192.168.0.2" target="_blank" style="font-family:arial,sans-serif;font-size:13px">example.com/192.168.0.2</a><div>
<br></div><div style>The resolv.conf can't solve such a problem. I was hoping that dnsmasq could do that, ask all upstream servers and get at least one positive response and return it back.</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sat, May 11, 2013 at 10:07 PM, /dev/rob0 <span dir="ltr"><<a href="mailto:rob0@gmx.co.uk" target="_blank">rob0@gmx.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Sat, May 11, 2013 at 09:43:48PM +0300, Evgeniy Afonichev wrote:<br>
> I'm trying to use dnsmasq as forwarding dns server in the following<br>
> way - if first server returns NXDOMAIN then dnsmasq should ask<br>
> another server from the list<br>
<br>
</div>Perhaps you'd get better help here if you described the ultimate<br>
goal, why you want to do this? AFAIK this is not possible (but I<br>
haven't gone through the man page to see if there's an option for<br>
this purpose.)<br>
<div><div class="h5"><br>
> my dnsmasq.conf file<br>
> all-servers<br>
> no-poll<br>
> server=192.168.0.1<br>
> server=192.168.0.2<br>
> strict-order<br>
><br>
> log output<br>
> $ dnsmasq -d -q --conf-file=dnsmasq.conf<br>
> dnsmasq: started, version 2.59 cachesize 150<br>
><br>
><br>
><br>
> dnsmasq: compile time options: IPv6 GNU-getopt DBus i18n DHCP TFTP<br>
> conntrack IDN<br>
> dnsmasq: using nameserver 192.168.0.1#53<br>
> dnsmasq: using nameserver 192.168.0.2#53<br>
> dnsmasq: read /etc/hosts - 8 addresses<br>
> dnsmasq: using nameserver 192.168.0.1#53<br>
> dnsmasq: using nameserver 192.168.0.2#53<br>
> dnsmasq: using nameserver 192.168.0.1#53<br>
> dnsmasq: query[A] <a href="http://github.example.com" target="_blank">github.example.com</a> from 172.18.194.4<br>
> dnsmasq: forwarded <a href="http://github.example.com" target="_blank">github.example.com</a> to 192.168.0.1<br>
> dnsmasq: reply <a href="http://github.example.com" target="_blank">github.example.com</a> is NXDOMAIN-IPv4<br>
> dnsmasq: query[A] <a href="http://github.example.com" target="_blank">github.example.com</a> from 172.18.194.4<br>
> dnsmasq: cached <a href="http://github.example.com" target="_blank">github.example.com</a> is NXDOMAIN-IPv4<br>
><br>
> as we can see - as soon as the first server 192.168.0.1 returns<br>
> NXDOMAIN, dnsmasq returns NXDOMAIN too no matter if there's still<br>
> another server 192.168.0.2, which can resolve the required domain.<br>
><br>
> How to make dnsmasq continue querying other servers when the<br>
> previous one returned NXDOMAIN?<br>
<br>
</div></div>My best guess here is that <a href="http://github.example.com" target="_blank">github.example.com</a> (or <a href="http://example.com" target="_blank">example.com</a> itself)<br>
is somehow representing a special name, one for which 192.168.0.2<br>
might be authoritative. In that case, you need to specify the domain<br>
in the server directive:<br>
<br>
server=/<a href="http://github.example.com/192.168.0.2" target="_blank">github.example.com/192.168.0.2</a><br>
<br>
Do this in addition to "server=192.168.0.2" if 192.168.0.2 should<br>
also be providing resolver service for you.<br>
<span class="HOEnZb"><font color="#888888">--<br>
  <a href="http://rob0.nodns4.us/" target="_blank">http://rob0.nodns4.us/</a> -- system administration and consulting<br>
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:<br>
<br>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
</font></span></blockquote></div><br></div>