1

I'm coming from Windows.

As soon as DNS Server role is installed, Windows downloads list of "Root Servers", sends the query to one of them and caches the response for further use. There's no forwarder here.

I want same functionality with Bind: a public DNS server with no local domain and forwarder. Just query root servers and cache the response.

I'm googling for 2 days and have read 20+ tutorials to no avail.

4
  • 1
    There is nothing specific to do. Just enable recursion in bind and do not set up any zones in it, it will then be a recursive nameserver. You might also want to explore simpler alternatives, like unbound. Oct 17, 2022 at 14:15
  • But recursion needs forwarder, right? Oct 17, 2022 at 18:20
  • "But recursion needs forwarder, right? " Absolutely not. This is completely orthogonal. A recursive nameserver will do iterative queries to get the final answer. Forwarding queries is an edge case for very specific narrow cases, or if you want to share caches/have a hierarchy of caches. Oct 17, 2022 at 21:15
  • Please post your first comment as answer. Oct 18, 2022 at 13:45

1 Answer 1

3

There is nothing specific to do as "forwarding" is an extra specific feature not needed for normal operations. Just enable recursion in bind and do not set up any zones in it, it will then be a recursive nameserver. You might also want to explore simpler alternatives, like unbound.

A recursive nameserver will do iterative queries to get the final answer. Forwarding queries is an edge case for very specific needs, or if you want to share caches/have a hierarchy of caches.

See RFC 8499 on "DNS Terminology":

Recursive mode:  A resolution mode of a server that receives DNS
  queries and either responds to those queries from a local cache or
  sends queries to other servers in order to get the final answers
  to the original queries. 

Recursive resolver:  A resolver that acts in recursive mode.  In
  general, a recursive resolver is expected to cache the answers it
  receives (which would make it a full-service resolver), but some
  recursive resolvers might not cache.

[..]

Forwarding:  The process of one server sending a DNS query with the
  RD bit set to 1 to another server to resolve that query.
  Forwarding is a function of a DNS resolver; it is different than
  simply blindly relaying queries.

Forwarder:  Section 1 of [RFC2308] describes a forwarder as "a
  nameserver used to resolve queries instead of directly using the
  authoritative nameserver chain".  [RFC2308] further says "The
  forwarder typically either has better access to the internet, or
  maintains a bigger cache which may be shared amongst many
  resolvers."  That definition appears to suggest that forwarders
  normally only query authoritative servers.  In current use,
  however, forwarders often stand between stub resolvers and
  recursive servers.  [RFC2308] is silent on whether a forwarder is
  iterative-only or can be a full-service resolver.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .