• How to disable recursion on ONE domain? (Bind-9.11.14)

    From Chris Palmer@chris9@cpalmer.me.uk to bind-users on Fri May 15 13:16:02 2020
    From Newsgroup: comp.protocols.dns.bind

    There is much discussion about recursion but I can't find anything that matches this use case...

    - In-house Bind-9.11.14 server, master for some local zones, recursion enabled; not accessible from external networks
    - Two views for in-house networks
    - Intermittent VPN access from in-house network to another private
    network that is master for DNS zone x.y.zzz; this network is not
    publicly reachable
    - Need queries from one of our views for x.y.zzz to be sent to the
    static address for the x.y.zzz server that is only reachable via the VPN
    - When the VPN is not connected, need the lookup on to fail/timeout
    rather than go through the recursion path
    - When the VPN is again connected need lookups to succeed without undue
    delay.

    Within the required view I have tried a zone with type forward
    (specifying forwarders and forward only), and also a zone of type
    static-stub (specifying server-addresses). Both work fine when the VPN
    is up. Both have two problems though when the VPN is disconnected:
          (a) the queries are recursed and an NXDOMAIN response cached.
          (b) When the VPN comes back up the cached NXDOMAIN is served
    until it expires.

    I have been trying to force a SERVFAIL when the specified servers for
    that domain are unreachable, rather than recursing. And presumably that
    would then cause the queries to quickly flow to the required servers
    once they are reachable again. Is that possible, or is there another
    approach to this problem?

    Many thanks, Chris
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From =?utf-8?B?T25kxZllaiBTdXLDvQ==?=@ondrej@isc.org to Chris Palmer on Fri May 15 14:34:51 2020
    From Newsgroup: comp.protocols.dns.bind


    --Apple-Mail=_9840EDFB-5BE6-4A4E-B7B8-6CC8825C9ED5
    Content-Transfer-Encoding: quoted-printable
    Content-Type: text/plain;
    charset=utf-8

    Hi Chris,

    when your vpn comes up, you need to issue:

    rndc flushtree <domain>

    command to the BIND 9 instance.

    Ondrej
    --
    Ond=C5=99ej Sur=C3=BD
    ondrej@isc.org

    On 15 May 2020, at 14:16, Chris Palmer via bind-users =
    <bind-users@lists.isc.org> wrote:
    =20
    There is much discussion about recursion but I can't find anything =
    that matches this use case...
    =20
    - In-house Bind-9.11.14 server, master for some local zones, recursion =
    enabled; not accessible from external networks
    - Two views for in-house networks
    - Intermittent VPN access from in-house network to another private =
    network that is master for DNS zone x.y.zzz; this network is not =
    publicly reachable
    - Need queries from one of our views for x.y.zzz to be sent to the =
    static address for the x.y.zzz server that is only reachable via the VPN
    - When the VPN is not connected, need the lookup on to fail/timeout =
    rather than go through the recursion path
    - When the VPN is again connected need lookups to succeed without =
    undue delay.
    =20
    Within the required view I have tried a zone with type forward =
    (specifying forwarders and forward only), and also a zone of type =
    static-stub (specifying server-addresses). Both work fine when the VPN =
    is up. Both have two problems though when the VPN is disconnected:
    (a) the queries are recursed and an NXDOMAIN response cached.
    (b) When the VPN comes back up the cached NXDOMAIN is served =
    until it expires.
    =20
    I have been trying to force a SERVFAIL when the specified servers for =
    that domain are unreachable, rather than recursing. And presumably that =
    would then cause the queries to quickly flow to the required servers =
    once they are reachable again. Is that possible, or is there another =
    approach to this problem?
    =20
    Many thanks, Chris
    _______________________________________________
    Please visit https://lists.isc.org/mailman/listinfo/bind-users to =
    unsubscribe from this list
    =20
    ISC funds the development of this software with paid support =
    subscriptions. Contact us at https://www.isc.org/contact/ for more = information.
    =20
    =20
    bind-users mailing list
    bind-users@lists.isc.org
    https://lists.isc.org/mailman/listinfo/bind-users


    --Apple-Mail=_9840EDFB-5BE6-4A4E-B7B8-6CC8825C9ED5
    Content-Transfer-Encoding: 7bit
    Content-Disposition: attachment;
    filename=signature.asc
    Content-Type: application/pgp-signature;
    name=signature.asc
    Content-Description: Message signed with OpenPGP

    -----BEGIN PGP SIGNATURE-----

    iQKTBAEBCgB9FiEEw2Gx4wKVQ+vGJel9g3Kkd++uWcIFAl6+jGtfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEMz NjFCMUUzMDI5NTQzRUJDNjI1RTk3RDgzNzJBNDc3RUZBRTU5QzIACgkQg3Kkd++u WcK+txAAjJ77pyoY3l4mZRseEx78q1pqqq8p+3EYhUYd4v9WGUa6WaXEWthXwnl+ Lgjjoo6cMmYjEN7UqG0WWIVzCrHTEqjopcd/A2GpZNJh2UDqWuycyfwHM3RJnrXq dyNcj0PUupjdbwi3PoJQoRhIq0NvYxKb5ELysvEQ0RnZEWtc9IILNhH7hqcQp1Uc AH+XPyBuCijpEqcAFwLyayO8VQLojlLQ2jhMYR7oXXROI7EizVkiIB8Pdx1CI88s WeZzg2/2KjoV7UOJx4GJJ+APQiMM3ATdrrXtKcXBbVeZ/ZYIue9u/4BXpJeqWxpy V5Yw3VCxSuOZQo8jRSgKYfNufwjj9TzCom0Odxu9X/rat4gF/8NuWh5plkrxbGFF XLdtlfBmhvYaSd+FhxuueCymgB+1Rkv962S8rsGtTRbwBbcjf3CovAwk3ql1Mr4v SgJYLW8Y32LzM5T/IZEIwRqNo23iOOXd4tXItYvBsHi1GQfvUDqS5NWRuJ0vYA14 RkXMMNqJeBlc+Ha/0NYiQXWv91lYQdS7c4bJHakDt0AoCpYDnHq3XZs5rwcmAm6k DJDMBDLtPjATuTZqURpE9bPclYvW1MT+c136+X2ImuDu+u0C+nkjLemu9ik3e+Iq j71p8Qdp/Eum+X0w3VFetno5AcSNVd20zXeI3fCwr+stJk9Uik4=
    =LSIj
    -----END PGP SIGNATURE-----

    --Apple-Mail=_9840EDFB-5BE6-4A4E-B7B8-6CC8825C9ED5--
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Chris Palmer@chris9@cpalmer.me.uk to bind-users on Fri May 15 13:40:48 2020
    From Newsgroup: comp.protocols.dns.bind

    Hi Ondřej

    That could work for eliminating the caching delay when the VPN comes up.
    I'd just have to get that into the VPN config so people didn't have to
    do it manually.

    Is there any way to stop the recursion for that domain happening in the
    first place though?

    Thanks, Chris


    On 15/05/2020 13:34, Ondřej Surý wrote:
    Hi Chris,

    when your vpn comes up, you need to issue:

    rndc flushtree <domain>

    command to the BIND 9 instance.

    Ondrej
    --
    Ondřej Surý
    ondrej@isc.org

    On 15 May 2020, at 14:16, Chris Palmer via bind-users <bind-users@lists.isc.org> wrote:

    There is much discussion about recursion but I can't find anything that matches this use case...

    - In-house Bind-9.11.14 server, master for some local zones, recursion enabled; not accessible from external networks
    - Two views for in-house networks
    - Intermittent VPN access from in-house network to another private network that is master for DNS zone x.y.zzz; this network is not publicly reachable
    - Need queries from one of our views for x.y.zzz to be sent to the static address for the x.y.zzz server that is only reachable via the VPN
    - When the VPN is not connected, need the lookup on to fail/timeout rather than go through the recursion path
    - When the VPN is again connected need lookups to succeed without undue delay.

    Within the required view I have tried a zone with type forward (specifying forwarders and forward only), and also a zone of type static-stub (specifying server-addresses). Both work fine when the VPN is up. Both have two problems though when the VPN is disconnected:
    (a) the queries are recursed and an NXDOMAIN response cached.
    (b) When the VPN comes back up the cached NXDOMAIN is served until it expires.

    I have been trying to force a SERVFAIL when the specified servers for that domain are unreachable, rather than recursing. And presumably that would then cause the queries to quickly flow to the required servers once they are reachable again. Is that possible, or is there another approach to this problem?

    Many thanks, Chris
    _______________________________________________
    Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

    ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.


    bind-users mailing list
    bind-users@lists.isc.org
    https://lists.isc.org/mailman/listinfo/bind-users

    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From =?utf-8?B?T25kxZllaiBTdXLDvQ==?=@ondrej@isc.org to Chris Palmer on Fri May 15 15:26:44 2020
    From Newsgroup: comp.protocols.dns.bind


    --Apple-Mail=_98090007-2D15-432C-BC74-22E2EF50C526
    Content-Transfer-Encoding: quoted-printable
    Content-Type: text/plain;
    charset=utf-8

    Hi Chris,

    why don=E2=80=99t you just delegate the x.y.zzz to the server in the =
    VPN?

    Generally, the static-stub should work in this case, but your email = doesn=E2=80=99t have
    enough details why it would not.

    I properly get SERVFAILs with this minimal config:

    zone "sury.org" {
    type static-stub;
    server-names {
    "192.168.1.1";
    };
    };

    and named -g reports:

    15-May-2020 15:25:00.015 network unreachable resolving =
    '192.168.1.1/A/IN': 2001:503:c27::2:30#53
    15-May-2020 15:25:00.015 network unreachable resolving =
    '192.168.1.1/AAAA/IN': 2001:503:c27::2:30#53

    Cheers,
    Ondrej
    --
    Ond=C5=99ej Sur=C3=BD
    ondrej@isc.org

    On 15 May 2020, at 14:40, Chris Palmer <chris9@cpalmer.me.uk> wrote:
    =20
    Hi Ond=C5=99ej
    =20
    That could work for eliminating the caching delay when the VPN comes =
    up. I'd just have to get that into the VPN config so people didn't have =
    to do it manually.
    =20
    Is there any way to stop the recursion for that domain happening in =
    the first place though?
    =20
    Thanks, Chris
    =20
    =20
    On 15/05/2020 13:34, Ond=C5=99ej Sur=C3=BD wrote:
    Hi Chris,
    when your vpn comes up, you need to issue:
    rndc flushtree <domain>
    command to the BIND 9 instance.
    Ondrej
    --
    Ond=C5=99ej Sur=C3=BD
    ondrej@isc.org
    On 15 May 2020, at 14:16, Chris Palmer via bind-users = <bind-users@lists.isc.org> wrote:
    =20
    There is much discussion about recursion but I can't find anything =
    that matches this use case...
    =20
    - In-house Bind-9.11.14 server, master for some local zones, =
    recursion enabled; not accessible from external networks
    - Two views for in-house networks
    - Intermittent VPN access from in-house network to another private = network that is master for DNS zone x.y.zzz; this network is not =
    publicly reachable
    - Need queries from one of our views for x.y.zzz to be sent to the =
    static address for the x.y.zzz server that is only reachable via the VPN
    - When the VPN is not connected, need the lookup on to fail/timeout = rather than go through the recursion path
    - When the VPN is again connected need lookups to succeed without =
    undue delay.
    =20
    Within the required view I have tried a zone with type forward = (specifying forwarders and forward only), and also a zone of type =
    static-stub (specifying server-addresses). Both work fine when the VPN =
    is up. Both have two problems though when the VPN is disconnected:
    (a) the queries are recursed and an NXDOMAIN response cached.
    (b) When the VPN comes back up the cached NXDOMAIN is served =
    until it expires.
    =20
    I have been trying to force a SERVFAIL when the specified servers =
    for that domain are unreachable, rather than recursing. And presumably =
    that would then cause the queries to quickly flow to the required =
    servers once they are reachable again. Is that possible, or is there =
    another approach to this problem?
    =20
    Many thanks, Chris
    _______________________________________________
    Please visit https://lists.isc.org/mailman/listinfo/bind-users to = unsubscribe from this list
    =20
    ISC funds the development of this software with paid support = subscriptions. Contact us at https://www.isc.org/contact/ for more = information.
    =20
    =20
    bind-users mailing list
    bind-users@lists.isc.org
    https://lists.isc.org/mailman/listinfo/bind-users


    --Apple-Mail=_98090007-2D15-432C-BC74-22E2EF50C526
    Content-Transfer-Encoding: 7bit
    Content-Disposition: attachment;
    filename=signature.asc
    Content-Type: application/pgp-signature;
    name=signature.asc
    Content-Description: Message signed with OpenPGP

    -----BEGIN PGP SIGNATURE-----

    iQKTBAEBCgB9FiEEw2Gx4wKVQ+vGJel9g3Kkd++uWcIFAl6+mJRfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEMz NjFCMUUzMDI5NTQzRUJDNjI1RTk3RDgzNzJBNDc3RUZBRTU5QzIACgkQg3Kkd++u WcLWPA//cj+hX+ROMHD6T4blVIR1eC3cQjrjLjQmxKkvSXTgeRyyHGdSCQDav1VN sSqCnYQfDHrV7EyiHJaCcUgjGa+ftIePzI3WatXDlVVYCTrqRdr/m2nguG7qsM9H sQGt6stf0agTuiap6sHq2HNLq3Sw9TDP0yJWKDBhgIWRdntxw+vEOHxmuTsBquFQ Dn+s1weFVCT8GEs+/UvuU/Yb1XwKRkKFfjJUW8PSsH7KhiJJbohAH9ilGx2QnJ3P NB2j9pldMwX0kr+PgecL1rrWLD6HR8VLq3wfB9GtaEedx9UDmPegORjDG1pvGjC9 dpKUxagnglA/00rWwbebqrgjQpvfnrcsoCkMH2NlxNUf0V5zk178jT6loTw8yyIl YtWNXhpEejErh635GUCusL77B2wNXTCbE4gWRCwXokU7ghATPLnAzqbObWdxh+am cjRo1LN0tEgg3ho8FMKGxmIn9OBSm6I+iyMhhM2wcS95zYbZsrcaoJ4XYNilhV4W Jf/LmaAYN0sbIJp7Qed6uU5Asm0gsV/XR1fKq4n6hfBszkTLofbhfA/OyWiQuvOf aJxNlmWL2+Ob/HwR6AEVCFvHx8f7BgqSugRGneevvbk7jXLdy5G+aPWLV4+yKzEt XSFHt+UDgFK3ZszUGLYxaG9uGxlpkrGDP0+dnW2kpApQkyjECDU=
    =brlg
    -----END PGP SIGNATURE-----

    --Apple-Mail=_98090007-2D15-432C-BC74-22E2EF50C526--
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Chris Palmer@chris9@cpalmer.me.uk to =?UTF-8?B?T25kxZllaiBTdXLDvQ==?= on Fri May 15 17:21:55 2020
    From Newsgroup: comp.protocols.dns.bind

    Hi Ondřej

    At first glance your suggestion looked like what I had done. But...
    I used:

    view "a" {
    match-clients { 172.16.n.n/24; }
    allow-recursion { any; };
    zone "x.y.zzz" {
    type static-stub;
    server-addresses {
    10.n.n.n;
    10.n.n.m;
    };
    };
    };

    If the 10.n.n.n addresses are not reachable, it still recurses and does
    a public query resulting in an NXDOMAIN. However, I don't know what I
    have done differently this time, but the NXDOMAIN is no longer being
    cached. Each attempt causes it to query upstream, and when I bring the
    VPN up it uses the 10.n.n.n server correctly. Which is acceptable,
    although I'm still unsure why it is recursing at all (or at least why I
    can't prevent it).

    Out of curiosity I then changed to what you suggested:

    view "a" {
    match-clients { 172.16.n.n/24; }
    allow-recursion { any; };
    zone "x.y.zzz" {
    type static-stub;
    server-names {
    "10.n.n.n";
    "10.n.n.m";
    };
    };
    };

    This ALWAYS gives a SERVFAIL though regardless of whether the 10.n.n.n addresses are reachable or not...

    So I have something that works, although it is sub-optimal when the VPN
    is down.

    Cheers, Chris

    On 15/05/2020 14:26, Ondřej Surý wrote:
    Hi Chris,

    why don’t you just delegate the x.y.zzz to the server in the VPN?

    Generally, the static-stub should work in this case, but your email doesn’t have
    enough details why it would not.

    I properly get SERVFAILs with this minimal config:

    zone "sury.org" {
    type static-stub;
    server-names {
    "192.168.1.1";
    };
    };

    and named -g reports:

    15-May-2020 15:25:00.015 network unreachable resolving '192.168.1.1/A/IN': 2001:503:c27::2:30#53
    15-May-2020 15:25:00.015 network unreachable resolving '192.168.1.1/AAAA/IN': 2001:503:c27::2:30#53

    Cheers,
    Ondrej
    --
    Ondřej Surý
    ondrej@isc.org

    On 15 May 2020, at 14:40, Chris Palmer <chris9@cpalmer.me.uk> wrote:

    Hi Ondřej

    That could work for eliminating the caching delay when the VPN comes up. I'd just have to get that into the VPN config so people didn't have to do it manually.

    Is there any way to stop the recursion for that domain happening in the first place though?

    Thanks, Chris


    On 15/05/2020 13:34, Ondřej Surý wrote:
    Hi Chris,
    when your vpn comes up, you need to issue:
    rndc flushtree <domain>
    command to the BIND 9 instance.
    Ondrej
    --
    Ondřej Surý
    ondrej@isc.org
    On 15 May 2020, at 14:16, Chris Palmer via bind-users <bind-users@lists.isc.org> wrote:

    There is much discussion about recursion but I can't find anything that matches this use case...

    - In-house Bind-9.11.14 server, master for some local zones, recursion enabled; not accessible from external networks
    - Two views for in-house networks
    - Intermittent VPN access from in-house network to another private network that is master for DNS zone x.y.zzz; this network is not publicly reachable
    - Need queries from one of our views for x.y.zzz to be sent to the static address for the x.y.zzz server that is only reachable via the VPN
    - When the VPN is not connected, need the lookup on to fail/timeout rather than go through the recursion path
    - When the VPN is again connected need lookups to succeed without undue delay.

    Within the required view I have tried a zone with type forward (specifying forwarders and forward only), and also a zone of type static-stub (specifying server-addresses). Both work fine when the VPN is up. Both have two problems though when the VPN is disconnected:
    (a) the queries are recursed and an NXDOMAIN response cached.
    (b) When the VPN comes back up the cached NXDOMAIN is served until it expires.

    I have been trying to force a SERVFAIL when the specified servers for that domain are unreachable, rather than recursing. And presumably that would then cause the queries to quickly flow to the required servers once they are reachable again. Is that possible, or is there another approach to this problem?

    Many thanks, Chris
    _______________________________________________
    Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

    ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.


    bind-users mailing list
    bind-users@lists.isc.org
    https://lists.isc.org/mailman/listinfo/bind-users

    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Bob Harold@rharolde@umich.edu to Chris Palmer on Fri May 15 13:11:53 2020
    From Newsgroup: comp.protocols.dns.bind

    --000000000000925fb005a5b2e98b
    Content-Type: text/plain; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    On Fri, May 15, 2020 at 12:22 PM Chris Palmer via bind-users < bind-users@lists.isc.org> wrote:

    Hi Ond=C5=99ej

    At first glance your suggestion looked like what I had done. But...
    I used:

    view "a" {
    match-clients { 172.16.n.n/24; }
    allow-recursion { any; };
    zone "x.y.zzz" {
    type static-stub;
    server-addresses {
    10.n.n.n;
    10.n.n.m;
    };
    };
    };

    If the 10.n.n.n addresses are not reachable, it still recurses and does
    a public query resulting in an NXDOMAIN. However, I don't know what I
    have done differently this time, but the NXDOMAIN is no longer being
    cached. Each attempt causes it to query upstream, and when I bring the
    VPN up it uses the 10.n.n.n server correctly. Which is acceptable,
    although I'm still unsure why it is recursing at all (or at least why I
    can't prevent it).

    Out of curiosity I then changed to what you suggested:

    view "a" {
    match-clients { 172.16.n.n/24; }
    allow-recursion { any; };
    zone "x.y.zzz" {
    type static-stub;
    server-names {
    "10.n.n.n";
    "10.n.n.m";
    };
    };
    };

    This ALWAYS gives a SERVFAIL though regardless of whether the 10.n.n.n addresses are reachable or not...


    "server-names" must be given a list of NAMES, not addresses. "10.n.n.n" is probably not the right name, looks more like an address.

    --=20
    Bob Harold



    So I have something that works, although it is sub-optimal when the VPN
    is down.

    Cheers, Chris

    On 15/05/2020 14:26, Ond=C5=99ej Sur=C3=BD wrote:
    Hi Chris,

    why don=E2=80=99t you just delegate the x.y.zzz to the server in the VP=
    N?

    Generally, the static-stub should work in this case, but your email
    doesn=E2=80=99t have
    enough details why it would not.

    I properly get SERVFAILs with this minimal config:

    zone "sury.org" {
    type static-stub;
    server-names {
    "192.168.1.1";
    };
    };

    and named -g reports:

    15-May-2020 15:25:00.015 network unreachable resolving '192.168.1.1/A/I=
    N':
    2001:503:c27::2:30#53
    15-May-2020 15:25:00.015 network unreachable resolving '
    192.168.1.1/AAAA/IN': 2001:503:c27::2:30#53

    Cheers,
    Ondrej
    --
    Ond=C5=99ej Sur=C3=BD
    ondrej@isc.org

    On 15 May 2020, at 14:40, Chris Palmer <chris9@cpalmer.me.uk> wrote:

    Hi Ond=C5=99ej

    That could work for eliminating the caching delay when the VPN comes
    up. I'd just have to get that into the VPN config so people didn't have t=
    o
    do it manually.

    Is there any way to stop the recursion for that domain happening in th=
    e
    first place though?

    Thanks, Chris


    On 15/05/2020 13:34, Ond=C5=99ej Sur=C3=BD wrote:
    Hi Chris,
    when your vpn comes up, you need to issue:
    rndc flushtree <domain>
    command to the BIND 9 instance.
    Ondrej
    --
    Ond=C5=99ej Sur=C3=BD
    ondrej@isc.org
    On 15 May 2020, at 14:16, Chris Palmer via bind-users < bind-users@lists.isc.org> wrote:

    There is much discussion about recursion but I can't find anything
    that matches this use case...

    - In-house Bind-9.11.14 server, master for some local zones,
    recursion enabled; not accessible from external networks
    - Two views for in-house networks
    - Intermittent VPN access from in-house network to another private network that is master for DNS zone x.y.zzz; this network is not publicly reachable
    - Need queries from one of our views for x.y.zzz to be sent to the static address for the x.y.zzz server that is only reachable via the VPN
    - When the VPN is not connected, need the lookup on to fail/timeout rather than go through the recursion path
    - When the VPN is again connected need lookups to succeed without
    undue delay.

    Within the required view I have tried a zone with type forward (specifying forwarders and forward only), and also a zone of type
    static-stub (specifying server-addresses). Both work fine when the VPN is
    up. Both have two problems though when the VPN is disconnected:
    (a) the queries are recursed and an NXDOMAIN response cached. >>>> (b) When the VPN comes back up the cached NXDOMAIN is served until it expires.

    I have been trying to force a SERVFAIL when the specified servers fo=
    r
    that domain are unreachable, rather than recursing. And presumably that
    would then cause the queries to quickly flow to the required servers once they are reachable again. Is that possible, or is there another approach =
    to
    this problem?

    Many thanks, Chris



    --000000000000925fb005a5b2e98b
    Content-Type: text/html; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    <div dir=3D"ltr"><div dir=3D"ltr"><br></div><div class=3D"gmail_quote"><div=
    dir=3D"ltr" class=3D"gmail_attr">On Fri, May 15, 2020 at 12:22 PM Chris Pa= lmer via bind-users &lt;<a href=3D"mailto:bind-users@lists.isc.org">bind-us= ers@lists.isc.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote"=
    style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p= adding-left:1ex">Hi Ond=C5=99ej<br>

    At first glance your suggestion looked like what I had done. But...<br>
    I used:<br>

    view &quot;a&quot; {<br>
    =C2=A0 =C2=A0match-clients { 172.16.n.n/24; }<br>
    =C2=A0 =C2=A0allow-recursion { any; };<br>
    =C2=A0 =C2=A0zone &quot;x.y.zzz&quot; {<br>
    =C2=A0 =C2=A0 =C2=A0type static-stub;<br>
    =C2=A0 =C2=A0 =C2=A0server-addresses {<br>
    =C2=A0 =C2=A0 =C2=A0 =C2=A010.n.n.n;<br>
    =C2=A0 =C2=A0 =C2=A0 =C2=A010.n.n.m;<br>
    =C2=A0 =C2=A0 =C2=A0};<br>
    =C2=A0 =C2=A0};<br>
    };<br>

    If the 10.n.n.n addresses are not reachable, it still recurses and does <br=

    a public query resulting in an NXDOMAIN. However, I don&#39;t know what I <=

    have done differently this time, but the NXDOMAIN is no longer being <br> cached. Each attempt causes it to query upstream, and when I bring the <br>
    VPN up it uses the 10.n.n.n server correctly. Which is acceptable, <br> although I&#39;m still unsure why it is recursing at all (or at least why I=

    can&#39;t prevent it).<br>

    Out of curiosity I then changed to what you suggested:<br>

    view &quot;a&quot; {<br>
    =C2=A0 =C2=A0match-clients { 172.16.n.n/24; }<br>
    =C2=A0 =C2=A0allow-recursion { any; };<br>
    =C2=A0 =C2=A0zone &quot;x.y.zzz&quot; {<br>
    =C2=A0 =C2=A0 =C2=A0type static-stub;<br>
    =C2=A0 =C2=A0 =C2=A0server-names {<br>
    =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;10.n.n.n&quot;;<br>
    =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;10.n.n.m&quot;;<br>
    =C2=A0 =C2=A0 =C2=A0};<br>
    =C2=A0 =C2=A0};<br>
    };<br>

    This ALWAYS gives a SERVFAIL though regardless of whether the 10.n.n.n <br> addresses are reachable or not...<br></blockquote><div><br></div><div>&quot= ;server-names&quot; must be given a list of NAMES, not addresses.=C2=A0 &qu= ot;10.n.n.n&quot; is probably not the right name, looks more like an addres= s.</div><div><br></div><div>--=C2=A0</div><div>Bob Harold</div><div>=C2=A0<= /div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bo= rder-left:1px solid rgb(204,204,204);padding-left:1ex">

    So I have something that works, although it is sub-optimal when the VPN <br=

    is down.<br>

    Cheers, Chris<br>

    On 15/05/2020 14:26, Ond=C5=99ej Sur=C3=BD wrote:<br>
    &gt; Hi Chris,<br>
    &gt; <br>
    &gt; why don=E2=80=99t you just delegate the x.y.zzz to the server in the V= PN?<br>
    &gt; <br>
    &gt; Generally, the static-stub should work in this case, but your email do= esn=E2=80=99t have<br>
    &gt; enough details why it would not.<br>
    &gt; <br>
    &gt; I properly get SERVFAILs with this minimal config:<br>
    &gt; <br>
    &gt; zone &quot;<a href=3D"http://sury.org" rel=3D"noreferrer" target=3D"_b= lank">sury.org</a>&quot; {<br>
    &gt;=C2=A0 =C2=A0 type static-stub;<br>
    &gt;=C2=A0 =C2=A0 server-names {<br>
    &gt;=C2=A0 =C2=A0 =C2=A0 &quot;192.168.1.1&quot;;<br>
    &gt;=C2=A0 =C2=A0 };<br>
    &gt; };<br>
    &gt; <br>
    &gt; and named -g reports:<br>
    &gt; <br>
    &gt; 15-May-2020 15:25:00.015 network unreachable resolving &#39;<a href=3D= "http://192.168.1.1/A/IN" rel=3D"noreferrer" target=3D"_blank">192.168.1.1/= A/IN</a>&#39;: 2001:503:c27::2:30#53<br>
    &gt; 15-May-2020 15:25:00.015 network unreachable resolving &#39;<a href=3D= "http://192.168.1.1/AAAA/IN" rel=3D"noreferrer" target=3D"_blank">192.168.1= .1/AAAA/IN</a>&#39;: 2001:503:c27::2:30#53<br>
    &gt; <br>
    &gt; Cheers,<br>
    &gt; Ondrej<br>
    &gt; --<br>
    &gt; Ond=C5=99ej Sur=C3=BD<br>
    &gt; <a href=3D"mailto:ondrej@isc.org" target=3D"_blank">ondrej@isc.org</a>=

    &gt; <br>
    &gt;&gt; On 15 May 2020, at 14:40, Chris Palmer &lt;<a href=3D"mailto:chris= 9@cpalmer.me.uk" target=3D"_blank">chris9@cpalmer.me.uk</a>&gt; wrote:<br> &gt;&gt;<br>
    &gt;&gt; Hi Ond=C5=99ej<br>
    &gt;&gt;<br>
    &gt;&gt; That could work for eliminating the caching delay when the VPN com=
    es up. I&#39;d just have to get that into the VPN config so people didn&#39=
    ;t have to do it manually.<br>
    &gt;&gt;<br>
    &gt;&gt; Is there any way to stop the recursion for that domain happening i=
    n the first place though?<br>
    &gt;&gt;<br>
    &gt;&gt; Thanks, Chris<br>
    &gt;&gt;<br>
    &gt;&gt;<br>
    &gt;&gt; On 15/05/2020 13:34, Ond=C5=99ej Sur=C3=BD wrote:<br>
    &gt;&gt;&gt; Hi Chris,<br>
    &gt;&gt;&gt; when your vpn comes up, you need to issue:<br>
    &gt;&gt;&gt; rndc flushtree &lt;domain&gt;<br>
    &gt;&gt;&gt; command to the BIND 9 instance.<br>
    &gt;&gt;&gt; Ondrej<br>
    &gt;&gt;&gt; --<br>
    &gt;&gt;&gt; Ond=C5=99ej Sur=C3=BD<br>
    &gt;&gt;&gt; <a href=3D"mailto:ondrej@isc.org" target=3D"_blank">ondrej@isc= .org</a><br>
    &gt;&gt;&gt;&gt; On 15 May 2020, at 14:16, Chris Palmer via bind-users &lt;=
    <a href=3D"mailto:bind-users@lists.isc.org" target=3D"_blank">bind-users@li= sts.isc.org</a>&gt; wrote:<br>
    &gt;&gt;&gt;&gt;<br>
    &gt;&gt;&gt;&gt; There is much discussion about recursion but I can&#39;t f= ind anything that matches this use case...<br>
    &gt;&gt;&gt;&gt;<br>
    &gt;&gt;&gt;&gt; - In-house Bind-9.11.14 server, master for some local zone=
    s, recursion enabled; not accessible from external networks<br> &gt;&gt;&gt;&gt; - Two views for in-house networks<br>
    &gt;&gt;&gt;&gt; - Intermittent VPN access from in-house network to another=
    private network that is master for DNS zone x.y.zzz; this network is not p= ublicly reachable<br>
    &gt;&gt;&gt;&gt; - Need queries from one of our views for x.y.zzz to be sen=
    t to the static address for the x.y.zzz server that is only reachable via t=
    he VPN<br>
    &gt;&gt;&gt;&gt; - When the VPN is not connected, need the lookup on to fai= l/timeout rather than go through the recursion path<br>
    &gt;&gt;&gt;&gt; - When the VPN is again connected need lookups to succeed = without undue delay.<br>
    &gt;&gt;&gt;&gt;<br>
    &gt;&gt;&gt;&gt; Within the required view I have tried a zone with type for= ward (specifying forwarders and forward only), and also a zone of type stat= ic-stub (specifying server-addresses). Both work fine when the VPN is up. B= oth have two problems though when the VPN is disconnected:<br> &gt;&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 (a) the queries are recursed an=
    d an NXDOMAIN response cached.<br>
    &gt;&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 (b) When the VPN comes back up = the cached NXDOMAIN is served until it expires.<br>
    &gt;&gt;&gt;&gt;<br>
    &gt;&gt;&gt;&gt; I have been trying to force a SERVFAIL when the specified = servers for that domain are unreachable, rather than recursing. And presuma= bly that would then cause the queries to quickly flow to the required serve=
    rs once they are reachable again. Is that possible, or is there another app= roach to this problem?<br>
    &gt;&gt;&gt;&gt;<br>
    &gt;&gt;&gt;&gt; Many thanks, Chris<br><br>
    </blockquote></div></div>

    --000000000000925fb005a5b2e98b--
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From Bob McDonald@bmcdonaldjr@gmail.com to bind-users on Fri May 15 13:41:02 2020
    From Newsgroup: comp.protocols.dns.bind

    --000000000000ccb68d05a5b3519c
    Content-Type: text/plain; charset="UTF-8"

    Would adding the following to the zone config work?

    forwarders {};

    Regards,

    Bob

    --000000000000ccb68d05a5b3519c
    Content-Type: text/html; charset="UTF-8"

    <div dir="ltr">Would adding the following to the zone config work?<div><br></div><div>forwarders {};</div><div><br></div><div>Regards,</div><div><br></div><div>Bob</div></div>

    --000000000000ccb68d05a5b3519c--
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From =?utf-8?Q?Ond=C5=99ej_Sur=C3=BD?=@ondrej@isc.org to Chris Palmer on Fri May 15 20:00:48 2020
    From Newsgroup: comp.protocols.dns.bind

    Sorry, my bad. (Actually it doesn’t matter because it serves well as example that static-stub configuration fails when the servers are unreachable and it doesn’t recurse.)
    But even with server-addresses it properly servfails when the static-stub addresses are unreachable.
    Perhaps it behaves differently when there’s already cached content?
    I suggest you run test BIND instance with -d 99 to see what’s happening. Ondřej
    --
    Ondřej Surý — ISC
    On 15 May 2020, at 18:22, Chris Palmer <chris9@cpalmer.me.uk> wrote:

    Hi Ondřej

    At first glance your suggestion looked like what I had done. But...
    I used:

    view "a" {
    match-clients { 172.16.n.n/24; }
    allow-recursion { any; };
    zone "x.y.zzz" {
    type static-stub;
    server-addresses {
    10.n.n.n;
    10.n.n.m;
    };
    };
    };

    If the 10.n.n.n addresses are not reachable, it still recurses and does a public query resulting in an NXDOMAIN. However, I don't know what I have done differently this time, but the NXDOMAIN is no longer being cached. Each attempt causes it to query upstream, and when I bring the VPN up it uses the 10.n.n.n server correctly. Which is acceptable, although I'm still unsure why it is recursing at all (or at least why I can't prevent it).

    Out of curiosity I then changed to what you suggested:

    view "a" {
    match-clients { 172.16.n.n/24; }
    allow-recursion { any; };
    zone "x.y.zzz" {
    type static-stub;
    server-names {
    "10.n.n.n";
    "10.n.n.m";
    };
    };
    };

    This ALWAYS gives a SERVFAIL though regardless of whether the 10.n.n.n addresses are reachable or not...

    So I have something that works, although it is sub-optimal when the VPN is down.

    Cheers, Chris

    On 15/05/2020 14:26, Ondřej Surý wrote:
    Hi Chris,
    why don’t you just delegate the x.y.zzz to the server in the VPN?>> Generally, the static-stub should work in this case, but your email doesn’t have
    enough details why it would not.
    I properly get SERVFAILs with this minimal config:
    zone "sury.org" {
    type static-stub;
    server-names {
    "192.168.1.1";
    };
    };
    and named -g reports:
    15-May-2020 15:25:00.015 network unreachable resolving '192.168.1.1/A/IN': 2001:503:c27::2:30#53
    15-May-2020 15:25:00.015 network unreachable resolving '192.168.1.1/AAAA/IN': 2001:503:c27::2:30#53
    Cheers,
    Ondrej
    --
    Ondřej Surý
    ondrej@isc.org
    On 15 May 2020, at 14:40, Chris Palmer <chris9@cpalmer.me.uk> wrote:

    Hi Ondřej

    That could work for eliminating the caching delay when the VPN comes up. I'd just have to get that into the VPN config so people didn't have to do it manually.

    Is there any way to stop the recursion for that domain happening in the first place though?

    Thanks, Chris


    On 15/05/2020 13:34, Ondřej Surý wrote:
    Hi Chris,
    when your vpn comes up, you need to issue:
    rndc flushtree <domain>
    command to the BIND 9 instance.
    Ondrej
    --
    Ondřej Surý
    ondrej@isc.org
    On 15 May 2020, at 14:16, Chris Palmer via bind-users <bind-users@lists.isc.org> wrote:

    There is much discussion about recursion but I can't find anything that matches this use case...

    - In-house Bind-9.11.14 server, master for some local zones, recursion enabled; not accessible from external networks
    - Two views for in-house networks
    - Intermittent VPN access from in-house network to another private network that is master for DNS zone x.y.zzz; this network is not publicly reachable
    - Need queries from one of our views for x.y.zzz to be sent to the static address for the x.y.zzz server that is only reachable via the VPN
    - When the VPN is not connected, need the lookup on to fail/timeout rather than go through the recursion path
    - When the VPN is again connected need lookups to succeed without undue delay.

    Within the required view I have tried a zone with type forward (specifying forwarders and forward only), and also a zone of type static-stub (specifying server-addresses). Both work fine when the VPN is up. Both have two problems though when the VPN is disconnected:
    (a) the queries are recursed and an NXDOMAIN response cached.
    (b) When the VPN comes back up the cached NXDOMAIN is served until it expires.

    I have been trying to force a SERVFAIL when the specified servers for that domain are unreachable, rather than recursing. And presumably that would then cause the queries to quickly flow to the required servers once they are reachable again. Is that possible, or is there another approach to this problem?

    Many thanks, Chris
    _______________________________________________
    Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

    ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.


    bind-users mailing list
    bind-users@lists.isc.org
    https://lists.isc.org/mailman/listinfo/bind-users
    --- Synchronet 3.18a-Linux NewsLink 1.113