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 example.com, but on a
bunch of another subdomains which I can not predict, i.e. I can't use
server=/example.com/192.168.0.2 http://github.example.com/192.168.0.2
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.
On Sat, May 11, 2013 at 10:07 PM, /dev/rob0 r...@gmx.co.uk wrote:
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:
___
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