<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 19/04/2019 09:48, abubin wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAGfgFXb-Pgap7wWAmANvWj0ym=gR9o9zEjrZv1VHv2K-Fu6iDg@mail.gmail.com">
<div>Is it possible to use recursor to forward all queries to pdns
authoritative server and if that query fails, it will forward
all to public DNS such as 8.8.8.8?</div>
</blockquote>
<p>I don't think so. (In any case, define what you mean by
"failure" - REFUSED? SERVFAIL? NXDOMAIN? Something else?)</p>
<p>You might be able to do something funky like that with dnsdist,
but I prefer DNS to work deterministically.<br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CAGfgFXb-Pgap7wWAmANvWj0ym=gR9o9zEjrZv1VHv2K-Fu6iDg@mail.gmail.com">
<div><br>
</div>
<div>For example, in my pdns, I have create a domain called <a
href="http://mydomain.com" moz-do-not-send="true">mydomain.com</a>
and yourdomain.moc. </div>
<div><br>
</div>
<div>So instead of creating:</div>
<div>forward-zones=mydomain=<a href="http://127.0.0.1:5300"
moz-do-not-send="true">127.0.0.1:5300</a></div>
<div>forward-zones+=yourdomain.moc=<a href="http://127.0.0.1:5300"
moz-do-not-send="true">127.0.0.1:5300</a></div>
<div>forward-zones-recurse=.=8.8.8.8</div>
<div><br>
</div>
<div>I would like to create:</div>
<div>forward-zones-recurse=.=<a href="http://127.0.0.1:5300"
moz-do-not-send="true">127.0.0.1:5300</a></div>
<div>forward-zones-recurse+=.=8.8.8.8</div>
<div><br>
</div>
<div>However, tried second method and it does not work. Please
advise.</div>
</blockquote>
<p>You could try using forward-zones-file to list all your domains
which need to be forwarded:</p>
<p>mydomain.com=127.0.0.1:5300<br>
yourdomain.moc=127.0.0.1:5300<br>
+.=8.8.8.8</p>
<p>I am not sure about the last line, as I've never used
pdns-recursor as a dumb forwarding cache. I prefer to let it do
its own recursion and not trust a third-party cache.<br>
</p>
<p>Also see the note about negative trust anchors at <a
href="https://doc.powerdns.com/recursor/settings.html#forward-zones">https://doc.powerdns.com/recursor/settings.html#forward-zones</a></p>
<p><br>
</p>
</body>
</html>