bind9(8)
BIND 9 is a DNS server and resolver that translates domain names to IP addresses on the Internet.
Synopsis
named [OPTION]... [-c config-file] [-d debug-level] [-f] [-g] [-n threads] [-p port] [-s] [-S threads] [-t directory] [-u user] [-v] [-x cache-file]Description
BIND 9 (Berkeley Internet Name Domain) is the reference implementation of DNS protocols. It provides authoritative DNS service, recursive resolution, and DNS query forwarding. The main daemon named reads configuration from a file (typically /etc/bind/named.conf) and serves DNS queries on port 53 (UDP and TCP).
BIND includes tools like dig for DNS queries, nslookup for name lookups, and nsupdate for dynamic DNS updates. It supports DNSSEC for cryptographic DNS validation, zone transfers, and view-based filtering for different DNS responses based on query source.
Modern BIND 9 versions require careful configuration and security hardening, including chroot jails, dropping privileges, and ACL restrictions to prevent DNS amplification attacks and unauthorized zone transfers.
Common options
| Flag | What it does |
|---|---|
-c config-file | Specify alternate configuration file (default: /etc/bind/named.conf) |
-d debug-level | Set debug logging level (0-99; higher = more verbose) |
-f | Run in foreground (don't detach to background) |
-g | Print configuration and exit without starting the server |
-n threads | Set number of worker threads (default: auto-detected) |
-p port | Listen on alternate port instead of default 53 |
-t directory | Chroot to directory for security isolation |
-u user | Drop privileges and run as specified user (e.g., 'bind') |
-v | Print version number and exit |
-x cache-file | Load cache from file on startup |
Examples
Start the BIND 9 DNS server using systemd (Ubuntu/Debian)
sudo systemctl start bind9Run BIND in foreground with debug level 3 for troubleshooting
sudo named -c /etc/bind/named.conf -f -d 3Query the local BIND server for example.com's A record
dig @localhost example.comValidate BIND configuration file syntax before applying
sudo named-checkconf /etc/bind/named.confReload BIND configuration and zones without restarting the daemon
sudo rndc reloadCheck the current status of the running BIND server
sudo rndc statusQuery BIND for MX records of example.com in short format
dig @localhost +short example.com MXEnable BIND 9 to start automatically on system boot
sudo systemctl enable bind9