BIND, the venerable DNS server, is often the silent backbone of network name resolution. When it falters, the cascade of broken connectivity can be baffling.

Let’s say you’re getting SERVFAIL errors or, worse, complete timeouts when querying your BIND server. This isn’t just about BIND being "down"; it means a critical upstream DNS resolver or a critical domain’s authoritative name server has dropped the ball, and BIND, acting as your network’s detective, can’t get a clear answer. The interesting part is why that upstream resolver or authoritative server is failing BIND, and BIND’s own configuration can be the culprit.

Common Causes for BIND Resolution Failures

  1. Incorrect Forwarder Configuration: Your BIND server is configured to forward queries to other DNS servers (e.g., your ISP’s or public resolvers like 8.8.8.8). If these forwarders are unreachable or misconfigured, BIND can’t resolve external domains.

    • Diagnosis: Check your named.conf file for the forwarders directive. Then, try querying a known good external IP directly from your BIND server using dig @<forwarder_ip> www.google.com. If that fails, the forwarder is the issue.
    • Fix: Ensure the IP addresses in the forwarders statement are correct and reachable. For example, if you intended to use Google’s DNS:
      options {
          directory "/var/cache/bind";
          forwarders {
              8.8.8.8;
              8.8.4.4;
          };
          // ... other options
      };
      
      Restart BIND with sudo systemctl restart named (or bind9 depending on your distribution). This works because BIND will now attempt to use the corrected, reachable servers for resolution.
    • Why it works: BIND is explicitly told where to send queries it can’t answer authoritatively. If those destinations are wrong, it’s like giving a mail carrier the wrong sorting facility.
  2. Firewall Blocking DNS Traffic: Your firewall might be preventing BIND from sending outbound DNS queries (UDP/TCP port 53) to forwarders or authoritative servers, or preventing inbound responses.

    • Diagnosis: From the BIND server, try telnet <forwarder_ip> 53 and nc -u -w 3 <forwarder_ip> 53. If these connections time out, the firewall is likely blocking traffic.
    • Fix: Add rules to your firewall (e.g., iptables or firewalld) to allow outbound UDP and TCP traffic on port 53 to your forwarders or to the internet. For firewalld:
      sudo firewall-cmd --add-service=dns --permanent
      sudo firewall-cmd --reload
      
      This works by explicitly permitting the necessary network packets to traverse the firewall.
    • Why it works: DNS relies on network packets. If they’re blocked, the conversation cannot happen.
  3. BIND Service Not Running or Crashing: The BIND daemon (named or bind9) might not be running, or it could be crashing due to configuration errors or resource issues.

    • Diagnosis: Check the service status: sudo systemctl status named. Look for "active (running)" or "inactive (dead)" and any error messages in the output. Also, check BIND’s logs, typically located in /var/log/messages, /var/log/syslog, or a dedicated BIND log file specified in named.conf.
    • Fix: If it’s not running, start it: sudo systemctl start named. If it’s crashing, examine the logs for specific errors (e.g., syntax errors in named.conf, zone file issues, out-of-memory errors). Correct the identified error and restart BIND. For a syntax error in named.conf, you’d fix the line and then run sudo named-checkconf to verify.
    • Why it works: The DNS resolution process cannot occur if the server process responsible for it is not active or is repeatedly failing.
  4. Incorrect Zone File Syntax or Permissions: If BIND is authoritative for local zones, errors in the zone files themselves, or incorrect file permissions preventing BIND from reading them, will cause resolution failures for those zones.

    • Diagnosis: Use named-checkzone <zone_name> <zone_file_path> to check syntax. For example: sudo named-checkzone example.com /var/named/zones/db.example.com. Also, check ownership and permissions: ls -l /var/named/zones/db.example.com. The user BIND runs as (often named or bind) needs read access.
    • Fix: Correct any syntax errors reported by named-checkzone. Ensure the zone file is owned by the BIND user and group and is readable: sudo chown named:named /var/named/zones/db.example.com and sudo chmod 644 /var/named/zones/db.example.com. Reload BIND configuration: sudo systemctl reload named.
    • Why it works: BIND needs to parse zone files accurately to provide DNS records. Incorrect syntax or lack of read access prevents this parsing.
  5. Recursive Query Protection / Access Control Lists (ACLs): BIND can be configured to restrict which clients are allowed to make recursive queries. If your client’s IP address is not in the allowed list, BIND will refuse the query, leading to timeouts or errors.

    • Diagnosis: Check your named.conf for allow-recursion or acl statements within the options block. Verify if the IP address of the client experiencing issues is included in any defined ACL that is then used by allow-recursion.
    • Fix: Add the client’s subnet or IP address to the appropriate ACL or directly to the allow-recursion statement. For example, to allow your local subnet 192.168.1.0/24:
      acl "trusted" { 127.0.0.1/32; 192.168.1.0/24; };
      options {
          directory "/var/cache/bind";
          allow-recursion { trusted; };
          // ...
      };
      
      Reload BIND: sudo systemctl reload named.
    • Why it works: This configuration acts as a gatekeeper, ensuring that only authorized clients can leverage your BIND server to query other DNS servers.
  6. DNSSEC Validation Failures: If BIND is configured to perform DNSSEC validation and an upstream server provides invalid or broken DNSSEC records, BIND will refuse to return a response to prevent potential security compromises.

    • Diagnosis: Check BIND logs for messages related to DNSSEC validation failures, such as "validating DS record failed" or "DNSSEC validation failed". You can also try disabling DNSSEC validation temporarily to see if resolution resumes: comment out dnssec-enable yes; and dnssec-validation auto; in your options block.
    • Fix: This is often an upstream problem. However, if you control the authoritative side, ensure your DNSSEC records are correctly generated and signed. If it’s an upstream issue and you cannot wait for it to be fixed, you might temporarily disable DNSSEC validation in your BIND server’s options block by changing dnssec-enable yes; to dnssec-enable no; and reloading BIND.
    • Why it works: DNSSEC provides cryptographic proof of DNS record authenticity. If this proof is flawed, BIND correctly refuses to trust the data, preventing a spoofing attack but also breaking resolution for that domain.

After addressing these, the next error you’re likely to encounter is a REFUSED error, indicating that while BIND is reachable and functioning, it’s intentionally not answering a query, often due to policy (like an ACL) or a malformed query.

Want structured learning?

Take the full Bind course →