Sub topic 4
BIND or Unbound: Which One for Which Job
Assume you can use a Linux shell, install packages with systemd, and distinguish IP addresses, ports, UDP, and TCP. This chapter focuses on choosing DNS software. Configuration details come in later chapters.
Start with the server role
A DNS server can perform different jobs:
- An authoritative server stores the official records for a zone, such as
example.com. - A recursive resolver finds answers for clients. It follows referrals from root servers, top-level domain servers, and authoritative servers.
- A forwarding resolver sends questions to another resolver instead of contacting the DNS hierarchy directly.
BIND can perform all three roles. Unbound is mainly a recursive, caching, and DNSSEC-validating resolver. Unbound can provide local records, but it is not usually the choice for serving a complete authoritative zone with transfers and multiple secondaries.
| Requirement | Better default | Reason |
|---|---|---|
| Authoritative zones and zone transfers | BIND | Supports primary and secondary servers, NOTIFY, AXFR, IXFR, and TSIG |
| Private caching resolver | Unbound | Small configuration and secure resolver defaults |
| One service for authoritative and recursive roles | BIND, with separation | BIND supports both, but combining roles increases risk |
| Forwarding to an organization’s DNS service | Unbound or BIND | Both support forwarding |
Choose BIND for authoritative DNS
Choose BIND when your server must publish records for a domain. BIND supports zone files containing SOA, NS, A, MX, and PTR records. It can notify secondary servers when a zone changes and authenticate transfers with TSIG.
BIND also supports views. Views can return different answers to internal and external clients, which is called split-horizon DNS. This flexibility increases configuration complexity. A mistake in an access control list or recursion setting can expose internal data or create an open resolver.
For a public authoritative server, disable recursion:
options {
recursion no;
};Keep authoritative service separate from recursive service when possible. Separate hosts or containers make access controls and troubleshooting clearer.
Choose Unbound for recursive DNS
Choose Unbound when clients need a local cache that resolves public names or forwards selected private domains. It supports DNSSEC validation, query-name minimisation, access controls, and useful cache behavior with relatively little configuration.
A typical design allows queries only from loopback and trusted LAN networks. It refuses requests from every other source. Unbound is a good fit for a workstation, a small office, or a dedicated internal resolver.
A practical decision
Use BIND for authoritative DNS and Unbound for recursive DNS when you can separate the roles. Use BIND alone when operational simplicity requires one package and your team can maintain its larger configuration. Choose based on the required role, not on which daemon has more features.
Exercise
You need a primary server for example.com, a secondary server, TSIG-authenticated transfers, and no recursion. Which software is the better default, and why?
Show answer
BIND is the better default because it provides authoritative zones, secondary transfers, TSIG authentication, and an explicit recursion no setting.