Here's a minimalist entry for nsd.conf for low-end boxes. (Known to work on VPS with only 192MB RAM.)
Added instructions
~ Replace xx.xx.xx.xx with your server IP.
~ Change "secret" entry to unique random gibberish.
PHP Code:
# nsd.conf -- the NSD(8) configuration file, nsd.conf(5).
# Copyright (c) 2001-2006, NLnet Labs. All rights reserved.
# options for the nsd server
server:
ip-address: xx.xx.xx.xx
hide-version: yes
ip4-only: yes
# the database to use
database: "/etc/nsd3/nsd.db"
identity: "Name (NSD) Server "
# log messages to file. Default to stderr and syslog.
logfile: "/var/log/nsd.log"
# Number of NSD servers to fork.
server-count: 1
# Maximum number of concurrent TCP connections per server.
# This option should have a value below 1000.
tcp-count: 10
# Maximum number of queries served on a single TCP connection.
# By default 0, which means no maximum.
tcp-query-count: 20
# File to store pid for nsd in.
pidfile: "/var/run/nsd3/nsd.pid"
# chroot: "/etc/nsd3"
# After binding socket, drop user privileges.
# can be a username, id or id.gid.
username: nsd
# The directory for zonefile: files.
zonesdir: "/etc/nsd3"
# key for zone 1
key:
name: mskey
algorithm: hmac-md5
secret: "dfkwehdgkshetlrhorhzvbyzd"
# Sample zone 1 (forward)
zone:
name: "domainname.com"
zonefile: "domainname.com.forward"
outgoing-interface: xx.xx.xx.xx
Thanks to vpswing of WHT for his assistance.