<div dir="ltr"><div>Define root zone. </div><div><br></div><div>Delegate <a href="http://teamviewer.com">teamviewer.com</a> from root zone.</div><div><br></div><div>Define <a href="http://teamviewer.com">teamviewer.com</a> as "type forward".</div><div><br></div><div>"recursion no" is incompatible with *any* type of forwarding or iterative resolution. Should only be used if *everything* you resolve is from authoritative data, i.e. for a hosting-only BIND instance. Since you want to forward -- selectively -- you need "recursion yes". Nothing outside of that part of the namespace will be forwarded, since named considers everything else to be contained in the root zone.</div><div><br></div><div>                                                                                - Kevin</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 11, 2019 at 9:06 AM Roberto Carna <<a href="mailto:robertocarna36@gmail.com" target="_blank">robertocarna36@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Matus, I've followed whatyou say:</div><div><br></div><div>view "internet" {</div><div>   match-clients { internet_clients; key "pnet"; };</div><div><br></div><div>recursion yes;</div><div><br></div><div>zone "<a href="http://teamviewer.com" target="_blank">teamviewer.com</a>" {</div><div>        type forward;</div><div>        forward only;</div><div>        forwarders {</div><div>                8.8.8.8;</div><div>        };</div><div>};</div><div><br></div><div>};</div><div><br></div><div>but clients can resolve ANY public Internet domain, in addition to teamviewer.com....I think "recursion yes" apply to every public domain and not just for "<a href="http://teamviewer.com" target="_blank">teamviewer.com</a>", but I don't know why.</div><div><br></div><div>Please can yoy give me more details, using forward or not, how can let some clients resolve just <a href="http://teamviewer.com" target="_blank">teamviewer.com</a> ??? I confirm that my BIND is an authorittaive name server for internal domains.</div><div><br></div><div>Thanks a lot again.</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El lun., 11 feb. 2019 a las 10:49, Matus UHLAR - fantomas (<<a href="mailto:uhlar@fantomas.sk" target="_blank">uhlar@fantomas.sk</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 11.02.19 10:38, Roberto Carna wrote:<br>
>Dear Mathus, thanks al lot for your help.<br>
><br>
>>> what is the point of running DNS server with only two hostnames allowed<br>
>>> to resolve?<br>
><br>
>The point is I have several desktops that must have access only to internal<br>
>domains. The unique exception is they have access to <a href="http://teamviewer.com" rel="noreferrer" target="_blank">teamviewer.com</a>  in<br>
>order to download the Teamviewer client and a pair of operations in this<br>
>public domain.<br>
<br>
if you disable recursion, any client using that server will only have access<br>
to the domains that are configured on that server internally.<br>
<br>
That also means they won't be allowed to contact any internal domains,<br>
unless you configure those internal domains on that server.<br>
Also no windows updates, nothing.<br>
<br>
>I think if I have setup "recursion = no", if I define a forward zone with<br>
>"type forward" and the corresponding forwarder, this option enable the<br>
>recursion just for this defined zone.<br>
<br>
No. Forward zone means recursion. "recursion no" is designed for<br>
authoritative servers, not servers like there.<br>
<br>
>In general, my question is how to forward a public domain to a DNS resolver<br>
>like 8.8.8.8 ???<br>
<br>
configure it as "type forward" and forwarders to 8.8.8.8. However, BIND can<br>
do resolution well without forwarding. Also, this seems to be just the<br>
opposite wht you describe above.<br>
<br>
>El sáb., 9 feb. 2019 a las 12:28, Matus UHLAR - fantomas (<<a href="mailto:uhlar@fantomas.sk" target="_blank">uhlar@fantomas.sk</a>>)<br>
>escribió:<br>
><br>
>> On 07.02.19 16:30, Roberto Carna wrote:<br>
>> >Desktops I mentioned can only access to web apps from internal domains,<br>
>> but<br>
>> >in some web apps there are links to download Teamviewer client software<br>
>> >from Internet. I can create a private zone "<a href="http://teamviewer.com" rel="noreferrer" target="_blank">teamviewer.com</a>" with all the<br>
>> >hostnames and IP's we will use, but if they change I will be in trouble.<br>
>> ><br>
>> >So we need to forward the query to our resolvers in order to get a valid<br>
>> >response.<br>
>> ><br>
>> >So I think we can use the forward option from BIND, but it doesn't work at<br>
>> >all as I described:<br>
>> ><br>
>> >1. "recursion no" can only be set at the top (view) level, not overridden<br>
>> >   at the zone level.<br>
>> ><br>
>> >2. If I set "recursion no" at the view level, then a "type forward"<br>
>> >   zone has no effect:<br>
>> ><br>
>> >  view "foo" {<br>
>> >    recursion no;<br>
>> >    ...<br>
>> >    zone "<a href="http://teamviewer.com" rel="noreferrer" target="_blank">teamviewer.com</a>" {<br>
>> >      type forward;<br>
>> >      forward only;<br>
>> >      forwarders {172.18.1.1; 172.18.1.2;};<br>
>> >    };<br>
>> ><br>
>> >-- query for <a href="http://foo.teamviewer.com" rel="noreferrer" target="_blank">foo.teamviewer.com</a> fails and tell it's not a recursive query<br>
>><br>
>> the whole point of "recursion no" is not to answer recursive queries,<br>
>> so there should be no wonder it works that way.<br>
>><br>
>><br>
>> >3. If I define "recursion yes" at view level:<br>
>> ><br>
>> >  view "foo" {<br>
>> >    recursion yes;<br>
>> >    ...<br>
>> >    zone "<a href="http://teamviewer.com" rel="noreferrer" target="_blank">teamviewer.com</a>" {<br>
>> >      type forward;<br>
>> >      forward only;<br>
>> >      forwarders {172.18.1.1; 172.18.1.2;};<br>
>> >    };<br>
>> ><br>
>> >-- query for <a href="http://foo.teamviewer.com" rel="noreferrer" target="_blank">foo.teamviewer.com</a> is OK, but also I get response OK from<br>
>> ><a href="http://foo.ibm.com" rel="noreferrer" target="_blank">foo.ibm.com</a>, <a href="http://foo.google.com" rel="noreferrer" target="_blank">foo.google.com</a>, and any other public domain from Internet<br>
>> >(and this is not what I want, it's what I'm trying to prevent))<br>
>> ><br>
>> >So can you help me please???<br>
>><br>
>> you still have not answered my question:<br>
>><br>
>> >> what is the point of running DNS server with only two hostnames allowed<br>
>> to<br>
>> >> resolve?<br>
>><br>
>> However, you can define empty type master "." zone, and bind will return<br>
>> NXDOMAIN for anything other.<br>
>><br>
>><br>
>> >El jue., 7 feb. 2019 a las 15:40, Matus UHLAR - fantomas (<<br>
>> <a href="mailto:uhlar@fantomas.sk" target="_blank">uhlar@fantomas.sk</a>>)<br>
>> >escribió:<br>
>> ><br>
>> >> On 07.02.19 14:58, Roberto Carna wrote:<br>
>> >> >In our company we have several desktops from two different cities<br>
>> >> accessing<br>
>> >> >only to internal domains distributed in two views in a private BIND<br>
>> with<br>
>> >> >authoritative zones, where I've defined "recursion no;".<br>
>> >> ><br>
>> >> >But now we have to let them access to *.<a href="http://teamviewer.com" rel="noreferrer" target="_blank">teamviewer.com</a> hostnames, just<br>
>> >> this<br>
>> >> >public domain and not other.<br>
>> >><br>
>> >> btw, when did <a href="http://linux.org" rel="noreferrer" target="_blank">linux.org</a> change to <a href="http://teamviewer.com" rel="noreferrer" target="_blank">teamviewer.com</a>?<br>
>> >><br>
>> >> >So I've implemented the forwarding of "<a href="http://teamviewer.com" rel="noreferrer" target="_blank">teamviewer.com</a>" zone to our<br>
>> BIND<br>
>> >> >resolvers servers (they forward DNS queries to 8.8.8.8). So I've<br>
>> created a<br>
>> >> >third view with this information in named.conf.local:<br>
>> >> ><br>
>> >> >acl internet { <a href="http://10.0.0.0/24" rel="noreferrer" target="_blank">10.0.0.0/24</a> };<br>
>> >> ><br>
>> >> >view "internet" {<br>
>> >> ><br>
>> >> >   match-clients { internet; key "custom"; };<br>
>> >> ><br>
>> >> > recursion yes;<br>
>> >> ><br>
>> >> > zone "<a href="http://teamviewer.com" rel="noreferrer" target="_blank">teamviewer.com</a>" {<br>
>> >> ><br>
>> >> >        type forward;<br>
>> >> ><br>
>> >> >        forward only;<br>
>> >> ><br>
>> >> >        forwarders {<br>
>> >> ><br>
>> >> >                172.18.1.1;<br>
>> >> ><br>
>> >> >                172.18.1.2;<br>
>> >> ><br>
>> >> >        };<br>
>> >> ><br>
>> >> >};<br>
>> >><br>
>> >><br>
>> >> >I defined "recursion yes" but the BIND servers forwards all the public<br>
>> >> >domains queries to our resolvers and not just for "<a href="http://teamviewer.com" rel="noreferrer" target="_blank">teamviewer.com</a>",<br>
>> so it<br>
>> >> >doesn't work. And if I change for "recursion no", the query<br>
>> >> ><a href="http://www.teamviewer.com" rel="noreferrer" target="_blank">www.teamviewer.com</a> is refused and at the client side appears an error<br>
>> >> >telling that recursion is necessary.<br>
>> >><br>
>> >> of course, BIND will resolve other domains (recurse) only when you<br>
>> allow it<br>
>> >> to recurse.<br>
>> >><br>
>> >> >So I let desktops resolve all the Internet domains or neither, and<br>
>> this is<br>
>> >> >not what I want because I just want to let them resolve just<br>
>> >> <a href="http://teamviewer.com" rel="noreferrer" target="_blank">teamviewer.com</a>.<br>
>> >> ><br>
>> >> >How can I do to forward only <a href="http://teamviewer.com" rel="noreferrer" target="_blank">teamviewer.com</a> zone queries to my<br>
>> >> resolvers???<br>
>> >><br>
>><br>
>> --<br>
>> Matus UHLAR - fantomas, <a href="mailto:uhlar@fantomas.sk" target="_blank">uhlar@fantomas.sk</a> ; <a href="http://www.fantomas.sk/" rel="noreferrer" target="_blank">http://www.fantomas.sk/</a><br>
>> Warning: I wish NOT to receive e-mail advertising to this address.<br>
>> Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.<br>
>> Eagles may soar, but weasels don't get sucked into jet engines.<br>
>> _______________________________________________<br>
>> Please visit <a href="https://lists.isc.org/mailman/listinfo/bind-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a> to<br>
>> unsubscribe from this list<br>
>><br>
>> bind-users mailing list<br>
>> <a href="mailto:bind-users@lists.isc.org" target="_blank">bind-users@lists.isc.org</a><br>
>> <a href="https://lists.isc.org/mailman/listinfo/bind-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a><br>
>><br>
<br>
>_______________________________________________<br>
>Please visit <a href="https://lists.isc.org/mailman/listinfo/bind-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a> to unsubscribe from this list<br>
><br>
>bind-users mailing list<br>
><a href="mailto:bind-users@lists.isc.org" target="_blank">bind-users@lists.isc.org</a><br>
><a href="https://lists.isc.org/mailman/listinfo/bind-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a><br>
<br>
<br>
-- <br>
Matus UHLAR - fantomas, <a href="mailto:uhlar@fantomas.sk" target="_blank">uhlar@fantomas.sk</a> ; <a href="http://www.fantomas.sk/" rel="noreferrer" target="_blank">http://www.fantomas.sk/</a><br>
Warning: I wish NOT to receive e-mail advertising to this address.<br>
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.<br>
The early bird may get the worm, but the second mouse gets the cheese. <br>
_______________________________________________<br>
Please visit <a href="https://lists.isc.org/mailman/listinfo/bind-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a> to unsubscribe from this list<br>
<br>
bind-users mailing list<br>
<a href="mailto:bind-users@lists.isc.org" target="_blank">bind-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/bind-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a><br>
</blockquote></div>
_______________________________________________<br>
Please visit <a href="https://lists.isc.org/mailman/listinfo/bind-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a> to unsubscribe from this list<br>
<br>
bind-users mailing list<br>
<a href="mailto:bind-users@lists.isc.org" target="_blank">bind-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/bind-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a><br>
</blockquote></div>