<div><br></div><div><br></div><div class="protonmail_signature_block "><div class="protonmail_signature_block-user "><br></div><div class="protonmail_signature_block-proton protonmail_signature_block-empty"><br></div></div><div><br></div><blockquote class="protonmail_quote" type="cite"><div>-------- Original Message --------<br></div><div>Subject: Re: rndc addzone type forward<br></div><div>Local Time: November 16, 2016 5:50 PM<br></div><div>UTC Time: November 16, 2016 3:50 PM<br></div><div>From: e@foowatch.com<br></div><div>To: bind-users@lists.isc.org <bind-users@lists.isc.org><br></div><div><br></div><div><br></div><div><br></div><div class="protonmail_signature_block "><div class="protonmail_signature_block-user "><br></div><div class="protonmail_signature_block-proton protonmail_signature_block-empty"><br></div></div><div><br></div><blockquote type="cite" class="protonmail_quote"><div>-------- Original Message --------<br></div><div>Subject: Re: rndc addzone type forward<br></div><div>Local Time: November 16, 2016 5:12 PM<br></div><div>UTC Time: November 16, 2016 3:12 PM<br></div><div>From: dot@dotat.at<br></div><div>To: Emil Natan <e@foowatch.com><br></div><div>bind-users@lists.isc.org <bind-users@lists.isc.org><br></div><div><br></div><div>Emil Natan <e@foowatch.com> wrote:<br></div><div>><br></div><div>> I'm trying to add zone of type "forward" with rndc addzone, but it fails with:<br></div><div>><br></div><div>> rndc addzone zone.org '{type forward; forward only; forwarders { 192.168.20.115; }; };'<br></div><div>> rndc: 'addzone' failed: not found<br></div><div><br></div><div>I think this happens if you are using a version before 9.11 (which has a<br></div><div>more verbose error) and you get the view name wrong. The view name can be<br></div><div>wrong if you have multiple views and you don't specify which one.<br></div><div><br></div><div>e.g. on a 9.10 server with views:<br></div><div><br></div><div>$ rndc addzone google '{ type forward; forward only; forwarders { 8.8.8.8; }; };'<br></div><div>rndc: 'addzone' failed: not found<br></div><div>$<br></div><div><br></div><div>And on a 9.11 server with views:<br></div><div><br></div><div>$ rndc addzone google '{ type forward; forward only; forwarders { 8.8.8.8; }; };'<br></div><div>rndc: 'addzone' failed: not found<br></div><div>no matching view found for '_default'<br></div><div>$<br></div><div><br></div><div>You can get a similar error if you specify an incorrect view:<br></div><div><br></div><div>$ rndc addzone google in error '{ type forward; forward only; forwarders { 8.8.8.8; }; };'<br></div><div>rndc: 'addzone' failed: not found<br></div><div>no matching view found for 'error'<br></div><div>$<br></div><div><br></div><div>Tony.<br></div><div>-- <br></div><div>f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/  -  I xn--zr8h punycode<br></div><div>Shannon: West 6 to gale 8, perhaps severe gale 9 later. Rough or very rough,<br></div><div>becoming mainly high. Thundery showers. Good, occasionally poor.<br></div></blockquote><div><br></div><div>Thank you for your response.<br></div><div>I'm not using and not specifying view, which is optional anyway. I also compiled BIND 9.11.0rc3, but nothing changed, no more verbosity, only the name of the .nzf file created changed from hash to plain text. <br></div><div>Another finding  is that the failure .nzf file is created, but it's empty and the next run of rndc addzone fails with "already exists".<br></div><div><br></div><div>root@debugtzc:/usr/local/stow# find /chroot/named -name "*.nzf"<br></div><div>root@debugtzc:/usr/local/stow# rndc addzone google '{ type forward; forward only; forwarders { 8.8.8.8; }; };'<br></div><div>rndc: 'addzone' failed: not found<br></div><div>root@debugtzc:/usr/local/stow# find /chroot/named -name "*.nzf"<br></div><div>/chroot/named/var/named/_default.nzf<br></div><div>root@debugtzc:/usr/local/stow# rndc addzone google '{ type forward; forward only; forwarders { 8.8.8.8; }; };'<br></div><div>rndc: 'addzone' failed: already exists<br></div><div>configure_zone failed: already exists<br></div><div>ls -l /chroot/named/var/named/_default.nzf -rw-r--r-- 1 named named 0 Nov 16 17:39 /chroot/named/var/named/_default.nzf<br></div><div><br></div><div>Emil<br></div></blockquote><div><br></div><div>Update: despite the errors, the forwarding takes effect, checked with tcpdump.<br></div><div>But now I can't remove the forwarding zone:<br></div><div>After:<br></div><div>root@debugtzc:/usr/local/stow# rndc addzone google.com '{ type forward; forward only; forwarders { 8.8.4.4; }; };<br></div><div>'rndc: 'addzone' failed: not found<br></div><div><br></div><div>Here forwarding works:<br></div><div>18:04:36.703150 IP debugtzc.isoc.org.il.55531 > 8.8.4.4.domain: 20892+% [1au] A? google.com. (51)<br></div><div><br></div><div>But then:<br></div><div>root@debugtzc:/usr/local/stow# rndc delzone google.com<br></div><div>rndc: 'delzone' failed: not found<br></div><div>no matching zone 'google.com' in any view<br></div><div><br></div><div>And the queries for google.com are still forwarded to 8.8.4.4.<br></div><div><br></div><div>Emil</div>