NSDis a complete implementation of an authoritative DNS nameserver. Upon
startup
NSD
will read the database specified with -f
database
argument and put itself into background and answers queries on port 53
or a different port specified with -p
port
option.
The
database
must be generated beforehand with
()
(8).
By default NSD will bind to all local interfaces available. Use the -a
ip-address
option to specify a single particular interface address to be
bound. If this option is given more than once,
NSD
will bind its UDP and TCP sockets to all the specified ip-addresses
separately. If IPv6 is enabled when NSD is compiled an IPv6 address
can also be specified.
Normally
NSD
should be started with
nsdc()
start
command invoked from a
script or similar at the operating system startup.
The available options are:
-
4
Only listen to IPv4 connections.
-
6
Only listen to IPv6 connections.
-
a ip-address
Listen to the specified
ip-address .
The
ip-address
must be specified in numeric format (using the standard IPv4 or IPv6
notation). This flag can be specified multiple times to listen to
multiple IP addresses. If this flag is not specified NSD listens to
all IP addresses.
-
d
Turn on debugging mode, do not fork, stay in the foreground.
-
f database
Use the specified
database
instead of the default of
-
h
Print help information and exit.
-
i identity
Return the specified
identity
when asked for
(This option is used to determine which server is answering the queries
when they are multicast)
The default is the name returned by
gethostname(
3)
.
-
l logfile
Log messages to the specified
logfile .
The default is to log to stderr and syslog.
-
N count
Start
count
NSD servers. Starting more than a single server is only useful on
machines with multiple CPUs and/or network adapters. The default is 1.
-
n number
The maximum
number
of concurrent TCP connection that can be handled by each server. The
default is 10.
-
P pidfile
Use the specified
pidfile
instead of the platform specific default, which is mostly
-
p port
Answer the queries on the specified
port .
Normally this is port 53.
-
s seconds
Produce statistics dump every
seconds
seconds.
This is equal to sending
to the daemon periodically.
-
t chroot
specifies a directory to chroot to upon startup. This option requires you to
ensure that appropriate
syslogd()
socket (e.g.
chrootdir
/dev/log) is available otherwise
NSD
won't produce any log output.
-
u username
Drop user and group privileges to those of
username
after binding the socket.
The
username
must one of: username, id, or id.gid. For example: nsd, 80, or 80.80.
-
v
Print the version number of NSD to standard error and exit.
-
X plugin
Load a
plugin .
The
plugin
argument must be of the form
filename ,
or
filename=argument .
The filename must specify an NSD plugin compiled as a shared object
(.so) file. If the filename is not absolute the shared object is
searched for in the standard locations using
dlopen(
3)
.
If an argument is specified it is passed directly to the
initialization function of the plugin.
NSD
reacts to the following signals:
-
SIGTERM
-
Stop answering queries, shutdown, and exit normally.
-
SIGHUP
-
Reload the database.
-
SIGUSR1
-
Dump BIND8-style statistics into the log. Ignored otherwise.