Re: Permitting recursion can allow spammers to steal name server resources

From: Mark Johnston (
Date: 09/10/03

  • Next message: Tim Kennedy: "CacheFlow Proxy Abuse (revisited)"
    Date: Wed, 10 Sep 2003 13:21:54 -0500
    To: Chris Brenton <>

    Chris Brenton <> wrote:
    > Changing Bind so that it will not act recursively for all hosts on the
    > Internet is a relatively simple process. Edit the /etc/named.conf file
    > to add in the "allow-recursion" parameter similar to the following:
    > options {
    > directory "/var/named";
    > allow-recursion {localnets; };
    > };
    > All other subnets however will
    > be blocked from doing recursive queries. Users on the Internet will only
    > be permitted to look up information you are authoritative for (like your
    > Web server's IP address, your MX record, etc.).

    That's not entirely true. BIND (9, at least) is still vulnerable
    to cache poisoning by local users, after which it will serve up the
    cached answers to anyone that can query (not just recursion-authorized
    clients.) Try looking up a domain you aren't authoritative for from a
    recursion-authorized client, then from an unauthorized one. You'll get
    the cached answer with the unauthorized client. Of course, given an ISP
    or corporation, it's trivial to make one of their users look up your

    The rationale, as I understand it, is that returning a cached answer
    doesn't require recursion, so allow-recursion doesn't apply.

    The proper way to avoid this problem is to configure BIND to deny all
    queries except ones you specifically want to answer:

    options {
        allow-query { localnets; };
        allow-recursion { localnets; };

    zone "" { # An authoritative zone
        allow-query { any; };
        # other statements


  • Next message: Tim Kennedy: "CacheFlow Proxy Abuse (revisited)"