named Daemon
Managing the named daemon. Service lifecycle, rndc control channel, file permissions, and log diagnostics.
Service Management
systemctl status named
sudo systemctl start named
sudo systemctl enable named
sudo systemctl restart named
Restarts clear the cache entirely. Prefer rndc reload for zone changes — it preserves the cache.
sudo rndc reload
Re-reads all zone files and named.conf without dropping existing cache entries. This is the standard way to apply changes.
Configuration File Layout
sudo named-checkconf /etc/named.conf
Always validate before reloading. A syntax error in named.conf prevents named from starting.
include "/etc/named/zones.conf";
include "/etc/named/acls.conf";
include "/etc/named/logging.conf";
Keeps the main named.conf clean. Each include file can be validated independently.
# VyOS stores BIND config at:
/etc/bind/named.conf # Debian-based path
/config/user-data/named/ # VyOS persistent custom configs
VyOS uses Debian’s BIND package. Custom zone files go in persistent storage so they survive image upgrades.
named Process
ps aux | awk '/[n]amed/{print $1}'
Named typically runs as the named or bind user. Zone files and log directories must be owned by this user.
ss -tlnp | awk '/:53 /'
Verify named listens on the expected IPs and port. If it shows 0.0.0.0:53, it’s listening on all interfaces — tighten with listen-on.
named -v
named -V
Shows compile-time options including DNSSEC support, libxml2 stats, and GeoIP.
rndc Configuration
sudo rndc-confgen -a
Generates /etc/rndc.key with a shared HMAC-MD5 key. Both named.conf and rndc.conf reference this key for authenticated control channel access.
sudo rndc status
Shows BIND version, uptime, number of zones, recursion status, and worker thread count.
sudo rndc stats
cat /var/named/data/named_stats.txt | tail -50
Dumps cumulative statistics to a file. Includes query counts by type, response codes, and cache hit rates.
sudo rndc trace 3
# ... reproduce the issue ...
sudo rndc notrace
Debug levels 1-3. Level 3 is extremely verbose. Always notrace after debugging — debug logging at high levels impacts performance.
File Permissions
ls -la /var/named/*.zone
Zone files should be owned by root:named with mode 640 (or named:named with 644). Slave zone files need write permission for the named user.
sudo chown named:named /var/named/slaves/
sudo chmod 770 /var/named/slaves/
Slaves write zone files received via AXFR. The directory must be writable by the named process.
Logging Diagnostics
sudo journalctl -u named --since "1 hour ago" --no-pager | tail -30
tail -50 /var/log/named/default.log
sudo journalctl -u named | awk '/zone.*error|refused|denied/'
Zone load errors appear at startup and after rndc reload. Common causes: syntax errors, missing files, permission denied.
See Also
-
BIND — named.conf configuration
-
Troubleshooting — systematic DNS debugging
-
systemd — service management fundamentals