2019-03-31 06:49:47 -04:00
|
|
|
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
|
|
|
|
..
|
|
|
|
|
.. SPDX-License-Identifier: MPL-2.0
|
2021-06-03 02:37:05 -04:00
|
|
|
..
|
2019-03-31 06:49:47 -04:00
|
|
|
.. This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
.. License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
2021-06-03 02:37:05 -04:00
|
|
|
..
|
2019-03-31 06:49:47 -04:00
|
|
|
.. See the COPYRIGHT file distributed with this work for additional
|
|
|
|
|
.. information regarding copyright ownership.
|
|
|
|
|
|
|
|
|
|
.. highlight: console
|
|
|
|
|
|
2022-03-03 09:32:35 -05:00
|
|
|
.. iscman:: named
|
2022-03-02 10:36:34 -05:00
|
|
|
.. program:: named
|
2019-03-31 06:49:47 -04:00
|
|
|
.. _man_named:
|
|
|
|
|
|
|
|
|
|
named - Internet domain name server
|
|
|
|
|
-----------------------------------
|
|
|
|
|
|
|
|
|
|
Synopsis
|
|
|
|
|
~~~~~~~~
|
|
|
|
|
|
2024-08-05 05:40:42 -04:00
|
|
|
:program:`named` [ [**-4**] | [**-6**] ] [**-c** config-file] [**-C**] [**-d** debug-level] [**-D** string] [**-f**] [**-g**] [**-L** logfile] [**-M** option] [**-m** flag] [**-n** #cpus] [**-p** port] [**-s**] [**-t** directory] [**-u** user] [**-v**] [**-V**] ]
|
2019-03-31 06:49:47 -04:00
|
|
|
|
|
|
|
|
Description
|
|
|
|
|
~~~~~~~~~~~
|
|
|
|
|
|
2022-03-03 10:00:43 -05:00
|
|
|
:program:`named` is a Domain Name System (DNS) server, part of the BIND 9
|
2019-03-31 06:49:47 -04:00
|
|
|
distribution from ISC. For more information on the DNS, see :rfc:`1033`,
|
|
|
|
|
:rfc:`1034`, and :rfc:`1035`.
|
|
|
|
|
|
2022-03-03 10:00:43 -05:00
|
|
|
When invoked without arguments, :program:`named` reads the default
|
2022-01-24 06:13:24 -05:00
|
|
|
configuration file |named_conf|, reads any initial data, and
|
2020-06-03 20:24:08 -04:00
|
|
|
listens for queries.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
|
|
|
|
Options
|
|
|
|
|
~~~~~~~
|
|
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -4
|
|
|
|
|
|
2022-03-03 10:00:43 -05:00
|
|
|
This option tells :program:`named` to use only IPv4, even if the host machine is capable of IPv6. :option:`-4` and
|
2022-03-02 10:54:31 -05:00
|
|
|
:option:`-6` are mutually exclusive.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -6
|
|
|
|
|
|
2022-03-03 10:00:43 -05:00
|
|
|
This option tells :program:`named` to use only IPv6, even if the host machine is capable of IPv4. :option:`-4` and
|
2022-03-02 10:54:31 -05:00
|
|
|
:option:`-6` are mutually exclusive.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -c config-file
|
|
|
|
|
|
2022-03-03 10:00:43 -05:00
|
|
|
This option tells :program:`named` to use ``config-file`` as its configuration file instead of the default,
|
2022-01-24 06:13:24 -05:00
|
|
|
|named_conf|. To ensure that the configuration file
|
2020-06-03 20:24:08 -04:00
|
|
|
can be reloaded after the server has changed its working directory
|
2019-03-31 06:49:47 -04:00
|
|
|
due to to a possible ``directory`` option in the configuration file,
|
2020-06-03 20:24:08 -04:00
|
|
|
``config-file`` should be an absolute pathname.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
2022-03-23 07:52:33 -04:00
|
|
|
.. option:: -C
|
|
|
|
|
|
|
|
|
|
This option prints out the default built-in configuration and exits.
|
|
|
|
|
|
|
|
|
|
NOTE: This is for debugging purposes only and is not an
|
|
|
|
|
accurate representation of the actual configuration used by :iscman:`named`
|
|
|
|
|
at runtime.
|
|
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -d debug-level
|
|
|
|
|
|
2020-06-03 20:24:08 -04:00
|
|
|
This option sets the daemon's debug level to ``debug-level``. Debugging traces from
|
2022-03-03 10:00:43 -05:00
|
|
|
:program:`named` become more verbose as the debug level increases.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -D string
|
|
|
|
|
|
2022-03-03 10:00:43 -05:00
|
|
|
This option specifies a string that is used to identify a instance of :program:`named`
|
2020-06-03 20:24:08 -04:00
|
|
|
in a process listing. The contents of ``string`` are not examined.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -f
|
|
|
|
|
|
2020-06-03 20:24:08 -04:00
|
|
|
This option runs the server in the foreground (i.e., do not daemonize).
|
2019-03-31 06:49:47 -04:00
|
|
|
|
2022-06-29 00:10:06 -04:00
|
|
|
.. option:: -F
|
|
|
|
|
|
|
|
|
|
This options turns on FIPS (US Federal Information Processing Standards)
|
|
|
|
|
mode if the underlying crytographic library supports running in FIPS
|
|
|
|
|
mode.
|
|
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -g
|
|
|
|
|
|
2020-06-03 20:24:08 -04:00
|
|
|
This option runs the server in the foreground and forces all logging to ``stderr``.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -L logfile
|
|
|
|
|
|
2020-06-03 20:24:08 -04:00
|
|
|
This option sets the log to the file ``logfile`` by default, instead of the system log.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -M option
|
|
|
|
|
|
2022-07-15 04:23:03 -04:00
|
|
|
This option sets the default (comma-separated) memory context
|
|
|
|
|
options. The possible flags are:
|
|
|
|
|
|
|
|
|
|
- ``fill``: fill blocks of memory with tag values when they are
|
|
|
|
|
allocated or freed, to assist debugging of memory problems; this is
|
|
|
|
|
the implicit default if :program:`named` has been compiled with
|
|
|
|
|
``--enable-developer``.
|
|
|
|
|
|
|
|
|
|
- ``nofill``: disable the behavior enabled by ``fill``; this is the
|
|
|
|
|
implicit default unless :program:`named` has been compiled with
|
|
|
|
|
``--enable-developer``.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -m flag
|
|
|
|
|
|
2020-06-03 20:24:08 -04:00
|
|
|
This option turns on memory usage debugging flags. Possible flags are ``usage``,
|
2024-10-09 09:32:07 -04:00
|
|
|
``trace`` and ``record``. These correspond to the
|
2020-06-03 20:24:08 -04:00
|
|
|
``ISC_MEM_DEBUGXXXX`` flags described in ``<isc/mem.h>``.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -n #cpus
|
|
|
|
|
|
2020-06-03 20:24:08 -04:00
|
|
|
This option creates ``#cpus`` worker threads to take advantage of multiple CPUs. If
|
2022-03-03 10:00:43 -05:00
|
|
|
not specified, :program:`named` tries to determine the number of CPUs
|
2020-06-03 20:24:08 -04:00
|
|
|
present and creates one thread per CPU. If it is unable to determine
|
|
|
|
|
the number of CPUs, a single worker thread is created.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -p value
|
|
|
|
|
|
2020-10-12 17:06:55 -04:00
|
|
|
This option specifies the port(s) on which the server will listen
|
|
|
|
|
for queries. If ``value`` is of the form ``<portnum>`` or
|
|
|
|
|
``dns=<portnum>``, the server will listen for DNS queries on
|
|
|
|
|
``portnum``; if not not specified, the default is port 53. If
|
|
|
|
|
``value`` is of the form ``tls=<portnum>``, the server will
|
|
|
|
|
listen for TLS queries on ``portnum``; the default is 853.
|
2020-09-16 15:21:32 -04:00
|
|
|
If ``value`` is of the form ``https=<portnum>``, the server will
|
|
|
|
|
listen for HTTPS queries on ``portnum``; the default is 443.
|
2020-12-07 07:19:10 -05:00
|
|
|
If ``value`` is of the form ``http=<portnum>``, the server will
|
|
|
|
|
listen for HTTP queries on ``portnum``; the default is 80.
|
2022-03-02 09:12:17 -05:00
|
|
|
|
|
|
|
|
.. option:: -s
|
|
|
|
|
|
2020-06-03 20:24:08 -04:00
|
|
|
This option writes memory usage statistics to ``stdout`` on exit.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
|
|
This option is mainly of interest to BIND 9 developers and may be
|
|
|
|
|
removed or changed in a future release.
|
|
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -t directory
|
|
|
|
|
|
2022-03-03 10:00:43 -05:00
|
|
|
This option tells :program:`named` to chroot to ``directory`` after processing the command-line arguments, but
|
2019-03-31 06:49:47 -04:00
|
|
|
before reading the configuration file.
|
|
|
|
|
|
|
|
|
|
.. warning::
|
|
|
|
|
|
2022-03-02 10:54:31 -05:00
|
|
|
This option should be used in conjunction with the :option:`-u` option,
|
2019-03-31 06:49:47 -04:00
|
|
|
as chrooting a process running as root doesn't enhance security on
|
2020-06-03 20:24:08 -04:00
|
|
|
most systems; the way ``chroot`` is defined allows a process
|
2019-03-31 06:49:47 -04:00
|
|
|
with root privileges to escape a chroot jail.
|
|
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -U #listeners
|
|
|
|
|
|
2024-04-24 07:55:11 -04:00
|
|
|
This option has been removed. Attempts to use it now result in a warning.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -u user
|
|
|
|
|
|
2020-06-03 20:24:08 -04:00
|
|
|
This option sets the setuid to ``user`` after completing privileged operations, such as
|
2019-03-31 06:49:47 -04:00
|
|
|
creating sockets that listen on privileged ports.
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
2022-03-03 10:00:43 -05:00
|
|
|
On Linux, :program:`named` uses the kernel's capability mechanism to drop
|
2020-06-03 20:24:08 -04:00
|
|
|
all root privileges except the ability to ``bind`` to a
|
2019-03-31 06:49:47 -04:00
|
|
|
privileged port and set process resource limits. Unfortunately,
|
2022-03-03 10:00:43 -05:00
|
|
|
this means that the :option:`-u` option only works when :program:`named` is run
|
2019-03-31 06:49:47 -04:00
|
|
|
on kernel 2.2.18 or later, or kernel 2.3.99-pre3 or later, since
|
|
|
|
|
previous kernels did not allow privileges to be retained after
|
2020-06-03 20:24:08 -04:00
|
|
|
``setuid``.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -v
|
|
|
|
|
|
2020-06-03 20:24:08 -04:00
|
|
|
This option reports the version number and exits.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -V
|
|
|
|
|
|
2022-09-27 09:10:58 -04:00
|
|
|
This option reports the version number, build options, supported
|
|
|
|
|
cryptographics algorithms, and exits.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
2022-03-02 09:12:17 -05:00
|
|
|
.. option:: -X lock-file
|
|
|
|
|
|
2023-10-26 05:55:54 -04:00
|
|
|
This option has been removed and using it will cause a fatal error.
|
2023-10-26 05:08:49 -04:00
|
|
|
|
2019-03-31 06:49:47 -04:00
|
|
|
Signals
|
|
|
|
|
~~~~~~~
|
|
|
|
|
|
|
|
|
|
In routine operation, signals should not be used to control the
|
2022-03-03 16:17:04 -05:00
|
|
|
nameserver; :iscman:`rndc` should be used instead.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
|
|
|
|
SIGHUP
|
2020-06-03 20:24:08 -04:00
|
|
|
This signal forces a reload of the server.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
|
|
|
|
SIGINT, SIGTERM
|
2020-06-03 20:24:08 -04:00
|
|
|
These signals shut down the server.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
|
|
|
|
The result of sending any other signals to the server is undefined.
|
|
|
|
|
|
|
|
|
|
Configuration
|
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
2022-03-03 10:00:43 -05:00
|
|
|
The :program:`named` configuration file is too complex to describe in detail
|
2019-03-31 06:49:47 -04:00
|
|
|
here. A complete description is provided in the BIND 9 Administrator
|
|
|
|
|
Reference Manual.
|
|
|
|
|
|
2022-03-03 10:00:43 -05:00
|
|
|
:program:`named` inherits the ``umask`` (file creation mode mask) from the
|
|
|
|
|
parent process. If files created by :program:`named`, such as journal files,
|
2019-03-31 06:49:47 -04:00
|
|
|
need to have custom permissions, the ``umask`` should be set explicitly
|
2022-03-03 10:00:43 -05:00
|
|
|
in the script used to start the :program:`named` process.
|
2019-03-31 06:49:47 -04:00
|
|
|
|
|
|
|
|
Files
|
|
|
|
|
~~~~~
|
|
|
|
|
|
2022-01-24 06:13:24 -05:00
|
|
|
|named_conf|
|
2019-03-31 06:49:47 -04:00
|
|
|
The default configuration file.
|
|
|
|
|
|
2022-01-24 06:13:24 -05:00
|
|
|
|named_pid|
|
2019-03-31 06:49:47 -04:00
|
|
|
The default process-id file.
|
|
|
|
|
|
|
|
|
|
See Also
|
|
|
|
|
~~~~~~~~
|
|
|
|
|
|
2022-03-04 07:10:25 -05:00
|
|
|
:rfc:`1033`, :rfc:`1034`, :rfc:`1035`, :iscman:`named-checkconf(8) <named-checkconf>`, :iscman:`named-checkzone(8) <named-checkzone>`, :iscman:`rndc(8) <rndc>`, :iscman:`named.conf(5) <named.conf>`, BIND 9 Administrator Reference Manual.
|