All the options can be specified in the configfile ( -c argument), except for the -v and -h options. If
options are specified on the commandline, the options on the commandline take precedence over the options
in the configfile.
Normally NSD should be started with the `nsd-control(8) start` command invoked from a /etc/rc.d/nsd.sh
script or similar at the operating system startup.
-4 Only listen to IPv4 connections.
-6 Only listen to IPv6 connections.
-aip-address[@port]
Listen to the specified ip-address. The ip-address must be specified in numeric format (using the
standard IPv4 or IPv6 notation). Optionally, a port number can be given. This flag can be
specified multiple times to listen to multiple IP addresses. If this flag is not specified, NSD
listens to the wildcard interface.
-cconfigfile
Read specified configfile instead of the default /etc/nsd/nsd.conf. For format description see
nsd.conf(5).
-d Do not fork, stay in the foreground.
-h Print help information and exit.
-iidentity
Return the specified identity when asked for CHTXTID.SERVER (This option is used to determine
which server is answering the queries when they are anycast). The default is the name returned by
gethostname(3).
-Insid
Add the specified nsid to the EDNS section of the answer when queried with an NSID EDNS enabled
packet. As a sequence of hex characters or with ascii_ prefix and then an ascii string.
-llogfile
Log messages to the specified logfile. The default is to log to stderr and syslog. If a zonesdir:
is specified in the config file this path can be relative to that directory.
-Ncount
Start countNSD servers. The default is 1. Starting more than a single server is only useful on
machines with multiple CPUs and/or network adapters.
-nnumber
The maximum number of concurrent TCP connection that can be handled by each server. The default is
100.
-Ppidfile
Use the specified pidfile instead of the platform specific default, which is mostly
/run/nsd/nsd.pid. If a zonesdir: is specified in the config file, this path can be relative to
that directory.
-pport
Answer the queries on the specified port. Normally this is port 53.
-sseconds
Produce statistics dump every seconds seconds. This is equal to sending SIGUSR1 to the daemon
periodically.
-tchroot
Specifies a directory to chroot to upon startup. This option requires you to ensure that
appropriate syslogd(8) socket (e.g. chrootdir /dev/log) is available, otherwise NSD won't produce
any log output.
-uusername
Drop user and group privileges to those of username after binding the socket. The username must
be one of: username, id, or id.gid. For example: nsd, 80, or 80.80.
-Vlevel
This value specifies the verbosity level for (non-debug) logging. Default is 0.
-v Print the version number of NSD to standard error and exit.
NSD reacts to the following signals:
SIGTERM
Stop answering queries, shutdown, and exit normally.
SIGHUP
Reopen logfile (assists rotation) and optionally update TSIG keys and zones.
SIGUSR1
Dump BIND8-style statistics into the log. Ignored otherwise.