Vendor import of BIND 9.4.1
This commit is contained in:
parent
fb8cb3b3a3
commit
6df9693fc1
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright (C) 1996-2003 Internet Software Consortium.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
@ -13,7 +13,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
$Id: COPYRIGHT,v 1.6.2.2.8.4 2006/01/04 00:37:22 marka Exp $
|
||||
$Id: COPYRIGHT,v 1.9.18.3 2007/01/08 02:41:59 marka Exp $
|
||||
|
||||
Portions Copyright (C) 1996-2001 Nominum, Inc.
|
||||
|
||||
|
@ -75,12 +75,12 @@ Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master file bar
|
||||
A: This is often caused by TXT records with missing close quotes. Check that all
|
||||
TXT records containing quoted strings have both open and close quotes.
|
||||
|
||||
Q: How do I produce a usable core file from a multithreaded named on Linux?
|
||||
Q: How do I produce a usable core file from a multi-threaded named on Linux?
|
||||
|
||||
A: If the Linux kernel is 2.4.7 or newer, multithreaded core dumps are usable
|
||||
A: If the Linux kernel is 2.4.7 or newer, multi-threaded core dumps are usable
|
||||
(that is, the correct thread is dumped). Otherwise, if using a 2.2 kernel,
|
||||
apply the kernel patch found in contrib/linux/coredump-patch and rebuild the
|
||||
kernel. This patch will cause multithreaded programs to dump the correct
|
||||
kernel. This patch will cause multi-threaded programs to dump the correct
|
||||
thread.
|
||||
|
||||
Q: How do I restrict people from looking up the server version?
|
||||
@ -310,7 +310,7 @@ A: These indicate a malformed master zone. You can identify the exact records
|
||||
named-checkzone example.com tmp
|
||||
|
||||
A CNAME record cannot exist with the same name as another record except for the
|
||||
DNSSEC records which prove its existance (NSEC).
|
||||
DNSSEC records which prove its existence (NSEC).
|
||||
|
||||
RFC 1034, Section 3.6.2: "If a CNAME RR is present at a node, no other data
|
||||
should be present; this ensures that the data for a canonical name and its
|
||||
@ -385,11 +385,11 @@ Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading master
|
||||
A: This error is produced when a line in the master file contains leading white
|
||||
space (tab/space) but the is no current record owner name to inherit the name
|
||||
from. Usually this is the result of putting white space before a comment.
|
||||
Forgeting the "@" for the SOA record or indenting the master file.
|
||||
Forgetting the "@" for the SOA record or indenting the master file.
|
||||
|
||||
Q: Why are my logs in GMT (UTC).
|
||||
|
||||
A: You are running chrooted (-t) and have not supplied local timzone information
|
||||
A: You are running chrooted (-t) and have not supplied local timezone information
|
||||
in the chroot area.
|
||||
|
||||
FreeBSD: /etc/localtime
|
||||
@ -474,7 +474,7 @@ A: These indicate a filesystem permission error preventing named creating /
|
||||
masters { 192.168.4.12; };
|
||||
};
|
||||
|
||||
Q: How do I intergrate BIND 9 and Solaris SMF
|
||||
Q: How do I integrate BIND 9 and Solaris SMF
|
||||
|
||||
A: Sun has a blog entry describing how to do this.
|
||||
|
||||
@ -487,7 +487,7 @@ A: No. The rules for glue (copies of the *address* records in the parent zones)
|
||||
|
||||
You would have to add both the CNAME and address records (A/AAAA) as glue to
|
||||
the parent zone and have CNAMEs be followed when doing additional section
|
||||
processing to make it work. No namesever implementation supports either of
|
||||
processing to make it work. No nameserver implementation supports either of
|
||||
these requirements.
|
||||
|
||||
Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA" mean?
|
||||
@ -495,7 +495,7 @@ Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA" mean?
|
||||
A: If the IN-ADDR.ARPA name covered refers to a internal address space you are
|
||||
using then you have failed to follow RFC 1918 usage rules and are leaking
|
||||
queries to the Internet. You should establish your own zones for these
|
||||
addresses to prevent you quering the Internet's name servers for these
|
||||
addresses to prevent you querying the Internet's name servers for these
|
||||
addresses. Please see http://as112.net/ for details of the problems you are
|
||||
causing and the counter measures that have had to be deployed.
|
||||
|
||||
@ -549,7 +549,7 @@ A: Red Hat Security Enhanced Linux (SELinux) policy security protections :
|
||||
Red Hat have adopted the National Security Agency's SELinux security policy (
|
||||
see http://www.nsa.gov/selinux ) and recommendations for BIND security , which
|
||||
are more secure than running named in a chroot and make use of the bind-chroot
|
||||
environment unecessary .
|
||||
environment unnecessary .
|
||||
|
||||
By default, named is not allowed by the SELinux policy to write, create or
|
||||
delete any files EXCEPT in these directories:
|
||||
@ -614,19 +614,19 @@ A: Red Hat Security Enhanced Linux (SELinux) policy security protections :
|
||||
in different locations, you can do so by changing the context of the custom
|
||||
file locations .
|
||||
|
||||
To create a custom configuration file location, eg. '/root/named.conf', to use
|
||||
To create a custom configuration file location, e.g. '/root/named.conf', to use
|
||||
with the 'named -c' option, do:
|
||||
|
||||
# chcon system_u:object_r:named_conf_t /root/named.conf
|
||||
|
||||
|
||||
To create a custom modifiable named data location, eg. '/var/log/named' for a
|
||||
To create a custom modifiable named data location, e.g. '/var/log/named' for a
|
||||
log file, do:
|
||||
|
||||
# chcon system_u:object_r:named_cache_t /var/log/named
|
||||
|
||||
|
||||
To create a custom zone file location, eg. /root/zones/, do:
|
||||
To create a custom zone file location, e.g. /root/zones/, do:
|
||||
|
||||
# chcon system_u:object_r:named_zone_t /root/zones/{.,*}
|
||||
|
||||
@ -667,9 +667,55 @@ A: No, so long as the machines internal clock (as reported by "date -u") remains
|
||||
(which sets the default timezone for the machine) and possibly a directory
|
||||
which has all the conversion rules for the world (e.g. /usr/share/zoneinfo).
|
||||
When updating the OS do not forget to update any chroot areas as well. See your
|
||||
OS's documetation for more details.
|
||||
OS's documentation for more details.
|
||||
|
||||
The local timezone conversion rules can also be done on a individual basis by
|
||||
setting the TZ envirionment variable appropriately. See your OS's documentation
|
||||
setting the TZ environment variable appropriately. See your OS's documentation
|
||||
for more details.
|
||||
|
||||
Q: Why do we get the following warning at run time:
|
||||
|
||||
kernel: process `named' is using obsolete setsockopt SO_BSDCOMPAT
|
||||
|
||||
A: The early Linux kernels broke sendto() by having it return that a ICMP
|
||||
unreachable had be received for non connected UDP sockets. This made non
|
||||
connected UDP sockets work like connected UDP socket which is fine when you are
|
||||
only talking to one destination. Named however talks to multiple destinations
|
||||
and it caused problems.
|
||||
|
||||
Rather than fix sendto() to just have BSD behaviour they added SO_BSDCOMPAT to
|
||||
turn BSD behaviour on/off on a per socket basis.
|
||||
|
||||
Later they decided to make BSD behaviour the default and to aggressively track
|
||||
down applications that used SO_BSDCOMPAT by issuing a warning. This is the sort
|
||||
of things vendors do in alpha/beta stages of a release so that their code is
|
||||
clean. They then turn the warning *off* for release code.
|
||||
|
||||
We still have customers that have kernels that require SO_BSDCOMPAT to operate.
|
||||
We therefore cannot remove the setsockopt(SO_BSDCOMPAT) call.
|
||||
|
||||
Now most/all portable applications that use SO_BSDCOMPAT use it conditionally
|
||||
manner so just removing SO_BSDCOMPAT from the header file would be safe as long
|
||||
as the binary was not to be moved between systems. BIND's use is conditional.
|
||||
|
||||
In short, the Linux developers should either, remove the #define for
|
||||
SO_BSDCOMPAT, and/or remove the warning.
|
||||
|
||||
Q: Isn't "make install" supposed to generate a default named.conf?
|
||||
|
||||
A: Short Answer: No.
|
||||
|
||||
Long Answer: There really isn't a default configuration which fits any site
|
||||
perfectly. There are lots of decisions that need to be made and there is no
|
||||
consensus on what the defaults should be. For example FreeBSD uses /etc/namedb
|
||||
as the location where the configuration files for named are stored. Others use
|
||||
/var/named.
|
||||
|
||||
What addresses to listen on? For a laptop on the move a lot you may only want
|
||||
to listen on the loop back interfaces.
|
||||
|
||||
Who do you offer recursive service to? Is there are firewall to consider? If so
|
||||
is it stateless or stateful. Are you directly on the Internet? Are you on a
|
||||
private network? Are you on a NAT'd network? The answers to all these questions
|
||||
change how you configure even a caching name server.
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
<?xml-stylesheet href="common.css" type="text/css"?>
|
||||
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" []>
|
||||
<!--
|
||||
@ -17,7 +18,7 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: FAQ.xml,v 1.4.6.5.6.1 2007/01/12 02:28:00 marka Exp $ -->
|
||||
<!-- $Id: FAQ.xml,v 1.4.4.8 2007/02/05 05:23:39 marka Exp $ -->
|
||||
|
||||
<article class="faq">
|
||||
<title>Frequently Asked Questions about BIND 9</title>
|
||||
@ -186,17 +187,17 @@ example.com. 86400 IN SOA ns hostmaster ( 1 3600 1800 1814400 3600 )</programlis
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
How do I produce a usable core file from a multithreaded
|
||||
How do I produce a usable core file from a multi-threaded
|
||||
named on Linux?
|
||||
</para>
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
If the Linux kernel is 2.4.7 or newer, multithreaded core
|
||||
If the Linux kernel is 2.4.7 or newer, multi-threaded core
|
||||
dumps are usable (that is, the correct thread is dumped).
|
||||
Otherwise, if using a 2.2 kernel, apply the kernel patch
|
||||
found in contrib/linux/coredump-patch and rebuild the kernel.
|
||||
This patch will cause multithreaded programs to dump the
|
||||
This patch will cause multi-threaded programs to dump the
|
||||
correct thread.
|
||||
</para>
|
||||
</answer>
|
||||
@ -644,7 +645,7 @@ named-checkzone example.com tmp</programlisting>
|
||||
</informalexample>
|
||||
<para>
|
||||
A CNAME record cannot exist with the same name as another record
|
||||
except for the DNSSEC records which prove its existance (NSEC).
|
||||
except for the DNSSEC records which prove its existence (NSEC).
|
||||
</para>
|
||||
<para>
|
||||
RFC 1034, Section 3.6.2: <quote>If a CNAME RR is present at a node,
|
||||
@ -768,7 +769,7 @@ Master 10.0.1.1:
|
||||
contains leading white space (tab/space) but the is no
|
||||
current record owner name to inherit the name from. Usually
|
||||
this is the result of putting white space before a comment.
|
||||
Forgeting the "@" for the SOA record or indenting the master
|
||||
Forgetting the "@" for the SOA record or indenting the master
|
||||
file.
|
||||
</para>
|
||||
</answer>
|
||||
@ -782,7 +783,7 @@ Master 10.0.1.1:
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
You are running chrooted (-t) and have not supplied local timzone
|
||||
You are running chrooted (-t) and have not supplied local timezone
|
||||
information in the chroot area.
|
||||
</para>
|
||||
<simplelist>
|
||||
@ -945,7 +946,7 @@ zone "example.net" {
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
How do I intergrate BIND 9 and Solaris SMF
|
||||
How do I integrate BIND 9 and Solaris SMF
|
||||
</para>
|
||||
</question>
|
||||
<answer>
|
||||
@ -977,7 +978,7 @@ zone "example.net" {
|
||||
You would have to add both the CNAME and address records
|
||||
(A/AAAA) as glue to the parent zone and have CNAMEs be
|
||||
followed when doing additional section processing to make
|
||||
it work. No namesever implementation supports either of
|
||||
it work. No nameserver implementation supports either of
|
||||
these requirements.
|
||||
</para>
|
||||
</answer>
|
||||
@ -996,7 +997,7 @@ zone "example.net" {
|
||||
space you are using then you have failed to follow RFC 1918
|
||||
usage rules and are leaking queries to the Internet. You
|
||||
should establish your own zones for these addresses to prevent
|
||||
you quering the Internet's name servers for these addresses.
|
||||
you querying the Internet's name servers for these addresses.
|
||||
Please see <ulink url="http://as112.net/">http://as112.net/</ulink>
|
||||
for details of the problems you are causing and the counter
|
||||
measures that have had to be deployed.
|
||||
@ -1073,7 +1074,7 @@ empty:
|
||||
SELinux security policy ( see http://www.nsa.gov/selinux
|
||||
) and recommendations for BIND security , which are more
|
||||
secure than running named in a chroot and make use of
|
||||
the bind-chroot environment unecessary .
|
||||
the bind-chroot environment unnecessary .
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@ -1174,7 +1175,7 @@ named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,d
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To create a custom configuration file location, eg.
|
||||
To create a custom configuration file location, e.g.
|
||||
'/root/named.conf', to use with the 'named -c' option,
|
||||
do:
|
||||
<informalexample>
|
||||
@ -1185,7 +1186,7 @@ named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,d
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To create a custom modifiable named data location, eg.
|
||||
To create a custom modifiable named data location, e.g.
|
||||
'/var/log/named' for a log file, do:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
@ -1195,7 +1196,7 @@ named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,d
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To create a custom zone file location, eg. /root/zones/, do:
|
||||
To create a custom zone file location, e.g. /root/zones/, do:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
# chcon system_u:object_r:named_zone_t /root/zones/{.,*}
|
||||
@ -1209,6 +1210,7 @@ named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,d
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@ -1239,6 +1241,7 @@ zone "list.dsbl.org" {
|
||||
</programlisting>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
@ -1262,15 +1265,93 @@ zone "list.dsbl.org" {
|
||||
a directory which has all the conversion rules for the
|
||||
world (e.g. /usr/share/zoneinfo). When updating the OS
|
||||
do not forget to update any chroot areas as well.
|
||||
See your OS's documetation for more details.
|
||||
See your OS's documentation for more details.
|
||||
</para>
|
||||
<para>
|
||||
The local timezone conversion rules can also be done on
|
||||
a individual basis by setting the TZ envirionment variable
|
||||
a individual basis by setting the TZ environment variable
|
||||
appropriately. See your OS's documentation for more
|
||||
details.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
Why do we get the following warning at run time:
|
||||
<programlisting>kernel: process `named' is using obsolete setsockopt SO_BSDCOMPAT</programlisting>
|
||||
</para>
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
The early Linux kernels broke sendto() by having it return
|
||||
that a ICMP unreachable had be received for non connected
|
||||
UDP sockets. This made non connected UDP sockets work like
|
||||
connected UDP socket which is fine when you are only talking
|
||||
to one destination. Named however talks to multiple
|
||||
destinations and it caused problems.
|
||||
</para>
|
||||
<para>
|
||||
Rather than fix sendto() to just have BSD behaviour they added
|
||||
SO_BSDCOMPAT to turn BSD behaviour on/off on a per socket basis.
|
||||
</para>
|
||||
<para>
|
||||
Later they decided to make BSD behaviour the default and
|
||||
to aggressively track down applications that used SO_BSDCOMPAT
|
||||
by issuing a warning. This is the sort of things vendors
|
||||
do in alpha/beta stages of a release so that their code is
|
||||
clean. They then turn the warning *off* for release code.
|
||||
</para>
|
||||
<para>
|
||||
We still have customers that have kernels that require
|
||||
SO_BSDCOMPAT to operate. We therefore cannot remove the
|
||||
setsockopt(SO_BSDCOMPAT) call.
|
||||
</para>
|
||||
<para>
|
||||
Now most/all portable applications that use SO_BSDCOMPAT use it
|
||||
conditionally manner so just removing SO_BSDCOMPAT from the
|
||||
header file would be safe as long as the binary was not to
|
||||
be moved between systems. BIND's use is conditional.
|
||||
</para>
|
||||
<para>
|
||||
In short, the Linux developers should either, remove the #define for
|
||||
SO_BSDCOMPAT, and/or remove the warning.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
Isn't "make install" supposed to generate a default named.conf?
|
||||
</para>
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
Short Answer: No.
|
||||
</para>
|
||||
<para>
|
||||
Long Answer: There really isn't a default configuration which fits
|
||||
any site perfectly. There are lots of decisions that need to
|
||||
be made and there is no consensus on what the defaults should be.
|
||||
For example FreeBSD uses /etc/namedb as the location where the
|
||||
configuration files for named are stored. Others use /var/named.
|
||||
</para>
|
||||
<para>
|
||||
What addresses to listen on? For a laptop on the move a lot
|
||||
you may only want to listen on the loop back interfaces.
|
||||
</para>
|
||||
<para>
|
||||
Who do you offer recursive service to? Is there are firewall
|
||||
to consider? If so is it stateless or stateful. Are you
|
||||
directly on the Internet? Are you on a private network? Are
|
||||
you on a NAT'd network? The answers
|
||||
to all these questions change how you configure even a
|
||||
caching name server.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
</qandaset>
|
||||
</article>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 1998-2002 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
@ -13,7 +13,7 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: Makefile.in,v 1.41.2.2.2.4 2006/05/19 00:04:00 marka Exp $
|
||||
# $Id: Makefile.in,v 1.43.18.4 2006/05/19 00:04:01 marka Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
@ -58,3 +58,11 @@ check: test
|
||||
|
||||
test:
|
||||
(cd bin/tests && ${MAKE} ${MAKEDEFS} test)
|
||||
|
||||
FAQ: FAQ.xml
|
||||
${XSLTPROC} doc/xsl/isc-docbook-text.xsl FAQ.xml | \
|
||||
${W3M} -T text/html -dump >$@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
clean::
|
||||
rm -f FAQ.tmp
|
||||
|
@ -42,41 +42,233 @@ BIND 9
|
||||
Stichting NLnet - NLnet Foundation
|
||||
Nominum, Inc.
|
||||
|
||||
BIND 9.3.4
|
||||
|
||||
BIND 9.3.4 is a security release.
|
||||
BIND 9.4.1
|
||||
|
||||
BIND 9.3.3
|
||||
|
||||
BIND 9.3.3 is a maintenance release, containing fixes for
|
||||
a number of bugs in 9.3.2.
|
||||
|
||||
BIND 9.3.2
|
||||
|
||||
BIND 9.3.2 is a maintenance release, containing fixes for
|
||||
a number of bugs in 9.3.1.
|
||||
|
||||
libbind: corresponds to that from BIND 8.4.7-REL.
|
||||
|
||||
Known Issues:
|
||||
|
||||
The following INSIST can be triggered with DNSSEC enabled.
|
||||
|
||||
resolver.c:762: INSIST(result != 0 || dns_rdataset_isassociated(event->rdataset) || fctx->type == ((dns_rdatatype_t)dns_rdatatype_any) || fctx->type == ((dns_rdatatype_t)dns_rdatatype_rrsig)) failed
|
||||
|
||||
We are still trying to isolate the cause. If you have core
|
||||
dump please send a bug report to bind9-bugs@isc.org with
|
||||
the location of the core, named executable and OS details.
|
||||
BIND 9.4.1 is a security release, containing a fix for a
|
||||
security bug in 9.4.0.
|
||||
|
||||
Note: contrib/nanny contains a perl script to restart named
|
||||
in the event of a INSIST/REQUIRE/ENSURE failure.
|
||||
BIND 9.4.0
|
||||
|
||||
BIND 9.3.1
|
||||
BIND 9.4.0 has a number of new features over 9.3,
|
||||
including:
|
||||
|
||||
BIND 9.3.1 is a maintenance release, containing fixes for
|
||||
a number of bugs in 9.3.0.
|
||||
Implemented "additional section caching" (or "acache"), an
|
||||
internal cache framework for additional section content to
|
||||
improve response performance. Several configuration options
|
||||
were provided to control the behavior.
|
||||
|
||||
libbind: corresponds to that from BIND 8.4.6-REL.
|
||||
New notify type 'master-only'. Enable notify for master
|
||||
zones only.
|
||||
|
||||
Accept 'notify-source' style syntax for query-source.
|
||||
|
||||
rndc now allows addresses to be set in the server clauses.
|
||||
|
||||
New option "allow-query-cache". This lets allow-query be
|
||||
used to specify the default zone access level rather than
|
||||
having to have every zone override the global value.
|
||||
allow-query-cache can be set at both the options and view
|
||||
levels. If allow-query-cache is not set allow-query applies.
|
||||
|
||||
rndc: the source address can now be specified.
|
||||
|
||||
ixfr-from-differences now takes master and slave in addition
|
||||
to yes and no at the options and view levels.
|
||||
|
||||
Allow the journal's name to be changed via named.conf.
|
||||
|
||||
'rndc notify zone [class [view]]' resend the NOTIFY messages
|
||||
for the specified zone.
|
||||
|
||||
'dig +trace' now randomly selects the next servers to try.
|
||||
Report if there is a bad delegation.
|
||||
|
||||
Improve check-names error messages.
|
||||
|
||||
Make public the function to read a key file, dst_key_read_public().
|
||||
|
||||
dig now returns the byte count for axfr/ixfr.
|
||||
|
||||
allow-update is now settable at the options / view level.
|
||||
|
||||
named-checkconf now checks the logging configuration.
|
||||
|
||||
host now can turn on memory debugging flags with '-m'.
|
||||
|
||||
Don't send notify messages to self.
|
||||
|
||||
Perform sanity checks on NS records which refer to 'in zone' names.
|
||||
|
||||
New zone option "notify-delay". Specify a minimum delay
|
||||
between sets of NOTIFY messages.
|
||||
|
||||
Extend adjusting TTL warning messages.
|
||||
|
||||
Named and named-checkzone can now both check for non-terminal
|
||||
wildcard records.
|
||||
|
||||
"rndc freeze/thaw" now freezes/thaws all zones.
|
||||
|
||||
named-checkconf now check acls to verify that they only
|
||||
refer to existing acls.
|
||||
|
||||
The server syntax has been extended to support a range of
|
||||
servers.
|
||||
|
||||
Report differences between hints and real NS rrset and
|
||||
associated address records.
|
||||
|
||||
Preserve the case of domain names in rdata during zone
|
||||
transfers.
|
||||
|
||||
Restructured the data locking framework using architecture
|
||||
dependent atomic operations (when available), improving
|
||||
response performance on multi-processor machines significantly.
|
||||
x86, x86_64, alpha, powerpc, and mips are currently supported.
|
||||
|
||||
UNIX domain controls are now supported.
|
||||
|
||||
Add support for additional zone file formats for improving
|
||||
loading performance. The masterfile-format option in
|
||||
named.conf can be used to specify a non-default format. A
|
||||
separate command named-compilezone was provided to generate
|
||||
zone files in the new format. Additionally, the -I and -O
|
||||
options for dnssec-signzone specify the input and output
|
||||
formats.
|
||||
|
||||
dnssec-signzone can now randomize signature end times
|
||||
(dnssec-signzone -j jitter).
|
||||
|
||||
Add support for CH A record.
|
||||
|
||||
Add additional zone data consistancy checks. named-checkzone
|
||||
has extended checking of NS, MX and SRV record and the hosts
|
||||
they reference. named has extended post zone load checks.
|
||||
New zone options: check-mx and integrity-check.
|
||||
|
||||
edns-udp-size can now be overridden on a per server basis.
|
||||
|
||||
dig can now specify the EDNS version when making a query.
|
||||
|
||||
Added framework for handling multiple EDNS versions.
|
||||
|
||||
Additional memory debugging support to track size and mctx
|
||||
arguments.
|
||||
|
||||
Detect duplicates of UDP queries we are recursing on and
|
||||
drop them. New stats category "duplicates".
|
||||
|
||||
Memory management. "USE INTERNAL MALLOC" is now runtime selectable.
|
||||
|
||||
The lame cache is now done on a <qname,qclass,qtype> basis
|
||||
as some servers only appear to be lame for certain query
|
||||
types.
|
||||
|
||||
Limit the number of recursive clients that can be waiting
|
||||
for a single query (<qname,qtype,qclass>) to resolve. New
|
||||
options clients-per-query and max-clients-per-query.
|
||||
|
||||
dig: report the number of extra bytes still left in the
|
||||
packet after processing all the records.
|
||||
|
||||
Support for IPSECKEY rdata type.
|
||||
|
||||
Raise the UDP receive buffer size to 32k if it is less than 32k.
|
||||
|
||||
x86 and x86_64 now have separate atomic locking implementations.
|
||||
|
||||
named-checkconf now validates update-policy entries.
|
||||
|
||||
Attempt to make the amount of work performed in a iteration
|
||||
self tuning. The covers nodes clean from the cache per
|
||||
iteration, nodes written to disk when rewriting a master
|
||||
file and nodes destroyed per iteration when destroying a
|
||||
zone or a cache.
|
||||
|
||||
ISC string copy API.
|
||||
|
||||
Automatic empty zone creation for D.F.IP6.ARPA and friends.
|
||||
Note: RFC 1918 zones are not yet covered by this but are
|
||||
likely to be in a future release.
|
||||
|
||||
New options: empty-server, empty-contact, empty-zones-enable
|
||||
and disable-empty-zone.
|
||||
|
||||
dig now has a '-q queryname' and '+showsearch' options.
|
||||
|
||||
host/nslookup now continue (default)/fail on SERVFAIL.
|
||||
|
||||
dig now warns if 'RA' is not set in the answer when 'RD'
|
||||
was set in the query. host/nslookup skip servers that fail
|
||||
to set 'RA' when 'RD' is set unless a server is explicitly
|
||||
set.
|
||||
|
||||
Integrate contributed DLZ code into named.
|
||||
|
||||
Integrate contributed IDN code from JPNIC.
|
||||
|
||||
Validate pending NS RRsets, in the authority section, prior
|
||||
to returning them if it can be done without requiring DNSKEYs
|
||||
to be fetched.
|
||||
|
||||
It is now possible to configure named to accept expired
|
||||
RRSIGs. Default "dnssec-accept-expired no;". Setting
|
||||
"dnssec-accept-expired yes;" leaves named vulnerable to
|
||||
replay attacks.
|
||||
|
||||
Additional memory leakage checks.
|
||||
|
||||
The maximum EDNS UDP response named will send can now be
|
||||
set in named.conf (max-udp-size). This is independent of
|
||||
the advertised receive buffer (edns-udp-size).
|
||||
|
||||
Named now falls back to advertising EDNS with a 512 byte
|
||||
receive buffer if the initial EDNS queries fail.
|
||||
|
||||
Control the zeroing of the negative response TTL to a soa
|
||||
query. Defaults "zero-no-soa-ttl yes;" and
|
||||
"zero-no-soa-ttl-cache no;".
|
||||
|
||||
Separate out MX and SRV to CNAME checks.
|
||||
|
||||
dig/nslookup/host: warn about missing "QR".
|
||||
|
||||
TSIG HMACSHA1, HMACSHA224, HMACSHA256, HMACSHA384 and
|
||||
HMACSHA512 support.
|
||||
|
||||
dnssec-signzone: output the SOA record as the first record
|
||||
in the signed zone.
|
||||
|
||||
Two new update policies. "selfsub" and "selfwild".
|
||||
|
||||
dig, nslookup and host now advertise a 4096 byte EDNS UDP
|
||||
buffer size by default.
|
||||
|
||||
Report when a zone is removed.
|
||||
|
||||
DS/DLV SHA256 digest algorithm support.
|
||||
|
||||
Implement "rrset-order fixed".
|
||||
|
||||
Check the KSK flag when updating a secure dynamic zone.
|
||||
New zone option "update-check-ksk yes;".
|
||||
|
||||
It is now possible to explicitly enable DNSSEC validation.
|
||||
default dnssec-validation no; to be changed to yes in 9.5.0.
|
||||
|
||||
It is now possible to enable/disable DNSSEC validation
|
||||
from rndc. This is useful for the mobile hosts where the
|
||||
current connection point breaks DNSSEC (firewall/proxy).
|
||||
|
||||
rndc validation newstate [view]
|
||||
|
||||
dnssec-signzone can now update the SOA record of the signed
|
||||
zone, either as an increment or as the system time().
|
||||
|
||||
Statistics about acache now recorded and sent to log.
|
||||
|
||||
libbind: corresponds to that from BIND 8.4.7.
|
||||
|
||||
BIND 9.3.0
|
||||
|
||||
|
112
contrib/bind9/README.idnkit
Normal file
112
contrib/bind9/README.idnkit
Normal file
@ -0,0 +1,112 @@
|
||||
|
||||
BIND-9 IDN patch
|
||||
|
||||
Japan Network Information Center (JPNIC)
|
||||
|
||||
|
||||
* What is this patch for?
|
||||
|
||||
This patch adds internationalized domain name (IDN) support to BIND-9.
|
||||
You'll get internationalized version of dig/host/nslookup commands.
|
||||
|
||||
+ internationalized dig/host/nslookup
|
||||
dig/host/nslookup accepts non-ASCII domain names in the local
|
||||
codeset (such as Shift JIS, Big5 or ISO8859-1) determined by
|
||||
the locale information. The domain names are normalized and
|
||||
converted to the encoding on the DNS protocol, and sent to DNS
|
||||
servers. The replies are converted back to the local codeset
|
||||
and displayed.
|
||||
|
||||
|
||||
* Compilation & installation
|
||||
|
||||
0. Prerequisite
|
||||
|
||||
You have to build and install idnkit before building this patched version
|
||||
of bind-9.
|
||||
|
||||
1. Running configure script
|
||||
|
||||
Run `configure' in the top directory. See `README' for the
|
||||
configuration options.
|
||||
|
||||
This patch adds the following 4 options to `configure'. You should
|
||||
at least specify `--with-idn' option to enable IDN support.
|
||||
|
||||
--with-idn[=IDN_PREFIX]
|
||||
To enable IDN support, you have to specify `--with-idn' option.
|
||||
The argument IDN_PREFIX is the install prefix of idnkit. If
|
||||
IDN_PREFIX is omitted, PREFIX (derived from `--prefix=PREFIX')
|
||||
is assumed.
|
||||
|
||||
--with-libiconv[=LIBICONV_PREFIX]
|
||||
Specify this option if idnkit you have installed links GNU
|
||||
libiconv. The argument LIBICONV_PREFIX is install prefix of
|
||||
GNU libiconv. If the argument is omitted, PREFIX (derived
|
||||
from `--prefix=PREFIX') is assumed.
|
||||
|
||||
`--with-libiconv' is shorthand option for GNU libiconv.
|
||||
|
||||
--with-libiconv=/usr/local
|
||||
|
||||
This is equivalent to:
|
||||
|
||||
--with-iconv='-L/usr/local/lib -R/usr/local/lib -liconv'
|
||||
|
||||
`--with-libiconv' assumes that your C compiler has `-R'
|
||||
option, and that the option adds the specified run-time path
|
||||
to an exacutable binary. If `-R' option of your compiler has
|
||||
different meaning, or your compiler lacks the option, you
|
||||
should use `--with-iconv' option instead. Binary command
|
||||
without run-time path information might be unexecutable.
|
||||
In that case, you would see an error message like:
|
||||
|
||||
error in loading shared libraries: libiconv.so.2: cannot
|
||||
open shared object file
|
||||
|
||||
If both `--with-libiconv' and `--with-iconv' options are
|
||||
specified, `--with-iconv' is prior to `--with-libiconv'.
|
||||
|
||||
--with-iconv=ICONV_LIBSPEC
|
||||
If your libc doens't provide iconv(), you need to specify the
|
||||
library containing iconv() with this option. `ICONV_LIBSPEC'
|
||||
is the argument(s) to `cc' or `ld' to link the library, for
|
||||
example, `--with-iconv="-L/usr/local/lib -liconv"'.
|
||||
You don't need to specify the header file directory for "iconv.h"
|
||||
to the compiler, as it isn't included directly by bind-9 with
|
||||
this patch.
|
||||
|
||||
--with-idnlib=IDN_LIBSPEC
|
||||
With this option, you can explicitly specify the argument(s)
|
||||
to `cc' or `ld' to link the idnkit's library, `libidnkit'. If
|
||||
this option is not specified, `-L${PREFIX}/lib -lidnkit' is
|
||||
assumed, where ${PREFIX} is the installation prefix specified
|
||||
with `--with-idn' option above. You may need to use this
|
||||
option to specify extra argments, for example,
|
||||
`--with-idnlib="-L/usr/local/lib -R/usr/local/lib -lidnkit"'.
|
||||
|
||||
Please consult `README' for other configuration options.
|
||||
|
||||
Note that if you want to specify some extra header file directories,
|
||||
you should use the environment variable STD_CINCLUDES instead of
|
||||
CFLAGS, as described in README.
|
||||
|
||||
2. Compilation and installation
|
||||
|
||||
After running "configure", just do
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
for compiling and installing.
|
||||
|
||||
|
||||
* Contact information
|
||||
|
||||
Please see http//www.nic.ad.jp/en/idn/ for the latest news
|
||||
about idnkit and this patch.
|
||||
|
||||
Bug reports and comments on this kit should be sent to
|
||||
mdnkit-bugs@nic.ad.jp and idn-cmt@nic.ad.jp, respectively.
|
||||
|
||||
; $Id: README.idnkit,v 1.2.2.2 2005/09/12 02:12:08 marka Exp $
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: acconfig.h,v 1.35.2.4.2.10 2004/12/04 06:50:02 marka Exp $ */
|
||||
/* $Id: acconfig.h,v 1.44.18.5 2005/04/29 00:15:20 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
/***
|
||||
*** This file is not to be included by any public header files, because
|
||||
@ -23,95 +25,97 @@
|
||||
***/
|
||||
@TOP@
|
||||
|
||||
/* define to `int' if <sys/types.h> doesn't define. */
|
||||
/** define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef ssize_t
|
||||
|
||||
/* define on DEC OSF to enable 4.4BSD style sa_len support */
|
||||
/** define on DEC OSF to enable 4.4BSD style sa_len support */
|
||||
#undef _SOCKADDR_LEN
|
||||
|
||||
/* define if your system needs pthread_init() before using pthreads */
|
||||
/** define if your system needs pthread_init() before using pthreads */
|
||||
#undef NEED_PTHREAD_INIT
|
||||
|
||||
/* define if your system has sigwait() */
|
||||
/** define if your system has sigwait() */
|
||||
#undef HAVE_SIGWAIT
|
||||
|
||||
/* define if sigwait() is the UnixWare flavor */
|
||||
/** define if sigwait() is the UnixWare flavor */
|
||||
#undef HAVE_UNIXWARE_SIGWAIT
|
||||
|
||||
/* define on Solaris to get sigwait() to work using pthreads semantics */
|
||||
/** define on Solaris to get sigwait() to work using pthreads semantics */
|
||||
#undef _POSIX_PTHREAD_SEMANTICS
|
||||
|
||||
/* define if LinuxThreads is in use */
|
||||
/** define if LinuxThreads is in use */
|
||||
#undef HAVE_LINUXTHREADS
|
||||
|
||||
/* define if sysconf() is available */
|
||||
/** define if sysconf() is available */
|
||||
#undef HAVE_SYSCONF
|
||||
|
||||
/* define if sysctlbyname() is available */
|
||||
/** define if sysctlbyname() is available */
|
||||
#undef HAVE_SYSCTLBYNAME
|
||||
|
||||
/* define if catgets() is available */
|
||||
/** define if catgets() is available */
|
||||
#undef HAVE_CATGETS
|
||||
|
||||
/* define if getifaddrs() exists */
|
||||
/** define if getifaddrs() exists */
|
||||
#undef HAVE_GETIFADDRS
|
||||
|
||||
/* define if you have the NET_RT_IFLIST sysctl variable and sys/sysctl.h */
|
||||
/** define if you have the NET_RT_IFLIST sysctl variable and sys/sysctl.h */
|
||||
#undef HAVE_IFLIST_SYSCTL
|
||||
|
||||
/* define if chroot() is available */
|
||||
/** define if chroot() is available */
|
||||
#undef HAVE_CHROOT
|
||||
|
||||
/* define if tzset() is available */
|
||||
/** define if tzset() is available */
|
||||
#undef HAVE_TZSET
|
||||
|
||||
/* define if struct addrinfo exists */
|
||||
/** define if struct addrinfo exists */
|
||||
#undef HAVE_ADDRINFO
|
||||
|
||||
/* define if getaddrinfo() exists */
|
||||
/** define if getaddrinfo() exists */
|
||||
#undef HAVE_GETADDRINFO
|
||||
|
||||
/* define if gai_strerror() exists */
|
||||
/** define if gai_strerror() exists */
|
||||
#undef HAVE_GAISTRERROR
|
||||
|
||||
/* define if arc4random() exists */
|
||||
/** define if arc4random() exists */
|
||||
#undef HAVE_ARC4RANDOM
|
||||
|
||||
/* define if pthread_setconcurrency() should be called to tell the
|
||||
/**
|
||||
* define if pthread_setconcurrency() should be called to tell the
|
||||
* OS how many threads we might want to run.
|
||||
*/
|
||||
#undef CALL_PTHREAD_SETCONCURRENCY
|
||||
|
||||
/* define if IPv6 is not disabled */
|
||||
/** define if IPv6 is not disabled */
|
||||
#undef WANT_IPV6
|
||||
|
||||
/* define if flockfile() is available */
|
||||
/** define if flockfile() is available */
|
||||
#undef HAVE_FLOCKFILE
|
||||
|
||||
/* define if getc_unlocked() is available */
|
||||
/** define if getc_unlocked() is available */
|
||||
#undef HAVE_GETCUNLOCKED
|
||||
|
||||
/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */
|
||||
/** Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */
|
||||
#undef SHUTUP_SPUTAUX
|
||||
#ifdef SHUTUP_SPUTAUX
|
||||
struct __sFILE;
|
||||
extern __inline int __sputaux(int _c, struct __sFILE *_p);
|
||||
#endif
|
||||
|
||||
/* Shut up warnings about missing sigwait prototype on BSD/OS 4.0* */
|
||||
/** Shut up warnings about missing sigwait prototype on BSD/OS 4.0* */
|
||||
#undef SHUTUP_SIGWAIT
|
||||
#ifdef SHUTUP_SIGWAIT
|
||||
int sigwait(const unsigned int *set, int *sig);
|
||||
#endif
|
||||
|
||||
/* Shut up warnings from gcc -Wcast-qual on BSD/OS 4.1. */
|
||||
/** Shut up warnings from gcc -Wcast-qual on BSD/OS 4.1. */
|
||||
#undef SHUTUP_STDARG_CAST
|
||||
#if defined(SHUTUP_STDARG_CAST) && defined(__GNUC__)
|
||||
#include <stdarg.h> /* Grr. Must be included *every time*. */
|
||||
/*
|
||||
#include <stdarg.h> /** Grr. Must be included *every time*. */
|
||||
/**
|
||||
* The silly continuation line is to keep configure from
|
||||
* commenting out the #undef.
|
||||
*/
|
||||
|
||||
#undef \
|
||||
va_start
|
||||
#define va_start(ap, last) \
|
||||
@ -120,21 +124,21 @@ int sigwait(const unsigned int *set, int *sig);
|
||||
_u.konst = &(last); \
|
||||
ap = (va_list)(_u.var + __va_words(__typeof(last))); \
|
||||
} while (0)
|
||||
#endif /* SHUTUP_STDARG_CAST && __GNUC__ */
|
||||
#endif /** SHUTUP_STDARG_CAST && __GNUC__ */
|
||||
|
||||
/* define if the system has a random number generating device */
|
||||
/** define if the system has a random number generating device */
|
||||
#undef PATH_RANDOMDEV
|
||||
|
||||
/* define if pthread_attr_getstacksize() is available */
|
||||
/** define if pthread_attr_getstacksize() is available */
|
||||
#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE
|
||||
|
||||
/* define if pthread_attr_setstacksize() is available */
|
||||
/** define if pthread_attr_setstacksize() is available */
|
||||
#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE
|
||||
|
||||
/* define if you have strerror in the C library. */
|
||||
/** define if you have strerror in the C library. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define if you are running under Compaq TruCluster. */
|
||||
/** Define if you are running under Compaq TruCluster. */
|
||||
#undef HAVE_TRUCLUSTER
|
||||
|
||||
/* Define if OpenSSL includes DSA support */
|
||||
|
@ -13,7 +13,7 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: Makefile.in,v 1.22.208.1 2004/03/06 10:21:10 marka Exp $
|
||||
# $Id: Makefile.in,v 1.23 2004/03/05 04:57:10 marka Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
@ -13,7 +13,7 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: Makefile.in,v 1.15.2.3.8.6 2004/07/20 07:01:48 marka Exp $
|
||||
# $Id: Makefile.in,v 1.24.18.6 2006/06/09 00:54:08 marka Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
@ -75,7 +75,8 @@ named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
|
||||
|
||||
named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
|
||||
named-checkzone.@O@ check-tool.@O@ ${DNSLIBS} ${ISCLIBS} ${LIBS}
|
||||
named-checkzone.@O@ check-tool.@O@ ${ISCCFGLIBS} ${DNSLIBS} \
|
||||
${ISCLIBS} ${LIBS}
|
||||
|
||||
doc man:: ${MANOBJS}
|
||||
|
||||
@ -89,7 +90,9 @@ installdirs:
|
||||
install:: named-checkconf@EXEEXT@ named-checkzone@EXEEXT@ installdirs
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkconf@EXEEXT@ ${DESTDIR}${sbindir}
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkzone@EXEEXT@ ${DESTDIR}${sbindir}
|
||||
(cd ${DESTDIR}${sbindir}; rm -f named-compilezone@EXEEXT@; ${LINK_PROGRAM} named-checkzone@EXEEXT@ named-compilezone@EXEEXT@)
|
||||
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
|
||||
(cd ${DESTDIR}${mandir}/man8; rm -f named-compilezone.8; ${LINK_PROGRAM} named-checkzone.8 named-compilezone.8)
|
||||
|
||||
clean distclean::
|
||||
rm -f ${TARGETS} r1.htm
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: check-tool.c,v 1.4.12.7 2004/11/30 01:15:40 marka Exp $ */
|
||||
/* $Id: check-tool.c,v 1.10.18.14 2006/06/08 01:43:00 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -27,6 +29,8 @@
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/netdb.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/types.h>
|
||||
@ -34,24 +38,360 @@
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/types.h>
|
||||
#include <dns/zone.h>
|
||||
|
||||
#include <isccfg/log.h>
|
||||
|
||||
#ifdef HAVE_ADDRINFO
|
||||
#ifdef HAVE_GETADDRINFO
|
||||
#ifdef HAVE_GAISTRERROR
|
||||
#define USE_GETADDRINFO
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define CHECK(r) \
|
||||
do { \
|
||||
do { \
|
||||
result = (r); \
|
||||
if (result != ISC_R_SUCCESS) \
|
||||
goto cleanup; \
|
||||
} while (0)
|
||||
if (result != ISC_R_SUCCESS) \
|
||||
goto cleanup; \
|
||||
} while (0)
|
||||
|
||||
static const char *dbtype[] = { "rbt" };
|
||||
|
||||
int debug = 0;
|
||||
isc_boolean_t nomerge = ISC_TRUE;
|
||||
isc_boolean_t docheckmx = ISC_TRUE;
|
||||
isc_boolean_t dochecksrv = ISC_TRUE;
|
||||
isc_boolean_t docheckns = ISC_TRUE;
|
||||
unsigned int zone_options = DNS_ZONEOPT_CHECKNS |
|
||||
DNS_ZONEOPT_CHECKMX |
|
||||
DNS_ZONEOPT_MANYERRORS |
|
||||
DNS_ZONEOPT_CHECKNAMES;
|
||||
DNS_ZONEOPT_CHECKNAMES |
|
||||
DNS_ZONEOPT_CHECKINTEGRITY |
|
||||
DNS_ZONEOPT_CHECKWILDCARD |
|
||||
DNS_ZONEOPT_WARNMXCNAME |
|
||||
DNS_ZONEOPT_WARNSRVCNAME;
|
||||
|
||||
/*
|
||||
* This needs to match the list in bin/named/log.c.
|
||||
*/
|
||||
static isc_logcategory_t categories[] = {
|
||||
{ "", 0 },
|
||||
{ "client", 0 },
|
||||
{ "network", 0 },
|
||||
{ "update", 0 },
|
||||
{ "queries", 0 },
|
||||
{ "unmatched", 0 },
|
||||
{ "update-security", 0 },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static isc_boolean_t
|
||||
checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner,
|
||||
dns_rdataset_t *a, dns_rdataset_t *aaaa)
|
||||
{
|
||||
#ifdef USE_GETADDRINFO
|
||||
dns_rdataset_t *rdataset;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
struct addrinfo hints, *ai, *cur;
|
||||
char namebuf[DNS_NAME_FORMATSIZE + 1];
|
||||
char ownerbuf[DNS_NAME_FORMATSIZE];
|
||||
char addrbuf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:123.123.123.123")];
|
||||
isc_boolean_t answer = ISC_TRUE;
|
||||
isc_boolean_t match;
|
||||
const char *type;
|
||||
void *ptr = NULL;
|
||||
int result;
|
||||
|
||||
REQUIRE(a == NULL || !dns_rdataset_isassociated(a) ||
|
||||
a->type == dns_rdatatype_a);
|
||||
REQUIRE(aaaa == NULL || !dns_rdataset_isassociated(aaaa) ||
|
||||
aaaa->type == dns_rdatatype_aaaa);
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_flags = AI_CANONNAME;
|
||||
hints.ai_family = PF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
hints.ai_protocol = IPPROTO_TCP;
|
||||
|
||||
dns_name_format(name, namebuf, sizeof(namebuf) - 1);
|
||||
/*
|
||||
* Turn off search.
|
||||
*/
|
||||
if (dns_name_countlabels(name) > 1U)
|
||||
strcat(namebuf, ".");
|
||||
dns_name_format(owner, ownerbuf, sizeof(ownerbuf));
|
||||
|
||||
result = getaddrinfo(namebuf, NULL, &hints, &ai);
|
||||
dns_name_format(name, namebuf, sizeof(namebuf) - 1);
|
||||
switch (result) {
|
||||
case 0:
|
||||
if (strcasecmp(ai->ai_canonname, namebuf) != 0) {
|
||||
dns_zone_log(zone, ISC_LOG_ERROR,
|
||||
"%s/NS '%s' (out of zone) "
|
||||
"is a CNAME (illegal)",
|
||||
ownerbuf, namebuf);
|
||||
/* XXX950 make fatal for 9.5.0 */
|
||||
/* answer = ISC_FALSE; */
|
||||
}
|
||||
break;
|
||||
case EAI_NONAME:
|
||||
#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
|
||||
case EAI_NODATA:
|
||||
#endif
|
||||
dns_zone_log(zone, ISC_LOG_ERROR, "%s/NS '%s' (out of zone) "
|
||||
"has no addresses records (A or AAAA)",
|
||||
ownerbuf, namebuf);
|
||||
/* XXX950 make fatal for 9.5.0 */
|
||||
return (ISC_TRUE);
|
||||
|
||||
default:
|
||||
dns_zone_log(zone, ISC_LOG_WARNING,
|
||||
"getaddrinfo(%s) failed: %s",
|
||||
namebuf, gai_strerror(result));
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
if (a == NULL || aaaa == NULL)
|
||||
return (answer);
|
||||
/*
|
||||
* Check that all glue records really exist.
|
||||
*/
|
||||
if (!dns_rdataset_isassociated(a))
|
||||
goto checkaaaa;
|
||||
result = dns_rdataset_first(a);
|
||||
while (result == ISC_R_SUCCESS) {
|
||||
dns_rdataset_current(a, &rdata);
|
||||
match = ISC_FALSE;
|
||||
for (cur = ai; cur != NULL; cur = cur->ai_next) {
|
||||
if (cur->ai_family != AF_INET)
|
||||
continue;
|
||||
ptr = &((struct sockaddr_in *)(cur->ai_addr))->sin_addr;
|
||||
if (memcmp(ptr, rdata.data, rdata.length) == 0) {
|
||||
match = ISC_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!match) {
|
||||
dns_zone_log(zone, ISC_LOG_ERROR, "%s/NS '%s' "
|
||||
"extra GLUE A record (%s)",
|
||||
ownerbuf, namebuf,
|
||||
inet_ntop(AF_INET, rdata.data,
|
||||
addrbuf, sizeof(addrbuf)));
|
||||
/* XXX950 make fatal for 9.5.0 */
|
||||
/* answer = ISC_FALSE; */
|
||||
}
|
||||
dns_rdata_reset(&rdata);
|
||||
result = dns_rdataset_next(a);
|
||||
}
|
||||
|
||||
checkaaaa:
|
||||
if (!dns_rdataset_isassociated(aaaa))
|
||||
goto checkmissing;
|
||||
result = dns_rdataset_first(aaaa);
|
||||
while (result == ISC_R_SUCCESS) {
|
||||
dns_rdataset_current(aaaa, &rdata);
|
||||
match = ISC_FALSE;
|
||||
for (cur = ai; cur != NULL; cur = cur->ai_next) {
|
||||
if (cur->ai_family != AF_INET6)
|
||||
continue;
|
||||
ptr = &((struct sockaddr_in6 *)(cur->ai_addr))->sin6_addr;
|
||||
if (memcmp(ptr, rdata.data, rdata.length) == 0) {
|
||||
match = ISC_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!match) {
|
||||
dns_zone_log(zone, ISC_LOG_ERROR, "%s/NS '%s' "
|
||||
"extra GLUE AAAA record (%s)",
|
||||
ownerbuf, namebuf,
|
||||
inet_ntop(AF_INET6, rdata.data,
|
||||
addrbuf, sizeof(addrbuf)));
|
||||
/* XXX950 make fatal for 9.5.0. */
|
||||
/* answer = ISC_FALSE; */
|
||||
}
|
||||
dns_rdata_reset(&rdata);
|
||||
result = dns_rdataset_next(aaaa);
|
||||
}
|
||||
|
||||
checkmissing:
|
||||
/*
|
||||
* Check that all addresses appear in the glue.
|
||||
*/
|
||||
for (cur = ai; cur != NULL; cur = cur->ai_next) {
|
||||
switch (cur->ai_family) {
|
||||
case AF_INET:
|
||||
rdataset = a;
|
||||
ptr = &((struct sockaddr_in *)(cur->ai_addr))->sin_addr;
|
||||
type = "A";
|
||||
break;
|
||||
case AF_INET6:
|
||||
rdataset = aaaa;
|
||||
ptr = &((struct sockaddr_in6 *)(cur->ai_addr))->sin6_addr;
|
||||
type = "AAAA";
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
match = ISC_FALSE;
|
||||
if (dns_rdataset_isassociated(rdataset))
|
||||
result = dns_rdataset_first(rdataset);
|
||||
else
|
||||
result = ISC_R_FAILURE;
|
||||
while (result == ISC_R_SUCCESS && !match) {
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
if (memcmp(ptr, rdata.data, rdata.length) == 0)
|
||||
match = ISC_TRUE;
|
||||
dns_rdata_reset(&rdata);
|
||||
result = dns_rdataset_next(rdataset);
|
||||
}
|
||||
if (!match) {
|
||||
dns_zone_log(zone, ISC_LOG_ERROR, "%s/NS '%s' "
|
||||
"missing GLUE %s record (%s)",
|
||||
ownerbuf, namebuf, type,
|
||||
inet_ntop(cur->ai_family, ptr,
|
||||
addrbuf, sizeof(addrbuf)));
|
||||
/* XXX950 make fatal for 9.5.0. */
|
||||
/* answer = ISC_FALSE; */
|
||||
}
|
||||
}
|
||||
freeaddrinfo(ai);
|
||||
return (answer);
|
||||
#else
|
||||
return (ISC_TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
static isc_boolean_t
|
||||
checkmx(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner) {
|
||||
#ifdef USE_GETADDRINFO
|
||||
struct addrinfo hints, *ai;
|
||||
char namebuf[DNS_NAME_FORMATSIZE + 1];
|
||||
char ownerbuf[DNS_NAME_FORMATSIZE];
|
||||
int result;
|
||||
int level = ISC_LOG_ERROR;
|
||||
isc_boolean_t answer = ISC_TRUE;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_flags = AI_CANONNAME;
|
||||
hints.ai_family = PF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
hints.ai_protocol = IPPROTO_TCP;
|
||||
|
||||
dns_name_format(name, namebuf, sizeof(namebuf) - 1);
|
||||
/*
|
||||
* Turn off search.
|
||||
*/
|
||||
if (dns_name_countlabels(name) > 1U)
|
||||
strcat(namebuf, ".");
|
||||
dns_name_format(owner, ownerbuf, sizeof(ownerbuf));
|
||||
|
||||
result = getaddrinfo(namebuf, NULL, &hints, &ai);
|
||||
dns_name_format(name, namebuf, sizeof(namebuf) - 1);
|
||||
switch (result) {
|
||||
case 0:
|
||||
if (strcasecmp(ai->ai_canonname, namebuf) != 0) {
|
||||
if ((zone_options & DNS_ZONEOPT_WARNMXCNAME) != 0)
|
||||
level = ISC_LOG_WARNING;
|
||||
if ((zone_options & DNS_ZONEOPT_IGNOREMXCNAME) == 0) {
|
||||
dns_zone_log(zone, ISC_LOG_WARNING,
|
||||
"%s/MX '%s' (out of zone) "
|
||||
"is a CNAME (illegal)",
|
||||
ownerbuf, namebuf);
|
||||
if (level == ISC_LOG_ERROR)
|
||||
answer = ISC_FALSE;
|
||||
}
|
||||
}
|
||||
freeaddrinfo(ai);
|
||||
return (answer);
|
||||
|
||||
case EAI_NONAME:
|
||||
#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
|
||||
case EAI_NODATA:
|
||||
#endif
|
||||
dns_zone_log(zone, ISC_LOG_ERROR, "%s/MX '%s' (out of zone) "
|
||||
"has no addresses records (A or AAAA)",
|
||||
ownerbuf, namebuf);
|
||||
/* XXX950 make fatal for 9.5.0. */
|
||||
return (ISC_TRUE);
|
||||
|
||||
default:
|
||||
dns_zone_log(zone, ISC_LOG_WARNING,
|
||||
"getaddrinfo(%s) failed: %s",
|
||||
namebuf, gai_strerror(result));
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
#else
|
||||
return (ISC_TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
static isc_boolean_t
|
||||
checksrv(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner) {
|
||||
#ifdef USE_GETADDRINFO
|
||||
struct addrinfo hints, *ai;
|
||||
char namebuf[DNS_NAME_FORMATSIZE + 1];
|
||||
char ownerbuf[DNS_NAME_FORMATSIZE];
|
||||
int result;
|
||||
int level = ISC_LOG_ERROR;
|
||||
isc_boolean_t answer = ISC_TRUE;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_flags = AI_CANONNAME;
|
||||
hints.ai_family = PF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
hints.ai_protocol = IPPROTO_TCP;
|
||||
|
||||
dns_name_format(name, namebuf, sizeof(namebuf) - 1);
|
||||
/*
|
||||
* Turn off search.
|
||||
*/
|
||||
if (dns_name_countlabels(name) > 1U)
|
||||
strcat(namebuf, ".");
|
||||
dns_name_format(owner, ownerbuf, sizeof(ownerbuf));
|
||||
|
||||
result = getaddrinfo(namebuf, NULL, &hints, &ai);
|
||||
dns_name_format(name, namebuf, sizeof(namebuf) - 1);
|
||||
switch (result) {
|
||||
case 0:
|
||||
if (strcasecmp(ai->ai_canonname, namebuf) != 0) {
|
||||
if ((zone_options & DNS_ZONEOPT_WARNSRVCNAME) != 0)
|
||||
level = ISC_LOG_WARNING;
|
||||
if ((zone_options & DNS_ZONEOPT_IGNORESRVCNAME) == 0) {
|
||||
dns_zone_log(zone, level,
|
||||
"%s/SRV '%s' (out of zone) "
|
||||
"is a CNAME (illegal)",
|
||||
ownerbuf, namebuf);
|
||||
if (level == ISC_LOG_ERROR)
|
||||
answer = ISC_FALSE;
|
||||
}
|
||||
}
|
||||
freeaddrinfo(ai);
|
||||
return (answer);
|
||||
|
||||
case EAI_NONAME:
|
||||
#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
|
||||
case EAI_NODATA:
|
||||
#endif
|
||||
dns_zone_log(zone, ISC_LOG_ERROR, "%s/SRV '%s' (out of zone) "
|
||||
"has no addresses records (A or AAAA)",
|
||||
ownerbuf, namebuf);
|
||||
/* XXX950 make fatal for 9.5.0. */
|
||||
return (ISC_TRUE);
|
||||
|
||||
default:
|
||||
dns_zone_log(zone, ISC_LOG_WARNING,
|
||||
"getaddrinfo(%s) failed: %s",
|
||||
namebuf, gai_strerror(result));
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
#else
|
||||
return (ISC_TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
setup_logging(isc_mem_t *mctx, isc_log_t **logp) {
|
||||
@ -60,7 +400,11 @@ setup_logging(isc_mem_t *mctx, isc_log_t **logp) {
|
||||
isc_log_t *log = NULL;
|
||||
|
||||
RUNTIME_CHECK(isc_log_create(mctx, &log, &logconfig) == ISC_R_SUCCESS);
|
||||
isc_log_registercategories(log, categories);
|
||||
isc_log_setcontext(log);
|
||||
dns_log_init(log);
|
||||
dns_log_setcontext(log);
|
||||
cfg_log_init(log);
|
||||
|
||||
destination.file.stream = stdout;
|
||||
destination.file.name = NULL;
|
||||
@ -77,9 +421,11 @@ setup_logging(isc_mem_t *mctx, isc_log_t **logp) {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*% load the zone */
|
||||
isc_result_t
|
||||
load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
const char *classname, dns_zone_t **zonep)
|
||||
dns_masterformat_t fileformat, const char *classname,
|
||||
dns_zone_t **zonep)
|
||||
{
|
||||
isc_result_t result;
|
||||
dns_rdataclass_t rdclass;
|
||||
@ -104,10 +450,10 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
dns_fixedname_init(&fixorigin);
|
||||
origin = dns_fixedname_name(&fixorigin);
|
||||
CHECK(dns_name_fromtext(origin, &buffer, dns_rootname,
|
||||
ISC_FALSE, NULL));
|
||||
ISC_FALSE, NULL));
|
||||
CHECK(dns_zone_setorigin(zone, origin));
|
||||
CHECK(dns_zone_setdbtype(zone, 1, (const char * const *) dbtype));
|
||||
CHECK(dns_zone_setfile(zone, filename));
|
||||
CHECK(dns_zone_setfile2(zone, filename, fileformat));
|
||||
|
||||
DE_CONST(classname, region.base);
|
||||
region.length = strlen(classname);
|
||||
@ -116,9 +462,15 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
dns_zone_setclass(zone, rdclass);
|
||||
dns_zone_setoption(zone, zone_options, ISC_TRUE);
|
||||
dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
|
||||
if (docheckmx)
|
||||
dns_zone_setcheckmx(zone, checkmx);
|
||||
if (docheckns)
|
||||
dns_zone_setcheckns(zone, checkns);
|
||||
if (dochecksrv)
|
||||
dns_zone_setchecksrv(zone, checksrv);
|
||||
|
||||
CHECK(dns_zone_load(zone));
|
||||
if (zonep != NULL){
|
||||
if (zonep != NULL) {
|
||||
*zonep = zone;
|
||||
zone = NULL;
|
||||
}
|
||||
@ -129,8 +481,10 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*% dump the zone */
|
||||
isc_result_t
|
||||
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename)
|
||||
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
|
||||
dns_masterformat_t fileformat, const dns_master_style_t *style)
|
||||
{
|
||||
isc_result_t result;
|
||||
FILE *output = stdout;
|
||||
@ -153,7 +507,7 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename)
|
||||
}
|
||||
}
|
||||
|
||||
result = dns_zone_fulldumptostream(zone, output);
|
||||
result = dns_zone_dumptostream2(zone, output, fileformat, style);
|
||||
|
||||
if (filename != NULL)
|
||||
(void)isc_stdio_close(output);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,14 +15,17 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: check-tool.h,v 1.2.12.5 2004/03/08 04:04:13 marka Exp $ */
|
||||
/* $Id: check-tool.h,v 1.7.18.4 2005/06/20 01:19:25 marka Exp $ */
|
||||
|
||||
#ifndef CHECK_TOOL_H
|
||||
#define CHECK_TOOL_H
|
||||
|
||||
#include <isc/lang.h>
|
||||
/*! \file */
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <dns/masterdump.h>
|
||||
#include <dns/types.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
@ -32,13 +35,18 @@ setup_logging(isc_mem_t *mctx, isc_log_t **logp);
|
||||
|
||||
isc_result_t
|
||||
load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
const char *classname, dns_zone_t **zonep);
|
||||
dns_masterformat_t fileformat, const char *classname,
|
||||
dns_zone_t **zonep);
|
||||
|
||||
isc_result_t
|
||||
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename);
|
||||
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
|
||||
dns_masterformat_t fileformat, const dns_master_style_t *style);
|
||||
|
||||
extern int debug;
|
||||
extern isc_boolean_t nomerge;
|
||||
extern isc_boolean_t docheckmx;
|
||||
extern isc_boolean_t docheckns;
|
||||
extern isc_boolean_t dochecksrv;
|
||||
extern unsigned int zone_options;
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
@ -13,13 +13,13 @@
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" $Id: named-checkconf.8,v 1.11.12.8 2006/06/29 13:02:30 marka Exp $
|
||||
.\" $Id: named-checkconf.8,v 1.16.18.11 2007/01/30 00:23:44 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: named\-checkconf
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: June 14, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
@ -39,27 +39,37 @@ named\-checkconf \- named configuration file syntax checking tool
|
||||
\fBnamed\-checkconf\fR
|
||||
checks the syntax, but not the semantics, of a named configuration file.
|
||||
.SH "OPTIONS"
|
||||
.TP 3n
|
||||
.PP
|
||||
\-t \fIdirectory\fR
|
||||
.RS 4
|
||||
chroot to
|
||||
\fIdirectory\fR
|
||||
so that include directives in the configuration file are processed as if run by a similarly chrooted named.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-v
|
||||
.RS 4
|
||||
Print the version of the
|
||||
\fBnamed\-checkconf\fR
|
||||
program and exit.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-z
|
||||
.RS 4
|
||||
Perform a check load the master zonefiles found in
|
||||
\fInamed.conf\fR.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-j
|
||||
.RS 4
|
||||
When loading a zonefile read the journal if it exists.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
filename
|
||||
.RS 4
|
||||
The name of the configuration file to be checked. If not specified, it defaults to
|
||||
\fI/etc/named.conf\fR.
|
||||
.RE
|
||||
.SH "RETURN VALUES"
|
||||
.PP
|
||||
\fBnamed\-checkconf\fR
|
||||
@ -72,4 +82,7 @@ BIND 9 Administrator Reference Manual.
|
||||
.PP
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
Copyright \(co 2000\-2002 Internet Software Consortium.
|
||||
.br
|
||||
|
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: named-checkconf.c,v 1.12.12.11 2006/03/02 00:37:20 marka Exp $ */
|
||||
/* $Id: named-checkconf.c,v 1.28.18.14 2006/02/28 03:10:47 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -39,7 +41,9 @@
|
||||
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/zone.h>
|
||||
|
||||
#include "check-tool.h"
|
||||
|
||||
@ -52,6 +56,7 @@ isc_log_t *logc = NULL;
|
||||
goto cleanup; \
|
||||
} while (0)
|
||||
|
||||
/*% usage */
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr, "usage: named-checkconf [-j] [-v] [-z] [-t directory] "
|
||||
@ -59,6 +64,7 @@ usage(void) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/*% directory callback */
|
||||
static isc_result_t
|
||||
directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
|
||||
isc_result_t result;
|
||||
@ -84,19 +90,84 @@ directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_boolean_t
|
||||
get_maps(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
|
||||
int i;
|
||||
for (i = 0;; i++) {
|
||||
if (maps[i] == NULL)
|
||||
return (ISC_FALSE);
|
||||
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
static isc_boolean_t
|
||||
get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
|
||||
const cfg_listelt_t *element;
|
||||
const cfg_obj_t *checknames;
|
||||
const cfg_obj_t *type;
|
||||
const cfg_obj_t *value;
|
||||
isc_result_t result;
|
||||
int i;
|
||||
|
||||
for (i = 0;; i++) {
|
||||
if (maps[i] == NULL)
|
||||
return (ISC_FALSE);
|
||||
checknames = NULL;
|
||||
result = cfg_map_get(maps[i], "check-names", &checknames);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
continue;
|
||||
if (checknames != NULL && !cfg_obj_islist(checknames)) {
|
||||
*obj = checknames;
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
for (element = cfg_list_first(checknames);
|
||||
element != NULL;
|
||||
element = cfg_list_next(element)) {
|
||||
value = cfg_listelt_value(element);
|
||||
type = cfg_tuple_get(value, "type");
|
||||
if (strcasecmp(cfg_obj_asstring(type), "master") != 0)
|
||||
continue;
|
||||
*obj = cfg_tuple_get(value, "mode");
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
config_get(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
|
||||
int i;
|
||||
|
||||
for (i = 0;; i++) {
|
||||
if (maps[i] == NULL)
|
||||
return (ISC_R_NOTFOUND);
|
||||
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
/*% configure the zone */
|
||||
static isc_result_t
|
||||
configure_zone(const char *vclass, const char *view,
|
||||
const cfg_obj_t *zconfig, isc_mem_t *mctx)
|
||||
const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
|
||||
const cfg_obj_t *config, isc_mem_t *mctx)
|
||||
{
|
||||
int i = 0;
|
||||
isc_result_t result;
|
||||
const char *zclass;
|
||||
const char *zname;
|
||||
const char *zfile;
|
||||
const cfg_obj_t *maps[4];
|
||||
const cfg_obj_t *zoptions = NULL;
|
||||
const cfg_obj_t *classobj = NULL;
|
||||
const cfg_obj_t *typeobj = NULL;
|
||||
const cfg_obj_t *fileobj = NULL;
|
||||
const cfg_obj_t *dbobj = NULL;
|
||||
const cfg_obj_t *obj = NULL;
|
||||
const cfg_obj_t *fmtobj = NULL;
|
||||
dns_masterformat_t masterformat;
|
||||
|
||||
zone_options = DNS_ZONEOPT_CHECKNS | DNS_ZONEOPT_MANYERRORS;
|
||||
|
||||
zname = cfg_obj_asstring(cfg_tuple_get(zconfig, "name"));
|
||||
classobj = cfg_tuple_get(zconfig, "class");
|
||||
@ -104,7 +175,18 @@ configure_zone(const char *vclass, const char *view,
|
||||
zclass = vclass;
|
||||
else
|
||||
zclass = cfg_obj_asstring(classobj);
|
||||
|
||||
zoptions = cfg_tuple_get(zconfig, "options");
|
||||
maps[i++] = zoptions;
|
||||
if (vconfig != NULL)
|
||||
maps[i++] = cfg_tuple_get(vconfig, "options");
|
||||
if (config != NULL) {
|
||||
cfg_map_get(config, "options", &obj);
|
||||
if (obj != NULL)
|
||||
maps[i++] = obj;
|
||||
}
|
||||
maps[i++] = NULL;
|
||||
|
||||
cfg_map_get(zoptions, "type", &typeobj);
|
||||
if (typeobj == NULL)
|
||||
return (ISC_R_FAILURE);
|
||||
@ -117,13 +199,116 @@ configure_zone(const char *vclass, const char *view,
|
||||
if (fileobj == NULL)
|
||||
return (ISC_R_FAILURE);
|
||||
zfile = cfg_obj_asstring(fileobj);
|
||||
result = load_zone(mctx, zname, zfile, zclass, NULL);
|
||||
|
||||
obj = NULL;
|
||||
if (get_maps(maps, "check-mx", &obj)) {
|
||||
if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKMX;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "fail") == 0) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKMX;
|
||||
zone_options |= DNS_ZONEOPT_CHECKMXFAIL;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKMX;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
|
||||
} else
|
||||
INSIST(0);
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKMX;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
if (get_maps(maps, "check-integrity", &obj)) {
|
||||
if (cfg_obj_asboolean(obj))
|
||||
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
|
||||
else
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKINTEGRITY;
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
if (get_maps(maps, "check-mx-cname", &obj)) {
|
||||
if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
|
||||
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNOREMXCNAME;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "fail") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_WARNMXCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNOREMXCNAME;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
||||
zone_options |= DNS_ZONEOPT_IGNOREMXCNAME;
|
||||
} else
|
||||
INSIST(0);
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNOREMXCNAME;
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
if (get_maps(maps, "check-srv-cname", &obj)) {
|
||||
if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
|
||||
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNORESRVCNAME;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "fail") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_WARNSRVCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNORESRVCNAME;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
||||
zone_options |= DNS_ZONEOPT_IGNORESRVCNAME;
|
||||
} else
|
||||
INSIST(0);
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNORESRVCNAME;
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
if (get_maps(maps, "check-sibling", &obj)) {
|
||||
if (cfg_obj_asboolean(obj))
|
||||
zone_options |= DNS_ZONEOPT_CHECKSIBLING;
|
||||
else
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
if (get_checknames(maps, &obj)) {
|
||||
if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMES;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "fail") == 0) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMES;
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKNAMES;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
} else
|
||||
INSIST(0);
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMES;
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
}
|
||||
|
||||
masterformat = dns_masterformat_text;
|
||||
fmtobj = NULL;
|
||||
result = config_get(maps, "masterfile-format", &fmtobj);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
const char *masterformatstr = cfg_obj_asstring(fmtobj);
|
||||
if (strcasecmp(masterformatstr, "text") == 0)
|
||||
masterformat = dns_masterformat_text;
|
||||
else if (strcasecmp(masterformatstr, "raw") == 0)
|
||||
masterformat = dns_masterformat_raw;
|
||||
else
|
||||
INSIST(0);
|
||||
}
|
||||
|
||||
result = load_zone(mctx, zname, zfile, masterformat, zclass, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fprintf(stderr, "%s/%s/%s: %s\n", view, zname, zclass,
|
||||
dns_result_totext(result));
|
||||
return(result);
|
||||
}
|
||||
|
||||
/*% configure a view */
|
||||
static isc_result_t
|
||||
configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
|
||||
const cfg_obj_t *vconfig, isc_mem_t *mctx)
|
||||
@ -149,7 +334,8 @@ configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
|
||||
element = cfg_list_next(element))
|
||||
{
|
||||
const cfg_obj_t *zconfig = cfg_listelt_value(element);
|
||||
tresult = configure_zone(vclass, view, zconfig, mctx);
|
||||
tresult = configure_zone(vclass, view, zconfig, vconfig,
|
||||
config, mctx);
|
||||
if (tresult != ISC_R_SUCCESS)
|
||||
result = tresult;
|
||||
}
|
||||
@ -157,6 +343,7 @@ configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
|
||||
}
|
||||
|
||||
|
||||
/*% load zones from the configuration */
|
||||
static isc_result_t
|
||||
load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx) {
|
||||
const cfg_listelt_t *element;
|
||||
@ -197,6 +384,7 @@ load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx) {
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*% The main processing routine */
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
int c;
|
||||
@ -240,6 +428,9 @@ main(int argc, char **argv) {
|
||||
|
||||
case 'z':
|
||||
load_zones = ISC_TRUE;
|
||||
docheckmx = ISC_FALSE;
|
||||
docheckns = ISC_FALSE;
|
||||
dochecksrv = ISC_FALSE;
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -275,8 +466,6 @@ main(int argc, char **argv) {
|
||||
exit_status = 1;
|
||||
|
||||
if (result == ISC_R_SUCCESS && load_zones) {
|
||||
dns_log_init(logc);
|
||||
dns_log_setcontext(logc);
|
||||
result = load_zones_fromconfig(config, mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
exit_status = 1;
|
||||
@ -286,6 +475,8 @@ main(int argc, char **argv) {
|
||||
|
||||
cfg_parser_destroy(&parser);
|
||||
|
||||
dns_name_destroy();
|
||||
|
||||
isc_log_destroy(&logc);
|
||||
|
||||
isc_hash_destroy();
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@ -18,9 +18,8 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: named-checkconf.docbook,v 1.3.2.1.8.7 2005/05/12 21:35:56 sra Exp $ -->
|
||||
|
||||
<refentry>
|
||||
<!-- $Id: named-checkconf.docbook,v 1.8.18.7 2007/01/29 23:57:20 marka Exp $ -->
|
||||
<refentry id="man.named-checkconf">
|
||||
<refentryinfo>
|
||||
<date>June 14, 2000</date>
|
||||
</refentryinfo>
|
||||
@ -35,6 +34,7 @@
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<year>2007</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
@ -63,9 +63,9 @@
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<command>named-checkconf</command> checks the syntax, but not
|
||||
the semantics, of a named configuration file.
|
||||
<para><command>named-checkconf</command>
|
||||
checks the syntax, but not the semantics, of a named
|
||||
configuration file.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
@ -75,52 +75,53 @@
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-t <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
chroot to <filename>directory</filename> so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
chroot to <filename>directory</filename> so that
|
||||
include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print the version of the <command>named-checkconf</command>
|
||||
program and exit.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Print the version of the <command>named-checkconf</command>
|
||||
program and exit.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-z</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Perform a check load the master zonefiles found in
|
||||
<filename>named.conf</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Perform a check load the master zonefiles found in
|
||||
<filename>named.conf</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-j</term>
|
||||
<listitem>
|
||||
<para>
|
||||
When loading a zonefile read the journal if it exists.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
When loading a zonefile read the journal if it exists.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>filename</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the configuration file to be checked. If not
|
||||
specified, it defaults to <filename>/etc/named.conf</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the configuration file to be checked. If not
|
||||
specified, it defaults to <filename>/etc/named.conf</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
@ -129,18 +130,16 @@
|
||||
|
||||
<refsect1>
|
||||
<title>RETURN VALUES</title>
|
||||
<para>
|
||||
<command>named-checkconf</command> returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
<para><command>named-checkconf</command>
|
||||
returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>named</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<para><citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
</para>
|
||||
@ -148,16 +147,12 @@
|
||||
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
<para>
|
||||
<corpauthor>Internet Systems Consortium</corpauthor>
|
||||
<para><corpauthor>Internet Systems Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!--
|
||||
</refentry><!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@ -14,15 +14,15 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: named-checkconf.html,v 1.5.2.1.4.15 2006/06/29 13:02:30 marka Exp $ -->
|
||||
<!-- $Id: named-checkconf.html,v 1.9.18.18 2007/01/30 00:23:44 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>named-checkconf</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482688"></a><div class="titlepage"></div>
|
||||
<a name="man.named-checkconf"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p><span class="application">named-checkconf</span> — named configuration file syntax checking tool</p>
|
||||
@ -32,60 +32,59 @@
|
||||
<div class="cmdsynopsis"><p><code class="command">named-checkconf</code> [<code class="option">-v</code>] [<code class="option">-j</code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] {filename} [<code class="option">-z</code>]</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549430"></a><h2>DESCRIPTION</h2>
|
||||
<p>
|
||||
<span><strong class="command">named-checkconf</strong></span> checks the syntax, but not
|
||||
the semantics, of a named configuration file.
|
||||
<a name="id2543383"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">named-checkconf</strong></span>
|
||||
checks the syntax, but not the semantics, of a named
|
||||
configuration file.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549443"></a><h2>OPTIONS</h2>
|
||||
<a name="id2543395"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd><p>
|
||||
chroot to <code class="filename">directory</code> so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
</p></dd>
|
||||
chroot to <code class="filename">directory</code> so that
|
||||
include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
</p></dd>
|
||||
<dt><span class="term">-v</span></dt>
|
||||
<dd><p>
|
||||
Print the version of the <span><strong class="command">named-checkconf</strong></span>
|
||||
program and exit.
|
||||
</p></dd>
|
||||
Print the version of the <span><strong class="command">named-checkconf</strong></span>
|
||||
program and exit.
|
||||
</p></dd>
|
||||
<dt><span class="term">-z</span></dt>
|
||||
<dd><p>
|
||||
Perform a check load the master zonefiles found in
|
||||
<code class="filename">named.conf</code>.
|
||||
</p></dd>
|
||||
Perform a check load the master zonefiles found in
|
||||
<code class="filename">named.conf</code>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-j</span></dt>
|
||||
<dd><p>
|
||||
When loading a zonefile read the journal if it exists.
|
||||
</p></dd>
|
||||
When loading a zonefile read the journal if it exists.
|
||||
</p></dd>
|
||||
<dt><span class="term">filename</span></dt>
|
||||
<dd><p>
|
||||
The name of the configuration file to be checked. If not
|
||||
specified, it defaults to <code class="filename">/etc/named.conf</code>.
|
||||
</p></dd>
|
||||
The name of the configuration file to be checked. If not
|
||||
specified, it defaults to <code class="filename">/etc/named.conf</code>.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549534"></a><h2>RETURN VALUES</h2>
|
||||
<p>
|
||||
<span><strong class="command">named-checkconf</strong></span> returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
<a name="id2543488"></a><h2>RETURN VALUES</h2>
|
||||
<p><span><strong class="command">named-checkconf</strong></span>
|
||||
returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549547"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
|
||||
<a name="id2543499"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549639"></a><h2>AUTHOR</h2>
|
||||
<p>
|
||||
<span class="corpauthor">Internet Systems Consortium</span>
|
||||
<a name="id2543521"></a><h2>AUTHOR</h2>
|
||||
<p><span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
@ -13,13 +13,13 @@
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" $Id: named-checkzone.8,v 1.11.2.1.8.11 2006/10/05 02:50:17 marka Exp $
|
||||
.\" $Id: named-checkzone.8,v 1.18.18.20 2007/01/30 00:23:44 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: named\-checkzone
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: June 13, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
@ -30,10 +30,12 @@
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.SH "NAME"
|
||||
named\-checkzone \- zone file validity checking tool
|
||||
named\-checkzone, named\-compilezone \- zone file validity checking or converting tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP 16
|
||||
\fBnamed\-checkzone\fR [\fB\-d\fR] [\fB\-j\fR] [\fB\-q\fR] [\fB\-v\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-k\ \fR\fB\fImode\fR\fR] [\fB\-n\ \fR\fB\fImode\fR\fR] [\fB\-o\ \fR\fB\fIfilename\fR\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] [\fB\-w\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] {zonename} {filename}
|
||||
\fBnamed\-checkzone\fR [\fB\-d\fR] [\fB\-j\fR] [\fB\-q\fR] [\fB\-v\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-f\ \fR\fB\fIformat\fR\fR] [\fB\-F\ \fR\fB\fIformat\fR\fR] [\fB\-i\ \fR\fB\fImode\fR\fR] [\fB\-k\ \fR\fB\fImode\fR\fR] [\fB\-m\ \fR\fB\fImode\fR\fR] [\fB\-M\ \fR\fB\fImode\fR\fR] [\fB\-n\ \fR\fB\fImode\fR\fR] [\fB\-o\ \fR\fB\fIfilename\fR\fR] [\fB\-s\ \fR\fB\fIstyle\fR\fR] [\fB\-S\ \fR\fB\fImode\fR\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] [\fB\-w\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-W\ \fR\fB\fImode\fR\fR] {zonename} {filename}
|
||||
.HP 18
|
||||
\fBnamed\-compilezone\fR [\fB\-d\fR] [\fB\-j\fR] [\fB\-q\fR] [\fB\-v\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-C\ \fR\fB\fImode\fR\fR] [\fB\-f\ \fR\fB\fIformat\fR\fR] [\fB\-F\ \fR\fB\fIformat\fR\fR] [\fB\-i\ \fR\fB\fImode\fR\fR] [\fB\-k\ \fR\fB\fImode\fR\fR] [\fB\-m\ \fR\fB\fImode\fR\fR] [\fB\-n\ \fR\fB\fImode\fR\fR] [\fB\-o\ \fR\fB\fIfilename\fR\fR] [\fB\-s\ \fR\fB\fIstyle\fR\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] [\fB\-w\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-W\ \fR\fB\fImode\fR\fR] {zonename} {filename}
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBnamed\-checkzone\fR
|
||||
@ -42,64 +44,211 @@ checks the syntax and integrity of a zone file. It performs the same checks as
|
||||
does when loading a zone. This makes
|
||||
\fBnamed\-checkzone\fR
|
||||
useful for checking zone files before configuring them into a name server.
|
||||
.PP
|
||||
\fBnamed\-compilezone\fR
|
||||
is similar to
|
||||
\fBnamed\-checkzone\fR, but it always dumps the zone contents to a specified file in a specified format. Additionally, it applies stricter check levels by default, since the dump output will be used as an actual zone file loaded by
|
||||
\fBnamed\fR. When manaully specified otherwise, the check levels must at least be as strict as those specified in the
|
||||
\fBnamed\fR
|
||||
configuration file.
|
||||
.SH "OPTIONS"
|
||||
.TP 3n
|
||||
.PP
|
||||
\-d
|
||||
.RS 4
|
||||
Enable debugging.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-q
|
||||
.RS 4
|
||||
Quiet mode \- exit code only.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-v
|
||||
.RS 4
|
||||
Print the version of the
|
||||
\fBnamed\-checkzone\fR
|
||||
program and exit.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-j
|
||||
.RS 4
|
||||
When loading the zone file read the journal if it exists.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-c \fIclass\fR
|
||||
.RS 4
|
||||
Specify the class of the zone. If not specified "IN" is assumed.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-i \fImode\fR
|
||||
.RS 4
|
||||
Perform post load zone integrity checks. Possible modes are
|
||||
\fB"full"\fR
|
||||
(default),
|
||||
\fB"full\-sibling"\fR,
|
||||
\fB"local"\fR,
|
||||
\fB"local\-sibling"\fR
|
||||
and
|
||||
\fB"none"\fR.
|
||||
.sp
|
||||
Mode
|
||||
\fB"full"\fR
|
||||
checks that MX records refer to A or AAAA record (both in\-zone and out\-of\-zone hostnames). Mode
|
||||
\fB"local"\fR
|
||||
only checks MX records which refer to in\-zone hostnames.
|
||||
.sp
|
||||
Mode
|
||||
\fB"full"\fR
|
||||
checks that SRV records refer to A or AAAA record (both in\-zone and out\-of\-zone hostnames). Mode
|
||||
\fB"local"\fR
|
||||
only checks SRV records which refer to in\-zone hostnames.
|
||||
.sp
|
||||
Mode
|
||||
\fB"full"\fR
|
||||
checks that delegation NS records refer to A or AAAA record (both in\-zone and out\-of\-zone hostnames). It also checks that glue addresses records in the zone match those advertised by the child. Mode
|
||||
\fB"local"\fR
|
||||
only checks NS records which refer to in\-zone hostnames or that some required glue exists, that is when the nameserver is in a child zone.
|
||||
.sp
|
||||
Mode
|
||||
\fB"full\-sibling"\fR
|
||||
and
|
||||
\fB"local\-sibling"\fR
|
||||
disable sibling glue checks but are otherwise the same as
|
||||
\fB"full"\fR
|
||||
and
|
||||
\fB"local"\fR
|
||||
respectively.
|
||||
.sp
|
||||
Mode
|
||||
\fB"none"\fR
|
||||
disables the checks.
|
||||
.RE
|
||||
.PP
|
||||
\-f \fIformat\fR
|
||||
.RS 4
|
||||
Specify the format of the zone file. Possible formats are
|
||||
\fB"text"\fR
|
||||
(default) and
|
||||
\fB"raw"\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-F \fIformat\fR
|
||||
.RS 4
|
||||
Specify the format of the output file specified. Possible formats are
|
||||
\fB"text"\fR
|
||||
(default) and
|
||||
\fB"raw"\fR. For
|
||||
\fBnamed\-checkzone\fR, this does not cause any effects unless it dumps the zone contents.
|
||||
.RE
|
||||
.PP
|
||||
\-k \fImode\fR
|
||||
.RS 4
|
||||
Perform
|
||||
\fB"check\-names"\fR
|
||||
checks with the specified failure mode. Possible modes are
|
||||
\fB"fail"\fR
|
||||
(default for
|
||||
\fBnamed\-compilezone\fR),
|
||||
\fB"warn"\fR
|
||||
(default for
|
||||
\fBnamed\-checkzone\fR) and
|
||||
\fB"ignore"\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-m \fImode\fR
|
||||
.RS 4
|
||||
Specify whether MX records should be checked to see if they are addresses. Possible modes are
|
||||
\fB"fail"\fR,
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
\fB"ignore"\fR.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-M \fImode\fR
|
||||
.RS 4
|
||||
Check if a MX record refers to a CNAME. Possible modes are
|
||||
\fB"fail"\fR,
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
\fB"ignore"\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-n \fImode\fR
|
||||
.RS 4
|
||||
Specify whether NS records should be checked to see if they are addresses. Possible modes are
|
||||
\fB"fail"\fR
|
||||
(default for
|
||||
\fBnamed\-compilezone\fR),
|
||||
\fB"warn"\fR
|
||||
(default for
|
||||
\fBnamed\-checkzone\fR) and
|
||||
\fB"ignore"\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-o \fIfilename\fR
|
||||
.RS 4
|
||||
Write zone output to
|
||||
\fIfilename\fR. This is mandatory for
|
||||
\fBnamed\-compilezone\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-s \fIstyle\fR
|
||||
.RS 4
|
||||
Specify the style of the dumped zone file. Possible styles are
|
||||
\fB"full"\fR
|
||||
(default) and
|
||||
\fB"relative"\fR. The full format is most suitable for processing automatically by a separate script. On the other hand, the relative format is more human\-readable and is thus suitable for editing by hand. For
|
||||
\fBnamed\-checkzone\fR
|
||||
this does not cause any effects unless it dumps the zone contents. It also does not have any meaning if the output format is not text.
|
||||
.RE
|
||||
.PP
|
||||
\-S \fImode\fR
|
||||
.RS 4
|
||||
Check if a SRV record refers to a CNAME. Possible modes are
|
||||
\fB"fail"\fR,
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
\fB"ignore"\fR.
|
||||
.TP 3n
|
||||
\-o \fIfilename\fR
|
||||
Write zone output to
|
||||
\fIfilename\fR.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-t \fIdirectory\fR
|
||||
.RS 4
|
||||
chroot to
|
||||
\fIdirectory\fR
|
||||
so that include directives in the configuration file are processed as if run by a similarly chrooted named.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-w \fIdirectory\fR
|
||||
.RS 4
|
||||
chdir to
|
||||
\fIdirectory\fR
|
||||
so that relative filenames in master file $INCLUDE directives work. This is similar to the directory clause in
|
||||
\fInamed.conf\fR.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-D
|
||||
Dump zone file in canonical format.
|
||||
.TP 3n
|
||||
.RS 4
|
||||
Dump zone file in canonical format. This is always enabled for
|
||||
\fBnamed\-compilezone\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-W \fImode\fR
|
||||
.RS 4
|
||||
Specify whether to check for non\-terminal wildcards. Non\-terminal wildcards are almost always the result of a failure to understand the wildcard matching algorithm (RFC 1034). Possible modes are
|
||||
\fB"warn"\fR
|
||||
(default) and
|
||||
\fB"ignore"\fR.
|
||||
.RE
|
||||
.PP
|
||||
zonename
|
||||
.RS 4
|
||||
The domain name of the zone being checked.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
filename
|
||||
.RS 4
|
||||
The name of the zone file.
|
||||
.RE
|
||||
.SH "RETURN VALUES"
|
||||
.PP
|
||||
\fBnamed\-checkzone\fR
|
||||
@ -113,4 +262,7 @@ BIND 9 Administrator Reference Manual.
|
||||
.PP
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004\-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2004\-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
Copyright \(co 2000\-2002 Internet Software Consortium.
|
||||
.br
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: named-checkzone.c,v 1.13.2.3.8.11 2004/10/25 01:36:06 marka Exp $ */
|
||||
/* $Id: named-checkzone.c,v 1.29.18.16 2006/10/05 05:24:35 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -37,9 +39,12 @@
|
||||
#include <dns/db.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/masterdump.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/types.h>
|
||||
#include <dns/zone.h>
|
||||
|
||||
#include "check-tool.h"
|
||||
@ -51,6 +56,9 @@ dns_zone_t *zone = NULL;
|
||||
dns_zonetype_t zonetype = dns_zone_master;
|
||||
static int dumpzone = 0;
|
||||
static const char *output_filename;
|
||||
static char *prog_name = NULL;
|
||||
static const dns_master_style_t *outputstyle = NULL;
|
||||
static enum { progmode_check, progmode_compile } progmode;
|
||||
|
||||
#define ERRRET(result, function) \
|
||||
do { \
|
||||
@ -65,9 +73,13 @@ static const char *output_filename;
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr,
|
||||
"usage: named-checkzone [-djqvD] [-c class] [-o output] "
|
||||
"usage: %s [-djqvD] [-c class] [-o output] "
|
||||
"[-f inputformat] [-F outputformat] "
|
||||
"[-t directory] [-w directory] [-k (ignore|warn|fail)] "
|
||||
"[-n (ignore|warn|fail)] zonename filename\n");
|
||||
"[-n (ignore|warn|fail)] [-m (ignore|warn|fail)] "
|
||||
"[-i (full|local|none)] [-M (ignore|warn|fail)] "
|
||||
"[-S (ignore|warn|fail)] [-W (ignore|warn)] "
|
||||
"zonename filename\n", prog_name);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -75,8 +87,10 @@ static void
|
||||
destroy(void) {
|
||||
if (zone != NULL)
|
||||
dns_zone_detach(&zone);
|
||||
dns_name_destroy();
|
||||
}
|
||||
|
||||
/*% main processing routine */
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
int c;
|
||||
@ -87,8 +101,45 @@ main(int argc, char **argv) {
|
||||
char classname_in[] = "IN";
|
||||
char *classname = classname_in;
|
||||
const char *workdir = NULL;
|
||||
const char *inputformatstr = NULL;
|
||||
const char *outputformatstr = NULL;
|
||||
dns_masterformat_t inputformat = dns_masterformat_text;
|
||||
dns_masterformat_t outputformat = dns_masterformat_text;
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, "c:dijk:n:qst:o:vw:D")) != EOF) {
|
||||
outputstyle = &dns_master_style_full;
|
||||
|
||||
prog_name = strrchr(argv[0], '/');
|
||||
if (prog_name != NULL)
|
||||
prog_name++;
|
||||
else
|
||||
prog_name = argv[0];
|
||||
/*
|
||||
* Libtool doesn't preserve the program name prior to final
|
||||
* installation. Remove the libtool prefix ("lt-").
|
||||
*/
|
||||
if (strncmp(prog_name, "lt-", 3) == 0)
|
||||
prog_name += 3;
|
||||
if (strcmp(prog_name, "named-checkzone") == 0)
|
||||
progmode = progmode_check;
|
||||
else if (strcmp(prog_name, "named-compilezone") == 0)
|
||||
progmode = progmode_compile;
|
||||
else
|
||||
INSIST(0);
|
||||
|
||||
/* Compilation specific defaults */
|
||||
if (progmode == progmode_compile) {
|
||||
zone_options |= (DNS_ZONEOPT_CHECKNS |
|
||||
DNS_ZONEOPT_FATALNS |
|
||||
DNS_ZONEOPT_CHECKNAMES |
|
||||
DNS_ZONEOPT_CHECKNAMESFAIL |
|
||||
DNS_ZONEOPT_CHECKWILDCARD);
|
||||
}
|
||||
|
||||
#define ARGCMP(X) (strcmp(isc_commandline_argument, X) == 0)
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv,
|
||||
"c:df:i:jk:m:n:qs:t:o:vw:DF:M:S:W:"))
|
||||
!= EOF) {
|
||||
switch (c) {
|
||||
case 'c':
|
||||
classname = isc_commandline_argument;
|
||||
@ -98,34 +149,104 @@ main(int argc, char **argv) {
|
||||
debug++;
|
||||
break;
|
||||
|
||||
case 'i':
|
||||
if (ARGCMP("full")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY |
|
||||
DNS_ZONEOPT_CHECKSIBLING;
|
||||
docheckmx = ISC_TRUE;
|
||||
docheckns = ISC_TRUE;
|
||||
dochecksrv = ISC_TRUE;
|
||||
} else if (ARGCMP("full-sibling")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
|
||||
docheckmx = ISC_TRUE;
|
||||
docheckns = ISC_TRUE;
|
||||
dochecksrv = ISC_TRUE;
|
||||
} else if (ARGCMP("local")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
|
||||
zone_options |= DNS_ZONEOPT_CHECKSIBLING;
|
||||
docheckmx = ISC_FALSE;
|
||||
docheckns = ISC_FALSE;
|
||||
dochecksrv = ISC_FALSE;
|
||||
} else if (ARGCMP("local-sibling")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
|
||||
docheckmx = ISC_FALSE;
|
||||
docheckns = ISC_FALSE;
|
||||
dochecksrv = ISC_FALSE;
|
||||
} else if (ARGCMP("none")) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKINTEGRITY;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
|
||||
docheckmx = ISC_FALSE;
|
||||
docheckns = ISC_FALSE;
|
||||
dochecksrv = ISC_FALSE;
|
||||
} else {
|
||||
fprintf(stderr, "invalid argument to -i: %s\n",
|
||||
isc_commandline_argument);
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
inputformatstr = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 'F':
|
||||
outputformatstr = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 'j':
|
||||
nomerge = ISC_FALSE;
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
if (!strcmp(isc_commandline_argument, "ignore"))
|
||||
zone_options &= ~(DNS_ZONEOPT_CHECKNS|
|
||||
DNS_ZONEOPT_FATALNS);
|
||||
else if (!strcmp(isc_commandline_argument, "warn")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNS;
|
||||
zone_options &= ~DNS_ZONEOPT_FATALNS;
|
||||
} else if (!strcmp(isc_commandline_argument, "fail"))
|
||||
zone_options |= DNS_ZONEOPT_CHECKNS|
|
||||
DNS_ZONEOPT_FATALNS;
|
||||
break;
|
||||
|
||||
case 'k':
|
||||
if (!strcmp(isc_commandline_argument, "warn")) {
|
||||
if (ARGCMP("warn")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMES;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
} else if (!strcmp(isc_commandline_argument,
|
||||
"fail")) {
|
||||
} else if (ARGCMP("fail")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMES |
|
||||
DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
} else if (!strcmp(isc_commandline_argument,
|
||||
"ignore")) {
|
||||
} else if (ARGCMP("ignore")) {
|
||||
zone_options &= ~(DNS_ZONEOPT_CHECKNAMES |
|
||||
DNS_ZONEOPT_CHECKNAMESFAIL);
|
||||
} else {
|
||||
fprintf(stderr, "invalid argument to -k: %s\n",
|
||||
isc_commandline_argument);
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
if (ARGCMP("ignore")) {
|
||||
zone_options &= ~(DNS_ZONEOPT_CHECKNS|
|
||||
DNS_ZONEOPT_FATALNS);
|
||||
} else if (ARGCMP("warn")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNS;
|
||||
zone_options &= ~DNS_ZONEOPT_FATALNS;
|
||||
} else if (ARGCMP("fail")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNS|
|
||||
DNS_ZONEOPT_FATALNS;
|
||||
} else {
|
||||
fprintf(stderr, "invalid argument to -n: %s\n",
|
||||
isc_commandline_argument);
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
if (ARGCMP("warn")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKMX;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
|
||||
} else if (ARGCMP("fail")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKMX |
|
||||
DNS_ZONEOPT_CHECKMXFAIL;
|
||||
} else if (ARGCMP("ignore")) {
|
||||
zone_options &= ~(DNS_ZONEOPT_CHECKMX |
|
||||
DNS_ZONEOPT_CHECKMXFAIL);
|
||||
} else {
|
||||
fprintf(stderr, "invalid argument to -m: %s\n",
|
||||
isc_commandline_argument);
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -149,6 +270,19 @@ main(int argc, char **argv) {
|
||||
}
|
||||
break;
|
||||
|
||||
case 's':
|
||||
if (ARGCMP("full"))
|
||||
outputstyle = &dns_master_style_full;
|
||||
else if (ARGCMP("relative")) {
|
||||
outputstyle = &dns_master_style_default;
|
||||
} else {
|
||||
fprintf(stderr,
|
||||
"unknown or unsupported style: %s\n",
|
||||
isc_commandline_argument);
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
output_filename = isc_commandline_argument;
|
||||
break;
|
||||
@ -165,11 +299,61 @@ main(int argc, char **argv) {
|
||||
dumpzone++;
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
if (ARGCMP("fail")) {
|
||||
zone_options &= ~DNS_ZONEOPT_WARNMXCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNOREMXCNAME;
|
||||
} else if (ARGCMP("warn")) {
|
||||
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNOREMXCNAME;
|
||||
} else if (ARGCMP("ignore")) {
|
||||
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
||||
zone_options |= DNS_ZONEOPT_IGNOREMXCNAME;
|
||||
} else {
|
||||
fprintf(stderr, "invalid argument to -M: %s\n",
|
||||
isc_commandline_argument);
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
if (ARGCMP("fail")) {
|
||||
zone_options &= ~DNS_ZONEOPT_WARNSRVCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNORESRVCNAME;
|
||||
} else if (ARGCMP("warn")) {
|
||||
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNORESRVCNAME;
|
||||
} else if (ARGCMP("ignore")) {
|
||||
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
||||
zone_options |= DNS_ZONEOPT_IGNORESRVCNAME;
|
||||
} else {
|
||||
fprintf(stderr, "invalid argument to -S: %s\n",
|
||||
isc_commandline_argument);
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'W':
|
||||
if (ARGCMP("warn"))
|
||||
zone_options |= DNS_ZONEOPT_CHECKWILDCARD;
|
||||
else if (ARGCMP("ignore"))
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKWILDCARD;
|
||||
break;
|
||||
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
if (progmode == progmode_compile) {
|
||||
dumpzone = 1; /* always dump */
|
||||
if (output_filename == NULL) {
|
||||
fprintf(stderr,
|
||||
"output file required, but not specified\n");
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
if (workdir != NULL) {
|
||||
result = isc_dir_chdir(workdir);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
@ -179,15 +363,36 @@ main(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
if (inputformatstr != NULL) {
|
||||
if (strcasecmp(inputformatstr, "text") == 0)
|
||||
inputformat = dns_masterformat_text;
|
||||
else if (strcasecmp(inputformatstr, "raw") == 0)
|
||||
inputformat = dns_masterformat_raw;
|
||||
else {
|
||||
fprintf(stderr, "unknown file format: %s\n",
|
||||
inputformatstr);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (outputformatstr != NULL) {
|
||||
if (strcasecmp(outputformatstr, "text") == 0)
|
||||
outputformat = dns_masterformat_text;
|
||||
else if (strcasecmp(outputformatstr, "raw") == 0)
|
||||
outputformat = dns_masterformat_raw;
|
||||
else {
|
||||
fprintf(stderr, "unknown file format: %s\n",
|
||||
outputformatstr);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (isc_commandline_index + 2 > argc)
|
||||
usage();
|
||||
|
||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||
if (!quiet) {
|
||||
if (!quiet)
|
||||
RUNTIME_CHECK(setup_logging(mctx, &lctx) == ISC_R_SUCCESS);
|
||||
dns_log_init(lctx);
|
||||
dns_log_setcontext(lctx);
|
||||
}
|
||||
RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE)
|
||||
== ISC_R_SUCCESS);
|
||||
@ -196,10 +401,18 @@ main(int argc, char **argv) {
|
||||
|
||||
origin = argv[isc_commandline_index++];
|
||||
filename = argv[isc_commandline_index++];
|
||||
result = load_zone(mctx, origin, filename, classname, &zone);
|
||||
result = load_zone(mctx, origin, filename, inputformat, classname,
|
||||
&zone);
|
||||
|
||||
if (result == ISC_R_SUCCESS && dumpzone) {
|
||||
result = dump_zone(origin, zone, output_filename);
|
||||
if (!quiet && progmode == progmode_compile) {
|
||||
fprintf(stdout, "dump zone to %s...", output_filename);
|
||||
fflush(stdout);
|
||||
}
|
||||
result = dump_zone(origin, zone, output_filename,
|
||||
outputformat, outputstyle);
|
||||
if (!quiet && progmode == progmode_compile)
|
||||
fprintf(stdout, "done\n");
|
||||
}
|
||||
|
||||
if (!quiet && result == ISC_R_SUCCESS)
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!--
|
||||
- Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@ -18,9 +18,8 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: named-checkzone.docbook,v 1.3.2.2.8.13 2006/09/30 23:58:36 marka Exp $ -->
|
||||
|
||||
<refentry>
|
||||
<!-- $Id: named-checkzone.docbook,v 1.11.18.17 2007/01/29 23:57:20 marka Exp $ -->
|
||||
<refentry id="man.named-checkzone">
|
||||
<refentryinfo>
|
||||
<date>June 13, 2000</date>
|
||||
</refentryinfo>
|
||||
@ -36,6 +35,7 @@
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<year>2006</year>
|
||||
<year>2007</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
@ -48,7 +48,8 @@
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>named-checkzone</application></refname>
|
||||
<refpurpose>zone file validity checking tool</refpurpose>
|
||||
<refname><application>named-compilezone</application></refname>
|
||||
<refpurpose>zone file validity checking or converting tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
@ -59,12 +60,43 @@
|
||||
<arg><option>-q</option></arg>
|
||||
<arg><option>-v</option></arg>
|
||||
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg><option>-f <replaceable class="parameter">format</replaceable></option></arg>
|
||||
<arg><option>-F <replaceable class="parameter">format</replaceable></option></arg>
|
||||
<arg><option>-i <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-k <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-m <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-M <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-n <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-o <replaceable class="parameter">filename</replaceable></option></arg>
|
||||
<arg><option>-s <replaceable class="parameter">style</replaceable></option></arg>
|
||||
<arg><option>-S <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg><option>-w <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg><option>-D</option></arg>
|
||||
<arg><option>-W <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="req">zonename</arg>
|
||||
<arg choice="req">filename</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>named-compilezone</command>
|
||||
<arg><option>-d</option></arg>
|
||||
<arg><option>-j</option></arg>
|
||||
<arg><option>-q</option></arg>
|
||||
<arg><option>-v</option></arg>
|
||||
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg><option>-C <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-f <replaceable class="parameter">format</replaceable></option></arg>
|
||||
<arg><option>-F <replaceable class="parameter">format</replaceable></option></arg>
|
||||
<arg><option>-i <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-k <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-m <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-n <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-o <replaceable class="parameter">filename</replaceable></option></arg>
|
||||
<arg><option>-s <replaceable class="parameter">style</replaceable></option></arg>
|
||||
<arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg><option>-w <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg><option>-D</option></arg>
|
||||
<arg><option>-W <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg choice="req">zonename</arg>
|
||||
<arg choice="req">filename</arg>
|
||||
</cmdsynopsis>
|
||||
@ -72,13 +104,23 @@
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<command>named-checkzone</command> checks the syntax and integrity of
|
||||
a zone file. It performs the same checks as <command>named</command>
|
||||
does when loading a zone. This makes
|
||||
<command>named-checkzone</command> useful for checking zone
|
||||
files before configuring them into a name server.
|
||||
<para><command>named-checkzone</command>
|
||||
checks the syntax and integrity of a zone file. It performs the
|
||||
same checks as <command>named</command> does when loading a
|
||||
zone. This makes <command>named-checkzone</command> useful for
|
||||
checking zone files before configuring them into a name server.
|
||||
</para>
|
||||
<para>
|
||||
<command>named-compilezone</command> is similar to
|
||||
<command>named-checkzone</command>, but it always dumps the
|
||||
zone contents to a specified file in a specified format.
|
||||
Additionally, it applies stricter check levels by default,
|
||||
since the dump output will be used as an actual zone file
|
||||
loaded by <command>named</command>.
|
||||
When manaully specified otherwise, the check levels must at
|
||||
least be as strict as those specified in the
|
||||
<command>named</command> configuration file.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
@ -87,90 +129,223 @@
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-d</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Enable debugging.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Enable debugging.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-q</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Quiet mode - exit code only.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Quiet mode - exit code only.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print the version of the <command>named-checkzone</command>
|
||||
program and exit.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Print the version of the <command>named-checkzone</command>
|
||||
program and exit.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-j</term>
|
||||
<listitem>
|
||||
<para>
|
||||
When loading the zone file read the journal if it exists.
|
||||
</para>
|
||||
When loading the zone file read the journal if it exists.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-c <replaceable class="parameter">class</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the class of the zone. If not specified "IN" is assumed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-i <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the class of the zone. If not specified "IN" is assumed.
|
||||
Perform post load zone integrity checks. Possible modes are
|
||||
<command>"full"</command> (default),
|
||||
<command>"full-sibling"</command>,
|
||||
<command>"local"</command>,
|
||||
<command>"local-sibling"</command> and
|
||||
<command>"none"</command>.
|
||||
</para>
|
||||
<para>
|
||||
Mode <command>"full"</command> checks that MX records
|
||||
refer to A or AAAA record (both in-zone and out-of-zone
|
||||
hostnames). Mode <command>"local"</command> only
|
||||
checks MX records which refer to in-zone hostnames.
|
||||
</para>
|
||||
<para>
|
||||
Mode <command>"full"</command> checks that SRV records
|
||||
refer to A or AAAA record (both in-zone and out-of-zone
|
||||
hostnames). Mode <command>"local"</command> only
|
||||
checks SRV records which refer to in-zone hostnames.
|
||||
</para>
|
||||
<para>
|
||||
Mode <command>"full"</command> checks that delegation NS
|
||||
records refer to A or AAAA record (both in-zone and out-of-zone
|
||||
hostnames). It also checks that glue addresses records
|
||||
in the zone match those advertised by the child.
|
||||
Mode <command>"local"</command> only checks NS records which
|
||||
refer to in-zone hostnames or that some required glue exists,
|
||||
that is when the nameserver is in a child zone.
|
||||
</para>
|
||||
<para>
|
||||
Mode <command>"full-sibling"</command> and
|
||||
<command>"local-sibling"</command> disable sibling glue
|
||||
checks but are otherwise the same as <command>"full"</command>
|
||||
and <command>"local"</command> respectively.
|
||||
</para>
|
||||
<para>
|
||||
Mode <command>"none"</command> disables the checks.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-f <replaceable class="parameter">format</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the format of the zone file.
|
||||
Possible formats are <command>"text"</command> (default)
|
||||
and <command>"raw"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-F <replaceable class="parameter">format</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the format of the output file specified.
|
||||
Possible formats are <command>"text"</command> (default)
|
||||
and <command>"raw"</command>.
|
||||
For <command>named-checkzone</command>,
|
||||
this does not cause any effects unless it dumps the zone
|
||||
contents.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-k <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Perform <command>"check-names"</command> checks with the
|
||||
specified failure mode.
|
||||
Possible modes are <command>"fail"</command>
|
||||
(default for <command>named-compilezone</command>),
|
||||
<command>"warn"</command>
|
||||
(default for <command>named-checkzone</command>) and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-m <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify whether MX records should be checked to see if they
|
||||
are addresses. Possible modes are <command>"fail"</command>,
|
||||
<command>"warn"</command> (default) and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-M <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Perform <command>"check-names"</command> checks with the specified failure mode.
|
||||
Possible modes are <command>"fail"</command>,
|
||||
<command>"warn"</command> (default) and
|
||||
<command>"ignore"</command>.
|
||||
Check if a MX record refers to a CNAME.
|
||||
Possible modes are <command>"fail"</command>,
|
||||
<command>"warn"</command> (default) and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-n <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify whether NS records should be checked to see if they
|
||||
are addresses. Possible modes are <command>"fail"</command>,
|
||||
<command>"warn"</command> (default) and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify whether NS records should be checked to see if they
|
||||
are addresses.
|
||||
Possible modes are <command>"fail"</command>
|
||||
(default for <command>named-compilezone</command>),
|
||||
<command>"warn"</command>
|
||||
(default for <command>named-checkzone</command>) and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-o <replaceable class="parameter">filename</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Write zone output to <filename>filename</filename>.
|
||||
Write zone output to <filename>filename</filename>.
|
||||
This is mandatory for <command>named-compilezone</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-s <replaceable class="parameter">style</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the style of the dumped zone file.
|
||||
Possible styles are <command>"full"</command> (default)
|
||||
and <command>"relative"</command>.
|
||||
The full format is most suitable for processing
|
||||
automatically by a separate script.
|
||||
On the other hand, the relative format is more
|
||||
human-readable and is thus suitable for editing by hand.
|
||||
For <command>named-checkzone</command>
|
||||
this does not cause any effects unless it dumps the zone
|
||||
contents.
|
||||
It also does not have any meaning if the output format
|
||||
is not text.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-S <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Check if a SRV record refers to a CNAME.
|
||||
Possible modes are <command>"fail"</command>,
|
||||
<command>"warn"</command> (default) and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-t <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
chroot to <filename>directory</filename> so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
chroot to <filename>directory</filename> so that
|
||||
include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -179,39 +354,55 @@
|
||||
<term>-w <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
chdir to <filename>directory</filename> so that relative
|
||||
filenames in master file $INCLUDE directives work. This
|
||||
is similar to the directory clause in
|
||||
<filename>named.conf</filename>.
|
||||
chdir to <filename>directory</filename> so that
|
||||
relative
|
||||
filenames in master file $INCLUDE directives work. This
|
||||
is similar to the directory clause in
|
||||
<filename>named.conf</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-D</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Dump zone file in canonical format.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Dump zone file in canonical format.
|
||||
This is always enabled for <command>named-compilezone</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-W <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify whether to check for non-terminal wildcards.
|
||||
Non-terminal wildcards are almost always the result of a
|
||||
failure to understand the wildcard matching algorithm (RFC 1034).
|
||||
Possible modes are <command>"warn"</command> (default)
|
||||
and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>zonename</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The domain name of the zone being checked.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The domain name of the zone being checked.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>filename</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the zone file.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the zone file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
@ -220,18 +411,16 @@
|
||||
|
||||
<refsect1>
|
||||
<title>RETURN VALUES</title>
|
||||
<para>
|
||||
<command>named-checkzone</command> returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
<para><command>named-checkzone</command>
|
||||
returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>named</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<para><citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>RFC 1035</citetitle>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
@ -240,16 +429,12 @@
|
||||
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
<para>
|
||||
<corpauthor>Internet Systems Consortium</corpauthor>
|
||||
<para><corpauthor>Internet Systems Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!--
|
||||
</refentry><!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
- Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@ -14,121 +14,241 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: named-checkzone.html,v 1.5.2.2.4.17 2006/10/05 02:50:17 marka Exp $ -->
|
||||
<!-- $Id: named-checkzone.html,v 1.11.18.27 2007/01/30 00:23:44 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>named-checkzone</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482688"></a><div class="titlepage"></div>
|
||||
<a name="man.named-checkzone"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p><span class="application">named-checkzone</span> — zone file validity checking tool</p>
|
||||
<p><span class="application">named-checkzone</span>, <span class="application">named-compilezone</span> — zone file validity checking or converting tool</p>
|
||||
</div>
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p><code class="command">named-checkzone</code> [<code class="option">-d</code>] [<code class="option">-j</code>] [<code class="option">-q</code>] [<code class="option">-v</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-k <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-n <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-o <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-w <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-D</code>] {zonename} {filename}</p></div>
|
||||
<div class="cmdsynopsis"><p><code class="command">named-checkzone</code> [<code class="option">-d</code>] [<code class="option">-j</code>] [<code class="option">-q</code>] [<code class="option">-v</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-f <em class="replaceable"><code>format</code></em></code>] [<code class="option">-F <em class="replaceable"><code>format</code></em></code>] [<code class="option">-i <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-k <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-m <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-M <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-n <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-o <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-s <em class="replaceable"><code>style</code></em></code>] [<code class="option">-S <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-w <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-D</code>] [<code class="option">-W <em class="replaceable"><code>mode</code></em></code>] {zonename} {filename}</p></div>
|
||||
<div class="cmdsynopsis"><p><code class="command">named-compilezone</code> [<code class="option">-d</code>] [<code class="option">-j</code>] [<code class="option">-q</code>] [<code class="option">-v</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-C <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-f <em class="replaceable"><code>format</code></em></code>] [<code class="option">-F <em class="replaceable"><code>format</code></em></code>] [<code class="option">-i <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-k <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-m <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-n <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-o <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-s <em class="replaceable"><code>style</code></em></code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-w <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-D</code>] [<code class="option">-W <em class="replaceable"><code>mode</code></em></code>] {zonename} {filename}</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549490"></a><h2>DESCRIPTION</h2>
|
||||
<p>
|
||||
<span><strong class="command">named-checkzone</strong></span> checks the syntax and integrity of
|
||||
a zone file. It performs the same checks as <span><strong class="command">named</strong></span>
|
||||
does when loading a zone. This makes
|
||||
<span><strong class="command">named-checkzone</strong></span> useful for checking zone
|
||||
files before configuring them into a name server.
|
||||
<a name="id2543665"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">named-checkzone</strong></span>
|
||||
checks the syntax and integrity of a zone file. It performs the
|
||||
same checks as <span><strong class="command">named</strong></span> does when loading a
|
||||
zone. This makes <span><strong class="command">named-checkzone</strong></span> useful for
|
||||
checking zone files before configuring them into a name server.
|
||||
</p>
|
||||
<p>
|
||||
<span><strong class="command">named-compilezone</strong></span> is similar to
|
||||
<span><strong class="command">named-checkzone</strong></span>, but it always dumps the
|
||||
zone contents to a specified file in a specified format.
|
||||
Additionally, it applies stricter check levels by default,
|
||||
since the dump output will be used as an actual zone file
|
||||
loaded by <span><strong class="command">named</strong></span>.
|
||||
When manaully specified otherwise, the check levels must at
|
||||
least be as strict as those specified in the
|
||||
<span><strong class="command">named</strong></span> configuration file.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549510"></a><h2>OPTIONS</h2>
|
||||
<a name="id2543700"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-d</span></dt>
|
||||
<dd><p>
|
||||
Enable debugging.
|
||||
</p></dd>
|
||||
Enable debugging.
|
||||
</p></dd>
|
||||
<dt><span class="term">-q</span></dt>
|
||||
<dd><p>
|
||||
Quiet mode - exit code only.
|
||||
</p></dd>
|
||||
Quiet mode - exit code only.
|
||||
</p></dd>
|
||||
<dt><span class="term">-v</span></dt>
|
||||
<dd><p>
|
||||
Print the version of the <span><strong class="command">named-checkzone</strong></span>
|
||||
program and exit.
|
||||
</p></dd>
|
||||
Print the version of the <span><strong class="command">named-checkzone</strong></span>
|
||||
program and exit.
|
||||
</p></dd>
|
||||
<dt><span class="term">-j</span></dt>
|
||||
<dd><p>
|
||||
When loading the zone file read the journal if it exists.
|
||||
When loading the zone file read the journal if it exists.
|
||||
</p></dd>
|
||||
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify the class of the zone. If not specified "IN" is assumed.
|
||||
Specify the class of the zone. If not specified "IN" is assumed.
|
||||
</p></dd>
|
||||
<dt><span class="term">-i <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Perform post load zone integrity checks. Possible modes are
|
||||
<span><strong class="command">"full"</strong></span> (default),
|
||||
<span><strong class="command">"full-sibling"</strong></span>,
|
||||
<span><strong class="command">"local"</strong></span>,
|
||||
<span><strong class="command">"local-sibling"</strong></span> and
|
||||
<span><strong class="command">"none"</strong></span>.
|
||||
</p>
|
||||
<p>
|
||||
Mode <span><strong class="command">"full"</strong></span> checks that MX records
|
||||
refer to A or AAAA record (both in-zone and out-of-zone
|
||||
hostnames). Mode <span><strong class="command">"local"</strong></span> only
|
||||
checks MX records which refer to in-zone hostnames.
|
||||
</p>
|
||||
<p>
|
||||
Mode <span><strong class="command">"full"</strong></span> checks that SRV records
|
||||
refer to A or AAAA record (both in-zone and out-of-zone
|
||||
hostnames). Mode <span><strong class="command">"local"</strong></span> only
|
||||
checks SRV records which refer to in-zone hostnames.
|
||||
</p>
|
||||
<p>
|
||||
Mode <span><strong class="command">"full"</strong></span> checks that delegation NS
|
||||
records refer to A or AAAA record (both in-zone and out-of-zone
|
||||
hostnames). It also checks that glue addresses records
|
||||
in the zone match those advertised by the child.
|
||||
Mode <span><strong class="command">"local"</strong></span> only checks NS records which
|
||||
refer to in-zone hostnames or that some required glue exists,
|
||||
that is when the nameserver is in a child zone.
|
||||
</p>
|
||||
<p>
|
||||
Mode <span><strong class="command">"full-sibling"</strong></span> and
|
||||
<span><strong class="command">"local-sibling"</strong></span> disable sibling glue
|
||||
checks but are otherwise the same as <span><strong class="command">"full"</strong></span>
|
||||
and <span><strong class="command">"local"</strong></span> respectively.
|
||||
</p>
|
||||
<p>
|
||||
Mode <span><strong class="command">"none"</strong></span> disables the checks.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-f <em class="replaceable"><code>format</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify the format of the zone file.
|
||||
Possible formats are <span><strong class="command">"text"</strong></span> (default)
|
||||
and <span><strong class="command">"raw"</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-F <em class="replaceable"><code>format</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify the format of the output file specified.
|
||||
Possible formats are <span><strong class="command">"text"</strong></span> (default)
|
||||
and <span><strong class="command">"raw"</strong></span>.
|
||||
For <span><strong class="command">named-checkzone</strong></span>,
|
||||
this does not cause any effects unless it dumps the zone
|
||||
contents.
|
||||
</p></dd>
|
||||
<dt><span class="term">-k <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd><p>
|
||||
Perform <span><strong class="command">"check-names"</strong></span> checks with the specified failure mode.
|
||||
Possible modes are <span><strong class="command">"fail"</strong></span>,
|
||||
<span><strong class="command">"warn"</strong></span> (default) and
|
||||
<span><strong class="command">"ignore"</strong></span>.
|
||||
Perform <span><strong class="command">"check-names"</strong></span> checks with the
|
||||
specified failure mode.
|
||||
Possible modes are <span><strong class="command">"fail"</strong></span>
|
||||
(default for <span><strong class="command">named-compilezone</strong></span>),
|
||||
<span><strong class="command">"warn"</strong></span>
|
||||
(default for <span><strong class="command">named-checkzone</strong></span>) and
|
||||
<span><strong class="command">"ignore"</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-m <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify whether MX records should be checked to see if they
|
||||
are addresses. Possible modes are <span><strong class="command">"fail"</strong></span>,
|
||||
<span><strong class="command">"warn"</strong></span> (default) and
|
||||
<span><strong class="command">"ignore"</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-M <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd><p>
|
||||
Check if a MX record refers to a CNAME.
|
||||
Possible modes are <span><strong class="command">"fail"</strong></span>,
|
||||
<span><strong class="command">"warn"</strong></span> (default) and
|
||||
<span><strong class="command">"ignore"</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-n <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify whether NS records should be checked to see if they
|
||||
are addresses. Possible modes are <span><strong class="command">"fail"</strong></span>,
|
||||
<span><strong class="command">"warn"</strong></span> (default) and
|
||||
<span><strong class="command">"ignore"</strong></span>.
|
||||
</p></dd>
|
||||
Specify whether NS records should be checked to see if they
|
||||
are addresses.
|
||||
Possible modes are <span><strong class="command">"fail"</strong></span>
|
||||
(default for <span><strong class="command">named-compilezone</strong></span>),
|
||||
<span><strong class="command">"warn"</strong></span>
|
||||
(default for <span><strong class="command">named-checkzone</strong></span>) and
|
||||
<span><strong class="command">"ignore"</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-o <em class="replaceable"><code>filename</code></em></span></dt>
|
||||
<dd><p>
|
||||
Write zone output to <code class="filename">filename</code>.
|
||||
Write zone output to <code class="filename">filename</code>.
|
||||
This is mandatory for <span><strong class="command">named-compilezone</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-s <em class="replaceable"><code>style</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify the style of the dumped zone file.
|
||||
Possible styles are <span><strong class="command">"full"</strong></span> (default)
|
||||
and <span><strong class="command">"relative"</strong></span>.
|
||||
The full format is most suitable for processing
|
||||
automatically by a separate script.
|
||||
On the other hand, the relative format is more
|
||||
human-readable and is thus suitable for editing by hand.
|
||||
For <span><strong class="command">named-checkzone</strong></span>
|
||||
this does not cause any effects unless it dumps the zone
|
||||
contents.
|
||||
It also does not have any meaning if the output format
|
||||
is not text.
|
||||
</p></dd>
|
||||
<dt><span class="term">-S <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd><p>
|
||||
Check if a SRV record refers to a CNAME.
|
||||
Possible modes are <span><strong class="command">"fail"</strong></span>,
|
||||
<span><strong class="command">"warn"</strong></span> (default) and
|
||||
<span><strong class="command">"ignore"</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd><p>
|
||||
chroot to <code class="filename">directory</code> so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
chroot to <code class="filename">directory</code> so that
|
||||
include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
</p></dd>
|
||||
<dt><span class="term">-w <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd><p>
|
||||
chdir to <code class="filename">directory</code> so that relative
|
||||
filenames in master file $INCLUDE directives work. This
|
||||
is similar to the directory clause in
|
||||
<code class="filename">named.conf</code>.
|
||||
chdir to <code class="filename">directory</code> so that
|
||||
relative
|
||||
filenames in master file $INCLUDE directives work. This
|
||||
is similar to the directory clause in
|
||||
<code class="filename">named.conf</code>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-D</span></dt>
|
||||
<dd><p>
|
||||
Dump zone file in canonical format.
|
||||
</p></dd>
|
||||
Dump zone file in canonical format.
|
||||
This is always enabled for <span><strong class="command">named-compilezone</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-W <em class="replaceable"><code>mode</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify whether to check for non-terminal wildcards.
|
||||
Non-terminal wildcards are almost always the result of a
|
||||
failure to understand the wildcard matching algorithm (RFC 1034).
|
||||
Possible modes are <span><strong class="command">"warn"</strong></span> (default)
|
||||
and
|
||||
<span><strong class="command">"ignore"</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">zonename</span></dt>
|
||||
<dd><p>
|
||||
The domain name of the zone being checked.
|
||||
</p></dd>
|
||||
The domain name of the zone being checked.
|
||||
</p></dd>
|
||||
<dt><span class="term">filename</span></dt>
|
||||
<dd><p>
|
||||
The name of the zone file.
|
||||
</p></dd>
|
||||
The name of the zone file.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549824"></a><h2>RETURN VALUES</h2>
|
||||
<p>
|
||||
<span><strong class="command">named-checkzone</strong></span> returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
<a name="id2544299"></a><h2>RETURN VALUES</h2>
|
||||
<p><span><strong class="command">named-checkzone</strong></span>
|
||||
returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549836"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
|
||||
<a name="id2544311"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
|
||||
<em class="citetitle">RFC 1035</em>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549863"></a><h2>AUTHOR</h2>
|
||||
<p>
|
||||
<span class="corpauthor">Internet Systems Consortium</span>
|
||||
<a name="id2544336"></a><h2>AUTHOR</h2>
|
||||
<p><span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
@ -13,7 +13,7 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: Makefile.in,v 1.25.12.12 2004/08/18 23:25:57 marka Exp $
|
||||
# $Id: Makefile.in,v 1.33.18.6 2005/09/09 14:11:04 marka Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
@ -45,7 +45,7 @@ DEPLIBS = ${DNSDEPLIBS} ${BIND9DEPLIBS} ${ISCDEPLIBS} ${ISCCFGDEPLIBS} \
|
||||
${LWRESDEPLIBS}
|
||||
|
||||
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} ${ISCLIBS} \
|
||||
${ISCCFGLIBS} @LIBS@
|
||||
${ISCCFGLIBS} @IDNLIBS@ @LIBS@
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
@ -13,13 +13,13 @@
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" $Id: dig.1,v 1.14.2.4.2.11 2006/06/29 13:02:30 marka Exp $
|
||||
.\" $Id: dig.1,v 1.23.18.19 2007/01/30 00:23:44 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: dig
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: Jun 30, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
@ -33,7 +33,7 @@
|
||||
dig \- DNS lookup utility
|
||||
.SH "SYNOPSIS"
|
||||
.HP 4
|
||||
\fBdig\fR [@server] [\fB\-b\ \fR\fB\fIaddress\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-f\ \fR\fB\fIfilename\fR\fR] [\fB\-k\ \fR\fB\fIfilename\fR\fR] [\fB\-p\ \fR\fB\fIport#\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-x\ \fR\fB\fIaddr\fR\fR] [\fB\-y\ \fR\fB\fIname:key\fR\fR] [\fB\-4\fR] [\fB\-6\fR] [name] [type] [class] [queryopt...]
|
||||
\fBdig\fR [@server] [\fB\-b\ \fR\fB\fIaddress\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-f\ \fR\fB\fIfilename\fR\fR] [\fB\-k\ \fR\fB\fIfilename\fR\fR] [\fB\-p\ \fR\fB\fIport#\fR\fR] [\fB\-q\ \fR\fB\fIname\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-x\ \fR\fB\fIaddr\fR\fR] [\fB\-y\ \fR\fB\fI[hmac:]\fR\fIname:key\fR\fR] [\fB\-4\fR] [\fB\-6\fR] [name] [type] [class] [queryopt...]
|
||||
.HP 4
|
||||
\fBdig\fR [\fB\-h\fR]
|
||||
.HP 4
|
||||
@ -65,21 +65,30 @@ It is possible to set per\-user defaults for
|
||||
\fBdig\fR
|
||||
via
|
||||
\fI${HOME}/.digrc\fR. This file is read and any options in it are applied before the command line arguments.
|
||||
.PP
|
||||
The IN and CH class names overlap with the IN and CH top level domains names. Either use the
|
||||
\fB\-t\fR
|
||||
and
|
||||
\fB\-c\fR
|
||||
options to specify the type and class or use the
|
||||
\fB\-q\fR
|
||||
the specify the domain name or use "IN." and "CH." when looking up these top level domains.
|
||||
.SH "SIMPLE USAGE"
|
||||
.PP
|
||||
A typical invocation of
|
||||
\fBdig\fR
|
||||
looks like:
|
||||
.sp
|
||||
.RS 3n
|
||||
.RS 4
|
||||
.nf
|
||||
dig @server name type
|
||||
.fi
|
||||
.RE
|
||||
.sp
|
||||
where:
|
||||
.TP 3n
|
||||
.PP
|
||||
\fBserver\fR
|
||||
.RS 4
|
||||
is the name or IP address of the name server to query. This can be an IPv4 address in dotted\-decimal notation or an IPv6 address in colon\-delimited notation. When the supplied
|
||||
\fIserver\fR
|
||||
argument is a hostname,
|
||||
@ -91,11 +100,15 @@ argument is provided,
|
||||
consults
|
||||
\fI/etc/resolv.conf\fR
|
||||
and queries the name servers listed there. The reply from the name server that responds is displayed.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBname\fR
|
||||
.RS 4
|
||||
is the name of the resource record that is to be looked up.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBtype\fR
|
||||
.RS 4
|
||||
indicates what type of query is required \(em ANY, A, MX, SIG, etc.
|
||||
\fItype\fR
|
||||
can be any valid query type. If no
|
||||
@ -103,6 +116,7 @@ can be any valid query type. If no
|
||||
argument is supplied,
|
||||
\fBdig\fR
|
||||
will perform a lookup for an A record.
|
||||
.RE
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
The
|
||||
@ -154,6 +168,13 @@ is set to
|
||||
ixfr=N. The incremental zone transfer will contain the changes made to the zone since the serial number in the zone's SOA record was
|
||||
\fIN\fR.
|
||||
.PP
|
||||
The
|
||||
\fB\-q\fR
|
||||
option sets the query name to
|
||||
\fIname\fR. This useful do distingish the
|
||||
\fIname\fR
|
||||
from other arguments.
|
||||
.PP
|
||||
Reverse lookups \- mapping addresses to names \- are simplified by the
|
||||
\fB\-x\fR
|
||||
option.
|
||||
@ -178,6 +199,8 @@ and their responses using transaction signatures (TSIG), specify a TSIG key file
|
||||
option. You can also specify the TSIG key itself on the command line using the
|
||||
\fB\-y\fR
|
||||
option;
|
||||
\fIhmac\fR
|
||||
is the type of the TSIG, default HMAC\-MD5,
|
||||
\fIname\fR
|
||||
is the name of the TSIG key and
|
||||
\fIkey\fR
|
||||
@ -185,7 +208,7 @@ is the actual key. The key is a base\-64 encoded string, typically generated by
|
||||
\fBdnssec\-keygen\fR(8). Caution should be taken when using the
|
||||
\fB\-y\fR
|
||||
option on multi\-user systems as the key can be visible in the output from
|
||||
\fBps\fR(1 )
|
||||
\fBps\fR(1)
|
||||
or in the shell's history file. When using TSIG authentication with
|
||||
\fBdig\fR, the name server that is queried needs to know the key and algorithm that is being used. In BIND, this is done by providing appropriate
|
||||
\fBkey\fR
|
||||
@ -202,19 +225,26 @@ Each query option is identified by a keyword preceded by a plus sign (+). Some k
|
||||
no
|
||||
to negate the meaning of that keyword. Other keywords assign values to options like the timeout interval. They have the form
|
||||
\fB+keyword=value\fR. The query options are:
|
||||
.TP 3n
|
||||
.PP
|
||||
\fB+[no]tcp\fR
|
||||
.RS 4
|
||||
Use [do not use] TCP when querying name servers. The default behaviour is to use UDP unless an AXFR or IXFR query is requested, in which case a TCP connection is used.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]vc\fR
|
||||
.RS 4
|
||||
Use [do not use] TCP when querying name servers. This alternate syntax to
|
||||
\fI+[no]tcp\fR
|
||||
is provided for backwards compatibility. The "vc" stands for "virtual circuit".
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]ignore\fR
|
||||
.RS 4
|
||||
Ignore truncation in UDP responses instead of retrying with TCP. By default, TCP retries are performed.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+domain=somename\fR
|
||||
.RS 4
|
||||
Set the search list to contain the single domain
|
||||
\fIsomename\fR, as if specified in a
|
||||
\fBdomain\fR
|
||||
@ -222,36 +252,59 @@ directive in
|
||||
\fI/etc/resolv.conf\fR, and enable search list processing as if the
|
||||
\fI+search\fR
|
||||
option were given.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]search\fR
|
||||
.RS 4
|
||||
Use [do not use] the search list defined by the searchlist or domain directive in
|
||||
\fIresolv.conf\fR
|
||||
(if any). The search list is not used by default.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]showsearch\fR
|
||||
.RS 4
|
||||
Perform [do not perform] a search showing intermediate results.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]defname\fR
|
||||
.RS 4
|
||||
Deprecated, treated as a synonym for
|
||||
\fI+[no]search\fR
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]aaonly\fR
|
||||
.RS 4
|
||||
Sets the "aa" flag in the query.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]aaflag\fR
|
||||
.RS 4
|
||||
A synonym for
|
||||
\fI+[no]aaonly\fR.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]adflag\fR
|
||||
.RS 4
|
||||
Set [do not set] the AD (authentic data) bit in the query. The AD bit currently has a standard meaning only in responses, not in queries, but the ability to set the bit in the query is provided for completeness.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]cdflag\fR
|
||||
.RS 4
|
||||
Set [do not set] the CD (checking disabled) bit in the query. This requests the server to not perform DNSSEC validation of responses.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]cl\fR
|
||||
.RS 4
|
||||
Display [do not display] the CLASS when printing the record.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]ttlid\fR
|
||||
.RS 4
|
||||
Display [do not display] the TTL when printing the record.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]recurse\fR
|
||||
.RS 4
|
||||
Toggle the setting of the RD (recursion desired) bit in the query. This bit is set by default, which means
|
||||
\fBdig\fR
|
||||
normally sends recursive queries. Recursion is automatically disabled when the
|
||||
@ -259,75 +312,109 @@ normally sends recursive queries. Recursion is automatically disabled when the
|
||||
or
|
||||
\fI+trace\fR
|
||||
query options are used.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]nssearch\fR
|
||||
.RS 4
|
||||
When this option is set,
|
||||
\fBdig\fR
|
||||
attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]trace\fR
|
||||
.RS 4
|
||||
Toggle tracing of the delegation path from the root name servers for the name being looked up. Tracing is disabled by default. When tracing is enabled,
|
||||
\fBdig\fR
|
||||
makes iterative queries to resolve the name being looked up. It will follow referrals from the root servers, showing the answer from each server that was used to resolve the lookup.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]cmd\fR
|
||||
.RS 4
|
||||
toggles the printing of the initial comment in the output identifying the version of
|
||||
\fBdig\fR
|
||||
and the query options that have been applied. This comment is printed by default.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]short\fR
|
||||
.RS 4
|
||||
Provide a terse answer. The default is to print the answer in a verbose form.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]identify\fR
|
||||
.RS 4
|
||||
Show [or do not show] the IP address and port number that supplied the answer when the
|
||||
\fI+short\fR
|
||||
option is enabled. If short form answers are requested, the default is not to show the source address and port number of the server that provided the answer.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]comments\fR
|
||||
.RS 4
|
||||
Toggle the display of comment lines in the output. The default is to print comments.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]stats\fR
|
||||
.RS 4
|
||||
This query option toggles the printing of statistics: when the query was made, the size of the reply and so on. The default behaviour is to print the query statistics.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]qr\fR
|
||||
.RS 4
|
||||
Print [do not print] the query as it is sent. By default, the query is not printed.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]question\fR
|
||||
.RS 4
|
||||
Print [do not print] the question section of a query when an answer is returned. The default is to print the question section as a comment.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]answer\fR
|
||||
.RS 4
|
||||
Display [do not display] the answer section of a reply. The default is to display it.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]authority\fR
|
||||
.RS 4
|
||||
Display [do not display] the authority section of a reply. The default is to display it.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]additional\fR
|
||||
.RS 4
|
||||
Display [do not display] the additional section of a reply. The default is to display it.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]all\fR
|
||||
.RS 4
|
||||
Set or clear all display flags.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+time=T\fR
|
||||
.RS 4
|
||||
Sets the timeout for a query to
|
||||
\fIT\fR
|
||||
seconds. The default time out is 5 seconds. An attempt to set
|
||||
\fIT\fR
|
||||
to less than 1 will result in a query timeout of 1 second being applied.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+tries=T\fR
|
||||
.RS 4
|
||||
Sets the number of times to try UDP queries to server to
|
||||
\fIT\fR
|
||||
instead of the default, 3. If
|
||||
\fIT\fR
|
||||
is less than or equal to zero, the number of tries is silently rounded up to 1.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+retry=T\fR
|
||||
.RS 4
|
||||
Sets the number of times to retry UDP queries to server to
|
||||
\fIT\fR
|
||||
instead of the default, 2. Unlike
|
||||
\fI+tries\fR, this does not include the initial query.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+ndots=D\fR
|
||||
.RS 4
|
||||
Set the number of dots that have to appear in
|
||||
\fIname\fR
|
||||
to
|
||||
@ -339,30 +426,51 @@ or
|
||||
\fBdomain\fR
|
||||
directive in
|
||||
\fI/etc/resolv.conf\fR.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+bufsize=B\fR
|
||||
.RS 4
|
||||
Set the UDP message buffer size advertised using EDNS0 to
|
||||
\fIB\fR
|
||||
bytes. The maximum and minimum sizes of this buffer are 65535 and 0 respectively. Values outside this range are rounded up or down appropriately.
|
||||
.TP 3n
|
||||
bytes. The maximum and minimum sizes of this buffer are 65535 and 0 respectively. Values outside this range are rounded up or down appropriately. Values other than zero will cause a EDNS query to be sent.
|
||||
.RE
|
||||
.PP
|
||||
\fB+edns=#\fR
|
||||
.RS 4
|
||||
Specify the EDNS version to query with. Valid values are 0 to 255. Setting the EDNS version will cause a EDNS query to be sent.
|
||||
\fB+noedns\fR
|
||||
clears the remembered EDNS version.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]multiline\fR
|
||||
.RS 4
|
||||
Print records like the SOA records in a verbose multi\-line format with human\-readable comments. The default is to print each record on a single line, to facilitate machine parsing of the
|
||||
\fBdig\fR
|
||||
output.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]fail\fR
|
||||
.RS 4
|
||||
Do not try the next server if you receive a SERVFAIL. The default is to not try the next server which is the reverse of normal stub resolver behaviour.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]besteffort\fR
|
||||
.RS 4
|
||||
Attempt to display the contents of messages which are malformed. The default is to not display malformed answers.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]dnssec\fR
|
||||
.RS 4
|
||||
Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO) in the OPT record in the additional section of the query.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]sigchase\fR
|
||||
.RS 4
|
||||
Chase DNSSEC signature chains. Requires dig be compiled with \-DDIG_SIGCHASE.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+trusted\-key=####\fR
|
||||
.RS 4
|
||||
Specifies a file containing trusted keys to be used with
|
||||
\fB+sigchase\fR. Each DNSKEY record must be on its own line.
|
||||
.sp
|
||||
@ -375,9 +483,12 @@ then
|
||||
in the current directory.
|
||||
.sp
|
||||
Requires dig be compiled with \-DDIG_SIGCHASE.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]topdown\fR
|
||||
.RS 4
|
||||
When chasing DNSSEC signature chains perform a top down validation. Requires dig be compiled with \-DDIG_SIGCHASE.
|
||||
.RE
|
||||
.SH "MULTIPLE QUERIES"
|
||||
.PP
|
||||
The BIND 9 implementation of
|
||||
@ -394,7 +505,7 @@ A global set of query options, which should be applied to all queries, can also
|
||||
\fB+[no]cmd\fR
|
||||
option) can be overridden by a query\-specific set of query options. For example:
|
||||
.sp
|
||||
.RS 3n
|
||||
.RS 4
|
||||
.nf
|
||||
dig +qr www.isc.org any \-x 127.0.0.1 isc.org ns +noqr
|
||||
.fi
|
||||
@ -414,6 +525,17 @@ which means that
|
||||
\fBdig\fR
|
||||
will not print the initial query when it looks up the NS records for
|
||||
isc.org.
|
||||
.SH "IDN SUPPORT"
|
||||
.PP
|
||||
If
|
||||
\fBdig\fR
|
||||
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names.
|
||||
\fBdig\fR
|
||||
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server. If you'd like to turn off the IDN support for some reason, defines the
|
||||
\fBIDN_DISABLE\fR
|
||||
environment variable. The IDN support is disabled if the variable is set when
|
||||
\fBdig\fR
|
||||
runs.
|
||||
.SH "FILES"
|
||||
.PP
|
||||
\fI/etc/resolv.conf\fR
|
||||
@ -425,8 +547,11 @@ isc.org.
|
||||
\fBnamed\fR(8),
|
||||
\fBdnssec\-keygen\fR(8),
|
||||
RFC1035.
|
||||
.SH "BUGS "
|
||||
.SH "BUGS"
|
||||
.PP
|
||||
There are probably too many query options.
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2004\-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
Copyright \(co 2000\-2003 Internet Software Consortium.
|
||||
.br
|
||||
|
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.c,v 1.157.2.13.2.31 2006/07/22 23:52:57 marka Exp $ */
|
||||
/* $Id: dig.c,v 1.186.18.26 2006/07/21 23:52:21 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
@ -40,6 +42,7 @@
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/tsig.h>
|
||||
|
||||
#include <bind9/getaddresses.h>
|
||||
|
||||
@ -67,6 +70,7 @@ static isc_boolean_t short_form = ISC_FALSE, printcmd = ISC_TRUE,
|
||||
ip6_int = ISC_FALSE, plusquest = ISC_FALSE, pluscomm = ISC_FALSE,
|
||||
multiline = ISC_FALSE, nottl = ISC_FALSE, noclass = ISC_FALSE;
|
||||
|
||||
/*% opcode text */
|
||||
static const char *opcodetext[] = {
|
||||
"QUERY",
|
||||
"IQUERY",
|
||||
@ -86,6 +90,7 @@ static const char *opcodetext[] = {
|
||||
"RESERVED15"
|
||||
};
|
||||
|
||||
/*% return code text */
|
||||
static const char *rcodetext[] = {
|
||||
"NOERROR",
|
||||
"FORMERR",
|
||||
@ -106,6 +111,7 @@ static const char *rcodetext[] = {
|
||||
"BADVERS"
|
||||
};
|
||||
|
||||
/*% print usage */
|
||||
static void
|
||||
print_usage(FILE *fp) {
|
||||
fputs(
|
||||
@ -122,11 +128,13 @@ usage(void) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/*% version */
|
||||
static void
|
||||
version(void) {
|
||||
fputs("DiG " VERSION "\n", stderr);
|
||||
}
|
||||
|
||||
/*% help */
|
||||
static void
|
||||
help(void) {
|
||||
print_usage(stdout);
|
||||
@ -141,10 +149,11 @@ help(void) {
|
||||
" -f filename (batch mode)\n"
|
||||
" -b address[#port] (bind to source address/port)\n"
|
||||
" -p port (specify port number)\n"
|
||||
" -q name (specify query name)\n"
|
||||
" -t type (specify query type)\n"
|
||||
" -c class (specify query class)\n"
|
||||
" -k keyfile (specify tsig key file)\n"
|
||||
" -y name:key (specify named base64 tsig key)\n"
|
||||
" -y [hmac:]name:key (specify named base64 tsig key)\n"
|
||||
" -4 (use IPv4 query transport only)\n"
|
||||
" -6 (use IPv6 query transport only)\n"
|
||||
" d-opt is of the form +keyword[=value], where keyword is:\n"
|
||||
@ -156,7 +165,9 @@ help(void) {
|
||||
" +domain=### (Set default domainname)\n"
|
||||
" +bufsize=### (Set EDNS0 Max UDP packet size)\n"
|
||||
" +ndots=### (Set NDOTS value)\n"
|
||||
" +edns=### (Set EDNS version)\n"
|
||||
" +[no]search (Set whether to use searchlist)\n"
|
||||
" +[no]showsearch (Search with intermediate results)\n"
|
||||
" +[no]defname (Ditto)\n"
|
||||
" +[no]recurse (Recursive mode)\n"
|
||||
" +[no]ignore (Don't revert to TCP for TC responses.)"
|
||||
@ -198,7 +209,7 @@ help(void) {
|
||||
stdout);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Callback from dighost.c to print the received message.
|
||||
*/
|
||||
void
|
||||
@ -219,10 +230,12 @@ received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
||||
time(&tnow);
|
||||
printf(";; WHEN: %s", ctime(&tnow));
|
||||
if (query->lookup->doing_xfr) {
|
||||
printf(";; XFR size: %u records (messages %u)\n",
|
||||
query->rr_count, query->msg_count);
|
||||
printf(";; XFR size: %u records (messages %u, "
|
||||
"bytes %" ISC_PRINT_QUADFORMAT "u)\n",
|
||||
query->rr_count, query->msg_count,
|
||||
query->byte_count);
|
||||
} else {
|
||||
printf(";; MSG SIZE rcvd: %d\n", bytes);
|
||||
printf(";; MSG SIZE rcvd: %u\n", bytes);
|
||||
|
||||
}
|
||||
if (key != NULL) {
|
||||
@ -236,8 +249,11 @@ received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
||||
puts("");
|
||||
} else if (query->lookup->identify && !short_form) {
|
||||
diff = isc_time_microdiff(&now, &query->time_sent);
|
||||
printf(";; Received %u bytes from %s(%s) in %d ms\n\n",
|
||||
bytes, fromtext, query->servname,
|
||||
printf(";; Received %" ISC_PRINT_QUADFORMAT "u bytes "
|
||||
"from %s(%s) in %d ms\n\n",
|
||||
query->lookup->doing_xfr ?
|
||||
query->byte_count : (isc_uint64_t)bytes,
|
||||
fromtext, query->servname,
|
||||
(int)diff/1000);
|
||||
}
|
||||
}
|
||||
@ -253,7 +269,7 @@ trying(char *frm, dig_lookup_t *lookup) {
|
||||
UNUSED(lookup);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Internal print routine used to print short form replies.
|
||||
*/
|
||||
static isc_result_t
|
||||
@ -283,7 +299,7 @@ say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* short_form message print handler. Calls above say_message()
|
||||
*/
|
||||
static isc_result_t
|
||||
@ -475,7 +491,16 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
||||
msg->counts[DNS_SECTION_ANSWER],
|
||||
msg->counts[DNS_SECTION_AUTHORITY],
|
||||
msg->counts[DNS_SECTION_ADDITIONAL]);
|
||||
|
||||
if (msg != query->lookup->sendmsg &&
|
||||
(msg->flags & DNS_MESSAGEFLAG_RD) != 0 &&
|
||||
(msg->flags & DNS_MESSAGEFLAG_RA) == 0)
|
||||
printf(";; WARNING: recursion requested "
|
||||
"but not available\n");
|
||||
}
|
||||
if (msg != query->lookup->sendmsg && extrabytes != 0U)
|
||||
printf(";; WARNING: Messages has %u extra byte%s at "
|
||||
"end\n", extrabytes, extrabytes != 0 ? "s" : "");
|
||||
}
|
||||
|
||||
repopulate_buffer:
|
||||
@ -578,7 +603,7 @@ cleanup:
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* print the greeting message when the program first starts up.
|
||||
*/
|
||||
static void
|
||||
@ -625,7 +650,7 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Reorder an argument list so that server names all come at the end.
|
||||
* This is a bit of a hack, to allow batch-mode processing to properly
|
||||
* handle the server options.
|
||||
@ -674,7 +699,7 @@ parse_uint(char *arg, const char *desc, isc_uint32_t max) {
|
||||
return (tmp);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* We're not using isc_commandline_parse() here since the command line
|
||||
* syntax of dig is quite a bit different from that which can be described
|
||||
* by that routine.
|
||||
@ -814,6 +839,8 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
||||
break;
|
||||
case 'n': /* dnssec */
|
||||
FULLCHECK("dnssec");
|
||||
if (state && lookup->edns == -1)
|
||||
lookup->edns = 0;
|
||||
lookup->dnssec = state;
|
||||
break;
|
||||
case 'o': /* domain */
|
||||
@ -829,6 +856,16 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
||||
goto invalid_option;
|
||||
}
|
||||
break;
|
||||
case 'e':
|
||||
FULLCHECK("edns");
|
||||
if (!state) {
|
||||
lookup->edns = -1;
|
||||
break;
|
||||
}
|
||||
if (value == NULL)
|
||||
goto need_value;
|
||||
lookup->edns = (isc_int16_t) parse_uint(value, "edns", 255);
|
||||
break;
|
||||
case 'f': /* fail */
|
||||
FULLCHECK("fail");
|
||||
lookup->servfail_stops = state;
|
||||
@ -928,17 +965,30 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
||||
FULLCHECK("search");
|
||||
usesearch = state;
|
||||
break;
|
||||
case 'h': /* short */
|
||||
FULLCHECK("short");
|
||||
short_form = state;
|
||||
if (state) {
|
||||
printcmd = ISC_FALSE;
|
||||
lookup->section_additional = ISC_FALSE;
|
||||
lookup->section_answer = ISC_TRUE;
|
||||
lookup->section_authority = ISC_FALSE;
|
||||
lookup->section_question = ISC_FALSE;
|
||||
lookup->comments = ISC_FALSE;
|
||||
lookup->stats = ISC_FALSE;
|
||||
case 'h':
|
||||
if (cmd[2] != 'o')
|
||||
goto invalid_option;
|
||||
switch (cmd[3]) {
|
||||
case 'r': /* short */
|
||||
FULLCHECK("short");
|
||||
short_form = state;
|
||||
if (state) {
|
||||
printcmd = ISC_FALSE;
|
||||
lookup->section_additional = ISC_FALSE;
|
||||
lookup->section_answer = ISC_TRUE;
|
||||
lookup->section_authority = ISC_FALSE;
|
||||
lookup->section_question = ISC_FALSE;
|
||||
lookup->comments = ISC_FALSE;
|
||||
lookup->stats = ISC_FALSE;
|
||||
}
|
||||
break;
|
||||
case 'w': /* showsearch */
|
||||
FULLCHECK("showsearch");
|
||||
showsearch = state;
|
||||
usesearch = state;
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
}
|
||||
break;
|
||||
#ifdef DIG_SIGCHASE
|
||||
@ -1047,16 +1097,16 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* ISC_TRUE returned if value was used
|
||||
/*%
|
||||
* #ISC_TRUE returned if value was used
|
||||
*/
|
||||
static const char *single_dash_opts = "46dhimnv";
|
||||
static const char *dash_opts = "46bcdfhikmnptvyx";
|
||||
static isc_boolean_t
|
||||
dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
isc_boolean_t *open_type_class)
|
||||
isc_boolean_t *open_type_class, isc_boolean_t config_only)
|
||||
{
|
||||
char opt, *value, *ptr;
|
||||
char opt, *value, *ptr, *ptr2, *ptr3;
|
||||
isc_result_t result;
|
||||
isc_boolean_t value_from_next;
|
||||
isc_textregion_t tr;
|
||||
@ -1189,6 +1239,20 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
case 'p':
|
||||
port = (in_port_t) parse_uint(value, "port number", MAXPORT);
|
||||
return (value_from_next);
|
||||
case 'q':
|
||||
if (!config_only) {
|
||||
(*lookup) = clone_lookup(default_lookup,
|
||||
ISC_TRUE);
|
||||
strncpy((*lookup)->textname, value,
|
||||
sizeof((*lookup)->textname));
|
||||
(*lookup)->textname[sizeof((*lookup)->textname)-1]=0;
|
||||
(*lookup)->trace_root = ISC_TF((*lookup)->trace ||
|
||||
(*lookup)->ns_search_only);
|
||||
(*lookup)->new_search = ISC_TRUE;
|
||||
ISC_LIST_APPEND(lookup_list, (*lookup), link);
|
||||
debug("looking up %s", (*lookup)->textname);
|
||||
}
|
||||
return (value_from_next);
|
||||
case 't':
|
||||
*open_type_class = ISC_FALSE;
|
||||
if (strncasecmp(value, "ixfr=", 5) == 0) {
|
||||
@ -1232,16 +1296,83 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
value);
|
||||
return (value_from_next);
|
||||
case 'y':
|
||||
ptr = next_token(&value,":");
|
||||
ptr = next_token(&value,":"); /* hmac type or name */
|
||||
if (ptr == NULL) {
|
||||
usage();
|
||||
}
|
||||
ptr2 = next_token(&value, ":"); /* name or secret */
|
||||
if (ptr2 == NULL)
|
||||
usage();
|
||||
ptr3 = next_token(&value,":"); /* secret or NULL */
|
||||
if (ptr3 != NULL) {
|
||||
if (strcasecmp(ptr, "hmac-md5") == 0) {
|
||||
hmacname = DNS_TSIG_HMACMD5_NAME;
|
||||
digestbits = 0;
|
||||
} else if (strncasecmp(ptr, "hmac-md5-", 9) == 0) {
|
||||
hmacname = DNS_TSIG_HMACMD5_NAME;
|
||||
digestbits = parse_uint(&ptr[9],
|
||||
"digest-bits [0..128]",
|
||||
128);
|
||||
digestbits = (digestbits + 7) & ~0x7U;
|
||||
} else if (strcasecmp(ptr, "hmac-sha1") == 0) {
|
||||
hmacname = DNS_TSIG_HMACSHA1_NAME;
|
||||
digestbits = 0;
|
||||
} else if (strncasecmp(ptr, "hmac-sha1-", 10) == 0) {
|
||||
hmacname = DNS_TSIG_HMACSHA1_NAME;
|
||||
digestbits = parse_uint(&ptr[10],
|
||||
"digest-bits [0..160]",
|
||||
160);
|
||||
digestbits = (digestbits + 7) & ~0x7U;
|
||||
} else if (strcasecmp(ptr, "hmac-sha224") == 0) {
|
||||
hmacname = DNS_TSIG_HMACSHA224_NAME;
|
||||
digestbits = 0;
|
||||
} else if (strncasecmp(ptr, "hmac-sha224-", 12) == 0) {
|
||||
hmacname = DNS_TSIG_HMACSHA224_NAME;
|
||||
digestbits = parse_uint(&ptr[12],
|
||||
"digest-bits [0..224]",
|
||||
224);
|
||||
digestbits = (digestbits + 7) & ~0x7U;
|
||||
} else if (strcasecmp(ptr, "hmac-sha256") == 0) {
|
||||
hmacname = DNS_TSIG_HMACSHA256_NAME;
|
||||
digestbits = 0;
|
||||
} else if (strncasecmp(ptr, "hmac-sha256-", 12) == 0) {
|
||||
hmacname = DNS_TSIG_HMACSHA256_NAME;
|
||||
digestbits = parse_uint(&ptr[12],
|
||||
"digest-bits [0..256]",
|
||||
256);
|
||||
digestbits = (digestbits + 7) & ~0x7U;
|
||||
} else if (strcasecmp(ptr, "hmac-sha384") == 0) {
|
||||
hmacname = DNS_TSIG_HMACSHA384_NAME;
|
||||
digestbits = 0;
|
||||
} else if (strncasecmp(ptr, "hmac-sha384-", 12) == 0) {
|
||||
hmacname = DNS_TSIG_HMACSHA384_NAME;
|
||||
digestbits = parse_uint(&ptr[12],
|
||||
"digest-bits [0..384]",
|
||||
384);
|
||||
digestbits = (digestbits + 7) & ~0x7U;
|
||||
} else if (strcasecmp(ptr, "hmac-sha512") == 0) {
|
||||
hmacname = DNS_TSIG_HMACSHA512_NAME;
|
||||
digestbits = 0;
|
||||
} else if (strncasecmp(ptr, "hmac-sha512-", 12) == 0) {
|
||||
hmacname = DNS_TSIG_HMACSHA512_NAME;
|
||||
digestbits = parse_uint(&ptr[12],
|
||||
"digest-bits [0..512]",
|
||||
512);
|
||||
digestbits = (digestbits + 7) & ~0x7U;
|
||||
} else {
|
||||
fprintf(stderr, ";; Warning, ignoring "
|
||||
"invalid TSIG algorithm %s\n", ptr);
|
||||
return (value_from_next);
|
||||
}
|
||||
ptr = ptr2;
|
||||
ptr2 = ptr3;
|
||||
} else {
|
||||
hmacname = DNS_TSIG_HMACMD5_NAME;
|
||||
digestbits = 0;
|
||||
}
|
||||
strncpy(keynametext, ptr, sizeof(keynametext));
|
||||
keynametext[sizeof(keynametext)-1]=0;
|
||||
ptr = next_token(&value, "");
|
||||
if (ptr == NULL)
|
||||
usage();
|
||||
strncpy(keysecret, ptr, sizeof(keysecret));
|
||||
strncpy(keysecret, ptr2, sizeof(keysecret));
|
||||
keysecret[sizeof(keysecret)-1]=0;
|
||||
return (value_from_next);
|
||||
case 'x':
|
||||
@ -1273,10 +1404,11 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Because we may be trying to do memory allocation recording, we're going
|
||||
* to need to parse the arguments for the -m *before* we start the main
|
||||
* argument parsing routine.
|
||||
*
|
||||
* I'd prefer not to have to do this, but I am not quite sure how else to
|
||||
* fix the problem. Argument parsing in dig involves memory allocation
|
||||
* by its nature, so it can't be done in the main argument parser.
|
||||
@ -1421,13 +1553,15 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
||||
} else if (rv[0][0] == '-') {
|
||||
if (rc <= 1) {
|
||||
if (dash_option(&rv[0][1], NULL,
|
||||
&lookup, &open_type_class)) {
|
||||
&lookup, &open_type_class,
|
||||
config_only)) {
|
||||
rc--;
|
||||
rv++;
|
||||
}
|
||||
} else {
|
||||
if (dash_option(&rv[0][1], rv[1],
|
||||
&lookup, &open_type_class)) {
|
||||
&lookup, &open_type_class,
|
||||
config_only)) {
|
||||
rc--;
|
||||
rv++;
|
||||
}
|
||||
@ -1621,6 +1755,7 @@ dighost_shutdown(void) {
|
||||
}
|
||||
}
|
||||
|
||||
/*% Main processing routine for dig */
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
isc_result_t result;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@ -14,501 +14,616 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: dig.html,v 1.6.2.4.2.15 2006/06/29 13:02:30 marka Exp $ -->
|
||||
<!-- $Id: dig.html,v 1.13.18.25 2007/01/30 00:23:44 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>dig</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482688"></a><div class="titlepage"></div>
|
||||
<a name="man.dig"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p>dig — DNS lookup utility</p>
|
||||
</div>
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p><code class="command">dig</code> [@server] [<code class="option">-b <em class="replaceable"><code>address</code></em></code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-f <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-k <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-p <em class="replaceable"><code>port#</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-x <em class="replaceable"><code>addr</code></em></code>] [<code class="option">-y <em class="replaceable"><code>name:key</code></em></code>] [<code class="option">-4</code>] [<code class="option">-6</code>] [name] [type] [class] [queryopt...]</p></div>
|
||||
<div class="cmdsynopsis"><p><code class="command">dig</code> [@server] [<code class="option">-b <em class="replaceable"><code>address</code></em></code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-f <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-k <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-p <em class="replaceable"><code>port#</code></em></code>] [<code class="option">-q <em class="replaceable"><code>name</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-x <em class="replaceable"><code>addr</code></em></code>] [<code class="option">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]name:key</code></em></code>] [<code class="option">-4</code>] [<code class="option">-6</code>] [name] [type] [class] [queryopt...]</p></div>
|
||||
<div class="cmdsynopsis"><p><code class="command">dig</code> [<code class="option">-h</code>]</p></div>
|
||||
<div class="cmdsynopsis"><p><code class="command">dig</code> [global-queryopt...] [query...]</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549541"></a><h2>DESCRIPTION</h2>
|
||||
<a name="id2543508"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">dig</strong></span>
|
||||
(domain information groper) is a flexible tool
|
||||
for interrogating DNS name servers. It performs DNS lookups and
|
||||
displays the answers that are returned from the name server(s) that
|
||||
were queried. Most DNS administrators use <span><strong class="command">dig</strong></span> to
|
||||
troubleshoot DNS problems because of its flexibility, ease of use and
|
||||
clarity of output. Other lookup tools tend to have less functionality
|
||||
than <span><strong class="command">dig</strong></span>.
|
||||
</p>
|
||||
<p>
|
||||
<span><strong class="command">dig</strong></span> (domain information groper) is a flexible tool
|
||||
for interrogating DNS name servers. It performs DNS lookups and
|
||||
displays the answers that are returned from the name server(s) that
|
||||
were queried. Most DNS administrators use <span><strong class="command">dig</strong></span> to
|
||||
troubleshoot DNS problems because of its flexibility, ease of use and
|
||||
clarity of output. Other lookup tools tend to have less functionality
|
||||
than <span><strong class="command">dig</strong></span>.
|
||||
</p>
|
||||
Although <span><strong class="command">dig</strong></span> is normally used with
|
||||
command-line
|
||||
arguments, it also has a batch mode of operation for reading lookup
|
||||
requests from a file. A brief summary of its command-line arguments
|
||||
and options is printed when the <code class="option">-h</code> option is given.
|
||||
Unlike earlier versions, the BIND9 implementation of
|
||||
<span><strong class="command">dig</strong></span> allows multiple lookups to be issued
|
||||
from the
|
||||
command line.
|
||||
</p>
|
||||
<p>
|
||||
Although <span><strong class="command">dig</strong></span> is normally used with command-line
|
||||
arguments, it also has a batch mode of operation for reading lookup
|
||||
requests from a file. A brief summary of its command-line arguments
|
||||
and options is printed when the <code class="option">-h</code> option is given.
|
||||
Unlike earlier versions, the BIND9 implementation of
|
||||
<span><strong class="command">dig</strong></span> allows multiple lookups to be issued from the
|
||||
command line.
|
||||
</p>
|
||||
Unless it is told to query a specific name server,
|
||||
<span><strong class="command">dig</strong></span> will try each of the servers listed
|
||||
in
|
||||
<code class="filename">/etc/resolv.conf</code>.
|
||||
</p>
|
||||
<p>
|
||||
Unless it is told to query a specific name server,
|
||||
<span><strong class="command">dig</strong></span> will try each of the servers listed in
|
||||
<code class="filename">/etc/resolv.conf</code>.
|
||||
</p>
|
||||
When no command line arguments or options are given, will perform an
|
||||
NS query for "." (the root).
|
||||
</p>
|
||||
<p>
|
||||
When no command line arguments or options are given, will perform an
|
||||
NS query for "." (the root).
|
||||
</p>
|
||||
It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
|
||||
<code class="filename">${HOME}/.digrc</code>. This file is read and
|
||||
any options in it
|
||||
are applied before the command line arguments.
|
||||
</p>
|
||||
<p>
|
||||
It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
|
||||
<code class="filename">${HOME}/.digrc</code>. This file is read and any options in it
|
||||
are applied before the command line arguments.
|
||||
</p>
|
||||
The IN and CH class names overlap with the IN and CH top level
|
||||
domains names. Either use the <code class="option">-t</code> and
|
||||
<code class="option">-c</code> options to specify the type and class or
|
||||
use the <code class="option">-q</code> the specify the domain name or
|
||||
use "IN." and "CH." when looking up these top level domains.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549600"></a><h2>SIMPLE USAGE</h2>
|
||||
<a name="id2543577"></a><h2>SIMPLE USAGE</h2>
|
||||
<p>
|
||||
A typical invocation of <span><strong class="command">dig</strong></span> looks like:
|
||||
</p>
|
||||
A typical invocation of <span><strong class="command">dig</strong></span> looks like:
|
||||
</p>
|
||||
<pre class="programlisting"> dig @server name type </pre>
|
||||
<p> where:
|
||||
<p>
|
||||
where:
|
||||
|
||||
</p>
|
||||
</p>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term"><code class="constant">server</code></span></dt>
|
||||
<dd><p>
|
||||
is the name or IP address of the name server to query. This can be an IPv4
|
||||
address in dotted-decimal notation or an IPv6
|
||||
address in colon-delimited notation. When the supplied
|
||||
<em class="parameter"><code>server</code></em> argument is a hostname,
|
||||
<span><strong class="command">dig</strong></span> resolves that name before querying that name
|
||||
server. If no <em class="parameter"><code>server</code></em> argument is provided,
|
||||
<span><strong class="command">dig</strong></span> consults <code class="filename">/etc/resolv.conf</code>
|
||||
and queries the name servers listed there. The reply from the name
|
||||
server that responds is displayed.
|
||||
</p></dd>
|
||||
is the name or IP address of the name server to query. This can
|
||||
be an IPv4
|
||||
address in dotted-decimal notation or an IPv6
|
||||
address in colon-delimited notation. When the supplied
|
||||
<em class="parameter"><code>server</code></em> argument is a
|
||||
hostname,
|
||||
<span><strong class="command">dig</strong></span> resolves that name before
|
||||
querying that name
|
||||
server. If no <em class="parameter"><code>server</code></em>
|
||||
argument is provided,
|
||||
<span><strong class="command">dig</strong></span> consults <code class="filename">/etc/resolv.conf</code>
|
||||
and queries the name servers listed there. The reply from the
|
||||
name
|
||||
server that responds is displayed.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">name</code></span></dt>
|
||||
<dd><p>
|
||||
is the name of the resource record that is to be looked up.
|
||||
</p></dd>
|
||||
is the name of the resource record that is to be looked up.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">type</code></span></dt>
|
||||
<dd><p>
|
||||
indicates what type of query is required —
|
||||
ANY, A, MX, SIG, etc.
|
||||
<em class="parameter"><code>type</code></em> can be any valid query type. If no
|
||||
<em class="parameter"><code>type</code></em> argument is supplied,
|
||||
<span><strong class="command">dig</strong></span> will perform a lookup for an A record.
|
||||
</p></dd>
|
||||
indicates what type of query is required —
|
||||
ANY, A, MX, SIG, etc.
|
||||
<em class="parameter"><code>type</code></em> can be any valid query
|
||||
type. If no
|
||||
<em class="parameter"><code>type</code></em> argument is supplied,
|
||||
<span><strong class="command">dig</strong></span> will perform a lookup for an
|
||||
A record.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
<p>
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549747"></a><h2>OPTIONS</h2>
|
||||
<a name="id2543668"></a><h2>OPTIONS</h2>
|
||||
<p>
|
||||
The <code class="option">-b</code> option sets the source IP address of the query
|
||||
to <em class="parameter"><code>address</code></em>. This must be a valid address on
|
||||
one of the host's network interfaces or "0.0.0.0" or "::". An optional port
|
||||
may be specified by appending "#<port>"
|
||||
</p>
|
||||
The <code class="option">-b</code> option sets the source IP address of the query
|
||||
to <em class="parameter"><code>address</code></em>. This must be a valid
|
||||
address on
|
||||
one of the host's network interfaces or "0.0.0.0" or "::". An optional
|
||||
port
|
||||
may be specified by appending "#<port>"
|
||||
</p>
|
||||
<p>
|
||||
The default query class (IN for internet) is overridden by the
|
||||
<code class="option">-c</code> option. <em class="parameter"><code>class</code></em> is any valid
|
||||
class, such as HS for Hesiod records or CH for CHAOSNET records.
|
||||
</p>
|
||||
The default query class (IN for internet) is overridden by the
|
||||
<code class="option">-c</code> option. <em class="parameter"><code>class</code></em> is
|
||||
any valid
|
||||
class, such as HS for Hesiod records or CH for CHAOSNET records.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="option">-f</code> option makes <span><strong class="command">dig </strong></span> operate
|
||||
in batch mode by reading a list of lookup requests to process from the
|
||||
file <em class="parameter"><code>filename</code></em>. The file contains a number of
|
||||
queries, one per line. Each entry in the file should be organised in
|
||||
the same way they would be presented as queries to
|
||||
<span><strong class="command">dig</strong></span> using the command-line interface.
|
||||
</p>
|
||||
The <code class="option">-f</code> option makes <span><strong class="command">dig </strong></span>
|
||||
operate
|
||||
in batch mode by reading a list of lookup requests to process from the
|
||||
file <em class="parameter"><code>filename</code></em>. The file contains a
|
||||
number of
|
||||
queries, one per line. Each entry in the file should be organised in
|
||||
the same way they would be presented as queries to
|
||||
<span><strong class="command">dig</strong></span> using the command-line interface.
|
||||
</p>
|
||||
<p>
|
||||
If a non-standard port number is to be queried, the
|
||||
<code class="option">-p</code> option is used. <em class="parameter"><code>port#</code></em> is
|
||||
the port number that <span><strong class="command">dig</strong></span> will send its queries
|
||||
instead of the standard DNS port number 53. This option would be used
|
||||
to test a name server that has been configured to listen for queries
|
||||
on a non-standard port number.
|
||||
</p>
|
||||
If a non-standard port number is to be queried, the
|
||||
<code class="option">-p</code> option is used. <em class="parameter"><code>port#</code></em> is
|
||||
the port number that <span><strong class="command">dig</strong></span> will send its
|
||||
queries
|
||||
instead of the standard DNS port number 53. This option would be used
|
||||
to test a name server that has been configured to listen for queries
|
||||
on a non-standard port number.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="option">-4</code> option forces <span><strong class="command">dig</strong></span> to only
|
||||
use IPv4 query transport. The <code class="option">-6</code> option forces
|
||||
<span><strong class="command">dig</strong></span> to only use IPv6 query transport.
|
||||
</p>
|
||||
The <code class="option">-4</code> option forces <span><strong class="command">dig</strong></span>
|
||||
to only
|
||||
use IPv4 query transport. The <code class="option">-6</code> option forces
|
||||
<span><strong class="command">dig</strong></span> to only use IPv6 query transport.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="option">-t</code> option sets the query type to
|
||||
<em class="parameter"><code>type</code></em>. It can be any valid query type which is
|
||||
supported in BIND9. The default query type "A", unless the
|
||||
<code class="option">-x</code> option is supplied to indicate a reverse lookup.
|
||||
A zone transfer can be requested by specifying a type of AXFR. When
|
||||
an incremental zone transfer (IXFR) is required,
|
||||
<em class="parameter"><code>type</code></em> is set to <code class="literal">ixfr=N</code>.
|
||||
The incremental zone transfer will contain the changes made to the zone
|
||||
since the serial number in the zone's SOA record was
|
||||
<em class="parameter"><code>N</code></em>.
|
||||
</p>
|
||||
The <code class="option">-t</code> option sets the query type to
|
||||
<em class="parameter"><code>type</code></em>. It can be any valid query type
|
||||
which is
|
||||
supported in BIND9. The default query type "A", unless the
|
||||
<code class="option">-x</code> option is supplied to indicate a reverse lookup.
|
||||
A zone transfer can be requested by specifying a type of AXFR. When
|
||||
an incremental zone transfer (IXFR) is required,
|
||||
<em class="parameter"><code>type</code></em> is set to <code class="literal">ixfr=N</code>.
|
||||
The incremental zone transfer will contain the changes made to the zone
|
||||
since the serial number in the zone's SOA record was
|
||||
<em class="parameter"><code>N</code></em>.
|
||||
</p>
|
||||
<p>
|
||||
Reverse lookups - mapping addresses to names - are simplified by the
|
||||
<code class="option">-x</code> option. <em class="parameter"><code>addr</code></em> is an IPv4
|
||||
address in dotted-decimal notation, or a colon-delimited IPv6 address.
|
||||
When this option is used, there is no need to provide the
|
||||
<em class="parameter"><code>name</code></em>, <em class="parameter"><code>class</code></em> and
|
||||
<em class="parameter"><code>type</code></em> arguments. <span><strong class="command">dig</strong></span>
|
||||
automatically performs a lookup for a name like
|
||||
<code class="literal">11.12.13.10.in-addr.arpa</code> and sets the query type and
|
||||
class to PTR and IN respectively. By default, IPv6 addresses are
|
||||
looked up using nibble format under the IP6.ARPA domain.
|
||||
To use the older RFC1886 method using the IP6.INT domain
|
||||
specify the <code class="option">-i</code> option. Bit string labels (RFC2874)
|
||||
are now experimental and are not attempted.
|
||||
</p>
|
||||
The <code class="option">-q</code> option sets the query name to
|
||||
<em class="parameter"><code>name</code></em>. This useful do distingish the
|
||||
<em class="parameter"><code>name</code></em> from other arguments.
|
||||
</p>
|
||||
<p>
|
||||
To sign the DNS queries sent by <span><strong class="command">dig</strong></span> and their
|
||||
responses using transaction signatures (TSIG), specify a TSIG key file
|
||||
using the <code class="option">-k</code> option. You can also specify the TSIG
|
||||
key itself on the command line using the <code class="option">-y</code> option;
|
||||
<em class="parameter"><code>name</code></em> is the name of the TSIG key and
|
||||
<em class="parameter"><code>key</code></em> is the actual key. The key is a base-64
|
||||
encoded string, typically generated by <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
|
||||
Reverse lookups - mapping addresses to names - are simplified by the
|
||||
<code class="option">-x</code> option. <em class="parameter"><code>addr</code></em> is
|
||||
an IPv4
|
||||
address in dotted-decimal notation, or a colon-delimited IPv6 address.
|
||||
When this option is used, there is no need to provide the
|
||||
<em class="parameter"><code>name</code></em>, <em class="parameter"><code>class</code></em> and
|
||||
<em class="parameter"><code>type</code></em> arguments. <span><strong class="command">dig</strong></span>
|
||||
automatically performs a lookup for a name like
|
||||
<code class="literal">11.12.13.10.in-addr.arpa</code> and sets the
|
||||
query type and
|
||||
class to PTR and IN respectively. By default, IPv6 addresses are
|
||||
looked up using nibble format under the IP6.ARPA domain.
|
||||
To use the older RFC1886 method using the IP6.INT domain
|
||||
specify the <code class="option">-i</code> option. Bit string labels (RFC2874)
|
||||
are now experimental and are not attempted.
|
||||
</p>
|
||||
<p>
|
||||
To sign the DNS queries sent by <span><strong class="command">dig</strong></span> and
|
||||
their
|
||||
responses using transaction signatures (TSIG), specify a TSIG key file
|
||||
using the <code class="option">-k</code> option. You can also specify the TSIG
|
||||
key itself on the command line using the <code class="option">-y</code> option;
|
||||
<em class="parameter"><code>hmac</code></em> is the type of the TSIG, default HMAC-MD5,
|
||||
<em class="parameter"><code>name</code></em> is the name of the TSIG key and
|
||||
<em class="parameter"><code>key</code></em> is the actual key. The key is a
|
||||
base-64
|
||||
encoded string, typically generated by
|
||||
<span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
|
||||
|
||||
Caution should be taken when using the <code class="option">-y</code> option on
|
||||
multi-user systems as the key can be visible in the output from
|
||||
<span class="citerefentry"><span class="refentrytitle">ps</span>(1
|
||||
)</span> or in the shell's history file. When
|
||||
using TSIG authentication with <span><strong class="command">dig</strong></span>, the name
|
||||
server that is queried needs to know the key and algorithm that is
|
||||
being used. In BIND, this is done by providing appropriate
|
||||
<span><strong class="command">key</strong></span> and <span><strong class="command">server</strong></span> statements in
|
||||
<code class="filename">named.conf</code>.
|
||||
</p>
|
||||
Caution should be taken when using the <code class="option">-y</code> option on
|
||||
multi-user systems as the key can be visible in the output from
|
||||
<span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span>
|
||||
or in the shell's history file. When
|
||||
using TSIG authentication with <span><strong class="command">dig</strong></span>, the name
|
||||
server that is queried needs to know the key and algorithm that is
|
||||
being used. In BIND, this is done by providing appropriate
|
||||
<span><strong class="command">key</strong></span> and <span><strong class="command">server</strong></span> statements in
|
||||
<code class="filename">named.conf</code>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549998"></a><h2>QUERY OPTIONS</h2>
|
||||
<a name="id2543939"></a><h2>QUERY OPTIONS</h2>
|
||||
<p><span><strong class="command">dig</strong></span>
|
||||
provides a number of query options which affect
|
||||
the way in which lookups are made and the results displayed. Some of
|
||||
these set or reset flag bits in the query header, some determine which
|
||||
sections of the answer get printed, and others determine the timeout
|
||||
and retry strategies.
|
||||
</p>
|
||||
<p>
|
||||
<span><strong class="command">dig</strong></span> provides a number of query options which affect
|
||||
the way in which lookups are made and the results displayed. Some of
|
||||
these set or reset flag bits in the query header, some determine which
|
||||
sections of the answer get printed, and others determine the timeout
|
||||
and retry strategies.
|
||||
</p>
|
||||
<p>
|
||||
Each query option is identified by a keyword preceded by a plus sign
|
||||
(<code class="literal">+</code>). Some keywords set or reset an option. These may be preceded
|
||||
by the string <code class="literal">no</code> to negate the meaning of that keyword. Other
|
||||
keywords assign values to options like the timeout interval. They
|
||||
have the form <code class="option">+keyword=value</code>.
|
||||
The query options are:
|
||||
Each query option is identified by a keyword preceded by a plus sign
|
||||
(<code class="literal">+</code>). Some keywords set or reset an
|
||||
option. These may be preceded
|
||||
by the string <code class="literal">no</code> to negate the meaning of
|
||||
that keyword. Other
|
||||
keywords assign values to options like the timeout interval. They
|
||||
have the form <code class="option">+keyword=value</code>.
|
||||
The query options are:
|
||||
|
||||
</p>
|
||||
</p>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
|
||||
<dd><p>
|
||||
Use [do not use] TCP when querying name servers. The default
|
||||
behaviour is to use UDP unless an AXFR or IXFR query is requested, in
|
||||
which case a TCP connection is used.
|
||||
</p></dd>
|
||||
Use [do not use] TCP when querying name servers. The default
|
||||
behaviour is to use UDP unless an AXFR or IXFR query is
|
||||
requested, in
|
||||
which case a TCP connection is used.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]vc</code></span></dt>
|
||||
<dd><p>
|
||||
Use [do not use] TCP when querying name servers. This alternate
|
||||
syntax to <em class="parameter"><code>+[no]tcp</code></em> is provided for backwards
|
||||
compatibility. The "vc" stands for "virtual circuit".
|
||||
</p></dd>
|
||||
Use [do not use] TCP when querying name servers. This alternate
|
||||
syntax to <em class="parameter"><code>+[no]tcp</code></em> is
|
||||
provided for backwards
|
||||
compatibility. The "vc" stands for "virtual circuit".
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
|
||||
<dd><p>
|
||||
Ignore truncation in UDP responses instead of retrying with TCP. By
|
||||
default, TCP retries are performed.
|
||||
</p></dd>
|
||||
Ignore truncation in UDP responses instead of retrying with TCP.
|
||||
By
|
||||
default, TCP retries are performed.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+domain=somename</code></span></dt>
|
||||
<dd><p>
|
||||
Set the search list to contain the single domain
|
||||
<em class="parameter"><code>somename</code></em>, as if specified in a
|
||||
<span><strong class="command">domain</strong></span> directive in
|
||||
<code class="filename">/etc/resolv.conf</code>, and enable search list
|
||||
processing as if the <em class="parameter"><code>+search</code></em> option were given.
|
||||
</p></dd>
|
||||
Set the search list to contain the single domain
|
||||
<em class="parameter"><code>somename</code></em>, as if specified in
|
||||
a
|
||||
<span><strong class="command">domain</strong></span> directive in
|
||||
<code class="filename">/etc/resolv.conf</code>, and enable
|
||||
search list
|
||||
processing as if the <em class="parameter"><code>+search</code></em>
|
||||
option were given.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]search</code></span></dt>
|
||||
<dd><p>
|
||||
Use [do not use] the search list defined by the searchlist or domain
|
||||
directive in <code class="filename">resolv.conf</code> (if any).
|
||||
The search list is not used by default.
|
||||
</p></dd>
|
||||
Use [do not use] the search list defined by the searchlist or
|
||||
domain
|
||||
directive in <code class="filename">resolv.conf</code> (if
|
||||
any).
|
||||
The search list is not used by default.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
|
||||
<dd><p>
|
||||
Perform [do not perform] a search showing intermediate
|
||||
results.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]defname</code></span></dt>
|
||||
<dd><p>
|
||||
Deprecated, treated as a synonym for <em class="parameter"><code>+[no]search</code></em>
|
||||
</p></dd>
|
||||
Deprecated, treated as a synonym for <em class="parameter"><code>+[no]search</code></em>
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]aaonly</code></span></dt>
|
||||
<dd><p>
|
||||
Sets the "aa" flag in the query.
|
||||
</p></dd>
|
||||
Sets the "aa" flag in the query.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]aaflag</code></span></dt>
|
||||
<dd><p>
|
||||
A synonym for <em class="parameter"><code>+[no]aaonly</code></em>.
|
||||
</p></dd>
|
||||
A synonym for <em class="parameter"><code>+[no]aaonly</code></em>.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]adflag</code></span></dt>
|
||||
<dd><p>
|
||||
Set [do not set] the AD (authentic data) bit in the query. The AD bit
|
||||
currently has a standard meaning only in responses, not in queries,
|
||||
but the ability to set the bit in the query is provided for
|
||||
completeness.
|
||||
</p></dd>
|
||||
Set [do not set] the AD (authentic data) bit in the query. The
|
||||
AD bit
|
||||
currently has a standard meaning only in responses, not in
|
||||
queries,
|
||||
but the ability to set the bit in the query is provided for
|
||||
completeness.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]cdflag</code></span></dt>
|
||||
<dd><p>
|
||||
Set [do not set] the CD (checking disabled) bit in the query. This
|
||||
requests the server to not perform DNSSEC validation of responses.
|
||||
</p></dd>
|
||||
Set [do not set] the CD (checking disabled) bit in the query.
|
||||
This
|
||||
requests the server to not perform DNSSEC validation of
|
||||
responses.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]cl</code></span></dt>
|
||||
<dd><p>
|
||||
Display [do not display] the CLASS when printing the record.
|
||||
</p></dd>
|
||||
Display [do not display] the CLASS when printing the record.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
|
||||
<dd><p>
|
||||
Display [do not display] the TTL when printing the record.
|
||||
</p></dd>
|
||||
Display [do not display] the TTL when printing the record.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]recurse</code></span></dt>
|
||||
<dd><p>
|
||||
Toggle the setting of the RD (recursion desired) bit in the query.
|
||||
This bit is set by default, which means <span><strong class="command">dig</strong></span>
|
||||
normally sends recursive queries. Recursion is automatically disabled
|
||||
when the <em class="parameter"><code>+nssearch</code></em> or
|
||||
<em class="parameter"><code>+trace</code></em> query options are used.
|
||||
</p></dd>
|
||||
Toggle the setting of the RD (recursion desired) bit in the
|
||||
query.
|
||||
This bit is set by default, which means <span><strong class="command">dig</strong></span>
|
||||
normally sends recursive queries. Recursion is automatically
|
||||
disabled
|
||||
when the <em class="parameter"><code>+nssearch</code></em> or
|
||||
<em class="parameter"><code>+trace</code></em> query options are
|
||||
used.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]nssearch</code></span></dt>
|
||||
<dd><p>
|
||||
When this option is set, <span><strong class="command">dig</strong></span> attempts to find the
|
||||
authoritative name servers for the zone containing the name being
|
||||
looked up and display the SOA record that each name server has for the
|
||||
zone.
|
||||
</p></dd>
|
||||
When this option is set, <span><strong class="command">dig</strong></span>
|
||||
attempts to find the
|
||||
authoritative name servers for the zone containing the name
|
||||
being
|
||||
looked up and display the SOA record that each name server has
|
||||
for the
|
||||
zone.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]trace</code></span></dt>
|
||||
<dd><p>
|
||||
Toggle tracing of the delegation path from the root name servers for
|
||||
the name being looked up. Tracing is disabled by default. When
|
||||
tracing is enabled, <span><strong class="command">dig</strong></span> makes iterative queries to
|
||||
resolve the name being looked up. It will follow referrals from the
|
||||
root servers, showing the answer from each server that was used to
|
||||
resolve the lookup.
|
||||
</p></dd>
|
||||
Toggle tracing of the delegation path from the root name servers
|
||||
for
|
||||
the name being looked up. Tracing is disabled by default. When
|
||||
tracing is enabled, <span><strong class="command">dig</strong></span> makes
|
||||
iterative queries to
|
||||
resolve the name being looked up. It will follow referrals from
|
||||
the
|
||||
root servers, showing the answer from each server that was used
|
||||
to
|
||||
resolve the lookup.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]cmd</code></span></dt>
|
||||
<dd><p>
|
||||
toggles the printing of the initial comment in the output identifying
|
||||
the version of <span><strong class="command">dig</strong></span> and the query options that have
|
||||
been applied. This comment is printed by default.
|
||||
</p></dd>
|
||||
toggles the printing of the initial comment in the output
|
||||
identifying
|
||||
the version of <span><strong class="command">dig</strong></span> and the query
|
||||
options that have
|
||||
been applied. This comment is printed by default.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]short</code></span></dt>
|
||||
<dd><p>
|
||||
Provide a terse answer. The default is to print the answer in a
|
||||
verbose form.
|
||||
</p></dd>
|
||||
Provide a terse answer. The default is to print the answer in a
|
||||
verbose form.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]identify</code></span></dt>
|
||||
<dd><p>
|
||||
Show [or do not show] the IP address and port number that supplied the
|
||||
answer when the <em class="parameter"><code>+short</code></em> option is enabled. If
|
||||
short form answers are requested, the default is not to show the
|
||||
source address and port number of the server that provided the answer.
|
||||
</p></dd>
|
||||
Show [or do not show] the IP address and port number that
|
||||
supplied the
|
||||
answer when the <em class="parameter"><code>+short</code></em> option
|
||||
is enabled. If
|
||||
short form answers are requested, the default is not to show the
|
||||
source address and port number of the server that provided the
|
||||
answer.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
|
||||
<dd><p>
|
||||
Toggle the display of comment lines in the output. The default is to
|
||||
print comments.
|
||||
</p></dd>
|
||||
Toggle the display of comment lines in the output. The default
|
||||
is to
|
||||
print comments.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]stats</code></span></dt>
|
||||
<dd><p>
|
||||
This query option toggles the printing of statistics: when the query
|
||||
was made, the size of the reply and so on. The default behaviour is
|
||||
to print the query statistics.
|
||||
</p></dd>
|
||||
This query option toggles the printing of statistics: when the
|
||||
query
|
||||
was made, the size of the reply and so on. The default
|
||||
behaviour is
|
||||
to print the query statistics.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
|
||||
<dd><p>
|
||||
Print [do not print] the query as it is sent.
|
||||
By default, the query is not printed.
|
||||
</p></dd>
|
||||
Print [do not print] the query as it is sent.
|
||||
By default, the query is not printed.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]question</code></span></dt>
|
||||
<dd><p>
|
||||
Print [do not print] the question section of a query when an answer is
|
||||
returned. The default is to print the question section as a comment.
|
||||
</p></dd>
|
||||
Print [do not print] the question section of a query when an
|
||||
answer is
|
||||
returned. The default is to print the question section as a
|
||||
comment.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]answer</code></span></dt>
|
||||
<dd><p>
|
||||
Display [do not display] the answer section of a reply. The default
|
||||
is to display it.
|
||||
</p></dd>
|
||||
Display [do not display] the answer section of a reply. The
|
||||
default
|
||||
is to display it.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]authority</code></span></dt>
|
||||
<dd><p>
|
||||
Display [do not display] the authority section of a reply. The
|
||||
default is to display it.
|
||||
</p></dd>
|
||||
Display [do not display] the authority section of a reply. The
|
||||
default is to display it.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]additional</code></span></dt>
|
||||
<dd><p>
|
||||
Display [do not display] the additional section of a reply.
|
||||
The default is to display it.
|
||||
</p></dd>
|
||||
Display [do not display] the additional section of a reply.
|
||||
The default is to display it.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]all</code></span></dt>
|
||||
<dd><p>
|
||||
Set or clear all display flags.
|
||||
</p></dd>
|
||||
Set or clear all display flags.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+time=T</code></span></dt>
|
||||
<dd><p>
|
||||
|
||||
Sets the timeout for a query to
|
||||
<em class="parameter"><code>T</code></em> seconds. The default time out is 5 seconds.
|
||||
An attempt to set <em class="parameter"><code>T</code></em> to less than 1 will result
|
||||
in a query timeout of 1 second being applied.
|
||||
</p></dd>
|
||||
Sets the timeout for a query to
|
||||
<em class="parameter"><code>T</code></em> seconds. The default time
|
||||
out is 5 seconds.
|
||||
An attempt to set <em class="parameter"><code>T</code></em> to less
|
||||
than 1 will result
|
||||
in a query timeout of 1 second being applied.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+tries=T</code></span></dt>
|
||||
<dd><p>
|
||||
Sets the number of times to try UDP queries to server to
|
||||
<em class="parameter"><code>T</code></em> instead of the default, 3. If
|
||||
<em class="parameter"><code>T</code></em> is less than or equal to zero, the number of
|
||||
tries is silently rounded up to 1.
|
||||
</p></dd>
|
||||
Sets the number of times to try UDP queries to server to
|
||||
<em class="parameter"><code>T</code></em> instead of the default, 3.
|
||||
If
|
||||
<em class="parameter"><code>T</code></em> is less than or equal to
|
||||
zero, the number of
|
||||
tries is silently rounded up to 1.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+retry=T</code></span></dt>
|
||||
<dd><p>
|
||||
Sets the number of times to retry UDP queries to server to
|
||||
<em class="parameter"><code>T</code></em> instead of the default, 2. Unlike
|
||||
<em class="parameter"><code>+tries</code></em>, this does not include the initial
|
||||
query.
|
||||
</p></dd>
|
||||
Sets the number of times to retry UDP queries to server to
|
||||
<em class="parameter"><code>T</code></em> instead of the default, 2.
|
||||
Unlike
|
||||
<em class="parameter"><code>+tries</code></em>, this does not include
|
||||
the initial
|
||||
query.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+ndots=D</code></span></dt>
|
||||
<dd><p>
|
||||
Set the number of dots that have to appear in
|
||||
<em class="parameter"><code>name</code></em> to <em class="parameter"><code>D</code></em> for it to be
|
||||
considered absolute. The default value is that defined using the
|
||||
ndots statement in <code class="filename">/etc/resolv.conf</code>, or 1 if no
|
||||
ndots statement is present. Names with fewer dots are interpreted as
|
||||
relative names and will be searched for in the domains listed in the
|
||||
<code class="option">search</code> or <code class="option">domain</code> directive in
|
||||
<code class="filename">/etc/resolv.conf</code>.
|
||||
</p></dd>
|
||||
Set the number of dots that have to appear in
|
||||
<em class="parameter"><code>name</code></em> to <em class="parameter"><code>D</code></em> for it to be
|
||||
considered absolute. The default value is that defined using
|
||||
the
|
||||
ndots statement in <code class="filename">/etc/resolv.conf</code>, or 1 if no
|
||||
ndots statement is present. Names with fewer dots are
|
||||
interpreted as
|
||||
relative names and will be searched for in the domains listed in
|
||||
the
|
||||
<code class="option">search</code> or <code class="option">domain</code> directive in
|
||||
<code class="filename">/etc/resolv.conf</code>.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+bufsize=B</code></span></dt>
|
||||
<dd><p>
|
||||
Set the UDP message buffer size advertised using EDNS0 to
|
||||
<em class="parameter"><code>B</code></em> bytes. The maximum and minimum sizes of this
|
||||
buffer are 65535 and 0 respectively. Values outside this range are
|
||||
rounded up or down appropriately.
|
||||
</p></dd>
|
||||
Set the UDP message buffer size advertised using EDNS0 to
|
||||
<em class="parameter"><code>B</code></em> bytes. The maximum and minimum sizes
|
||||
of this buffer are 65535 and 0 respectively. Values outside
|
||||
this range are rounded up or down appropriately.
|
||||
Values other than zero will cause a EDNS query to be sent.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+edns=#</code></span></dt>
|
||||
<dd><p>
|
||||
Specify the EDNS version to query with. Valid values
|
||||
are 0 to 255. Setting the EDNS version will cause a
|
||||
EDNS query to be sent. <code class="option">+noedns</code> clears the
|
||||
remembered EDNS version.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]multiline</code></span></dt>
|
||||
<dd><p>
|
||||
Print records like the SOA records in a verbose multi-line
|
||||
format with human-readable comments. The default is to print
|
||||
each record on a single line, to facilitate machine parsing
|
||||
of the <span><strong class="command">dig</strong></span> output.
|
||||
</p></dd>
|
||||
Print records like the SOA records in a verbose multi-line
|
||||
format with human-readable comments. The default is to print
|
||||
each record on a single line, to facilitate machine parsing
|
||||
of the <span><strong class="command">dig</strong></span> output.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]fail</code></span></dt>
|
||||
<dd><p>
|
||||
Do not try the next server if you receive a SERVFAIL. The default is
|
||||
to not try the next server which is the reverse of normal stub resolver
|
||||
behaviour.
|
||||
</p></dd>
|
||||
Do not try the next server if you receive a SERVFAIL. The
|
||||
default is
|
||||
to not try the next server which is the reverse of normal stub
|
||||
resolver
|
||||
behaviour.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]besteffort</code></span></dt>
|
||||
<dd><p>
|
||||
Attempt to display the contents of messages which are malformed.
|
||||
The default is to not display malformed answers.
|
||||
</p></dd>
|
||||
Attempt to display the contents of messages which are malformed.
|
||||
The default is to not display malformed answers.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]dnssec</code></span></dt>
|
||||
<dd><p>
|
||||
Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO)
|
||||
in the OPT record in the additional section of the query.
|
||||
</p></dd>
|
||||
Requests DNSSEC records be sent by setting the DNSSEC OK bit
|
||||
(DO)
|
||||
in the OPT record in the additional section of the query.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+[no]sigchase</code></span></dt>
|
||||
<dd><p>
|
||||
Chase DNSSEC signature chains. Requires dig be compiled with
|
||||
-DDIG_SIGCHASE.
|
||||
</p></dd>
|
||||
Chase DNSSEC signature chains. Requires dig be compiled with
|
||||
-DDIG_SIGCHASE.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="option">+trusted-key=####</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies a file containing trusted keys to be used with
|
||||
Specifies a file containing trusted keys to be used with
|
||||
<code class="option">+sigchase</code>. Each DNSKEY record must be
|
||||
on its own line.
|
||||
</p>
|
||||
</p>
|
||||
<p>
|
||||
If not specified <span><strong class="command">dig</strong></span> will look for
|
||||
<code class="filename">/etc/trusted-key.key</code> then
|
||||
<code class="filename">trusted-key.key</code> in the current directory.
|
||||
</p>
|
||||
<p>
|
||||
Requires dig be compiled with -DDIG_SIGCHASE.
|
||||
Requires dig be compiled with -DDIG_SIGCHASE.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]topdown</code></span></dt>
|
||||
<dd><p>
|
||||
When chasing DNSSEC signature chains perform a top down validation.
|
||||
Requires dig be compiled with -DDIG_SIGCHASE.
|
||||
</p></dd>
|
||||
When chasing DNSSEC signature chains perform a top down
|
||||
validation.
|
||||
Requires dig be compiled with -DDIG_SIGCHASE.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550666"></a><h2>MULTIPLE QUERIES</h2>
|
||||
<a name="id2545128"></a><h2>MULTIPLE QUERIES</h2>
|
||||
<p>
|
||||
The BIND 9 implementation of <span><strong class="command">dig </strong></span> supports
|
||||
specifying multiple queries on the command line (in addition to
|
||||
supporting the <code class="option">-f</code> batch file option). Each of those
|
||||
queries can be supplied with its own set of flags, options and query
|
||||
options.
|
||||
</p>
|
||||
The BIND 9 implementation of <span><strong class="command">dig </strong></span>
|
||||
supports
|
||||
specifying multiple queries on the command line (in addition to
|
||||
supporting the <code class="option">-f</code> batch file option). Each of those
|
||||
queries can be supplied with its own set of flags, options and query
|
||||
options.
|
||||
</p>
|
||||
<p>
|
||||
In this case, each <em class="parameter"><code>query</code></em> argument represent an
|
||||
individual query in the command-line syntax described above. Each
|
||||
consists of any of the standard options and flags, the name to be
|
||||
looked up, an optional query type and class and any query options that
|
||||
should be applied to that query.
|
||||
</p>
|
||||
In this case, each <em class="parameter"><code>query</code></em> argument
|
||||
represent an
|
||||
individual query in the command-line syntax described above. Each
|
||||
consists of any of the standard options and flags, the name to be
|
||||
looked up, an optional query type and class and any query options that
|
||||
should be applied to that query.
|
||||
</p>
|
||||
<p>
|
||||
A global set of query options, which should be applied to all queries,
|
||||
can also be supplied. These global query options must precede the
|
||||
first tuple of name, class, type, options, flags, and query options
|
||||
supplied on the command line. Any global query options (except
|
||||
the <code class="option">+[no]cmd</code> option) can be
|
||||
overridden by a query-specific set of query options. For example:
|
||||
</p>
|
||||
A global set of query options, which should be applied to all queries,
|
||||
can also be supplied. These global query options must precede the
|
||||
first tuple of name, class, type, options, flags, and query options
|
||||
supplied on the command line. Any global query options (except
|
||||
the <code class="option">+[no]cmd</code> option) can be
|
||||
overridden by a query-specific set of query options. For example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
||||
</pre>
|
||||
<p>
|
||||
shows how <span><strong class="command">dig</strong></span> could be used from the command line
|
||||
to make three lookups: an ANY query for <code class="literal">www.isc.org</code>, a
|
||||
reverse lookup of 127.0.0.1 and a query for the NS records of
|
||||
<code class="literal">isc.org</code>.
|
||||
shows how <span><strong class="command">dig</strong></span> could be used from the
|
||||
command line
|
||||
to make three lookups: an ANY query for <code class="literal">www.isc.org</code>, a
|
||||
reverse lookup of 127.0.0.1 and a query for the NS records of
|
||||
<code class="literal">isc.org</code>.
|
||||
|
||||
A global query option of <em class="parameter"><code>+qr</code></em> is applied, so
|
||||
that <span><strong class="command">dig</strong></span> shows the initial query it made for each
|
||||
lookup. The final query has a local query option of
|
||||
<em class="parameter"><code>+noqr</code></em> which means that <span><strong class="command">dig</strong></span>
|
||||
will not print the initial query when it looks up the NS records for
|
||||
<code class="literal">isc.org</code>.
|
||||
</p>
|
||||
A global query option of <em class="parameter"><code>+qr</code></em> is
|
||||
applied, so
|
||||
that <span><strong class="command">dig</strong></span> shows the initial query it made
|
||||
for each
|
||||
lookup. The final query has a local query option of
|
||||
<em class="parameter"><code>+noqr</code></em> which means that <span><strong class="command">dig</strong></span>
|
||||
will not print the initial query when it looks up the NS records for
|
||||
<code class="literal">isc.org</code>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550725"></a><h2>FILES</h2>
|
||||
<a name="id2545258"></a><h2>IDN SUPPORT</h2>
|
||||
<p>
|
||||
<code class="filename">/etc/resolv.conf</code>
|
||||
</p>
|
||||
<p>
|
||||
<code class="filename">${HOME}/.digrc</code>
|
||||
</p>
|
||||
If <span><strong class="command">dig</strong></span> has been built with IDN (internationalized
|
||||
domain name) support, it can accept and display non-ASCII domain names.
|
||||
<span><strong class="command">dig</strong></span> appropriately converts character encoding of
|
||||
domain name before sending a request to DNS server or displaying a
|
||||
reply from the server.
|
||||
If you'd like to turn off the IDN support for some reason, defines
|
||||
the <code class="envar">IDN_DISABLE</code> environment variable.
|
||||
The IDN support is disabled if the variable is set when
|
||||
<span><strong class="command">dig</strong></span> runs.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550744"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
|
||||
<em class="citetitle">RFC1035</em>.
|
||||
</p>
|
||||
<a name="id2545281"></a><h2>FILES</h2>
|
||||
<p><code class="filename">/etc/resolv.conf</code>
|
||||
</p>
|
||||
<p><code class="filename">${HOME}/.digrc</code>
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550782"></a><h2>BUGS </h2>
|
||||
<a name="id2545298"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
|
||||
<em class="citetitle">RFC1035</em>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2545335"></a><h2>BUGS</h2>
|
||||
<p>
|
||||
There are probably too many query options.
|
||||
</p>
|
||||
There are probably too many query options.
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
</html>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
@ -13,13 +13,13 @@
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" $Id: host.1,v 1.11.2.1.4.8 2006/06/29 13:02:30 marka Exp $
|
||||
.\" $Id: host.1,v 1.14.18.13 2007/01/30 00:23:44 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: host
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: Jun 30, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
@ -33,7 +33,7 @@
|
||||
host \- DNS lookup utility
|
||||
.SH "SYNOPSIS"
|
||||
.HP 5
|
||||
\fBhost\fR [\fB\-aCdlnrTwv\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-N\ \fR\fB\fIndots\fR\fR] [\fB\-R\ \fR\fB\fInumber\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-W\ \fR\fB\fIwait\fR\fR] [\fB\-4\fR] [\fB\-6\fR] {name} [server]
|
||||
\fBhost\fR [\fB\-aCdlnrsTwv\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-N\ \fR\fB\fIndots\fR\fR] [\fB\-R\ \fR\fB\fInumber\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-W\ \fR\fB\fIwait\fR\fR] [\fB\-m\ \fR\fB\fIflag\fR\fR] [\fB\-4\fR] [\fB\-6\fR] {name} [server]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBhost\fR
|
||||
@ -179,6 +179,32 @@ is less than one, the wait interval is set to one second. When the
|
||||
option is used,
|
||||
\fBhost\fR
|
||||
will effectively wait forever for a reply. The time to wait for a response will be set to the number of seconds given by the hardware's maximum value for an integer quantity.
|
||||
.PP
|
||||
The
|
||||
\fB\-s\fR
|
||||
option tells
|
||||
\fBhost\fR
|
||||
\fInot\fR
|
||||
to send the query to the next nameserver if any server responds with a SERVFAIL response, which is the reverse of normal stub resolver behaviour.
|
||||
.PP
|
||||
The
|
||||
\fB\-m\fR
|
||||
can be used to set the memory usage debugging flags
|
||||
\fIrecord\fR,
|
||||
\fIusage\fR
|
||||
and
|
||||
\fItrace\fR.
|
||||
.SH "IDN SUPPORT"
|
||||
.PP
|
||||
If
|
||||
\fBhost\fR
|
||||
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names.
|
||||
\fBhost\fR
|
||||
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server. If you'd like to turn off the IDN support for some reason, defines the
|
||||
\fBIDN_DISABLE\fR
|
||||
environment variable. The IDN support is disabled if the variable is set when
|
||||
\fBhost\fR
|
||||
runs.
|
||||
.SH "FILES"
|
||||
.PP
|
||||
\fI/etc/resolv.conf\fR
|
||||
@ -187,4 +213,7 @@ will effectively wait forever for a reply. The time to wait for a response will
|
||||
\fBdig\fR(1),
|
||||
\fBnamed\fR(8).
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
Copyright \(co 2000\-2002 Internet Software Consortium.
|
||||
.br
|
||||
|
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: host.c,v 1.76.2.5.2.16 2006/05/23 04:43:47 marka Exp $ */
|
||||
/* $Id: host.c,v 1.94.18.14 2006/05/23 04:40:42 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
#include <limits.h>
|
||||
@ -114,8 +116,8 @@ static void
|
||||
show_usage(void) {
|
||||
fputs(
|
||||
"Usage: host [-aCdlriTwv] [-c class] [-N ndots] [-t type] [-W time]\n"
|
||||
" [-R number] hostname [server]\n"
|
||||
" -a is equivalent to -v -t *\n"
|
||||
" [-R number] [-m flag] hostname [server]\n"
|
||||
" -a is equivalent to -v -t ANY\n"
|
||||
" -c specifies query class for non-IN data\n"
|
||||
" -C compares SOA records on authoritative nameservers\n"
|
||||
" -d is equivalent to -v\n"
|
||||
@ -124,13 +126,15 @@ show_usage(void) {
|
||||
" -N changes the number of dots allowed before root lookup is done\n"
|
||||
" -r disables recursive processing\n"
|
||||
" -R specifies number of retries for UDP packets\n"
|
||||
" -s a SERVFAIL response should stop query\n"
|
||||
" -t specifies the query type\n"
|
||||
" -T enables TCP/IP mode\n"
|
||||
" -v enables verbose output\n"
|
||||
" -w specifies to wait forever for a reply\n"
|
||||
" -W specifies how long to wait for a reply\n"
|
||||
" -4 use IPv4 query transport only\n"
|
||||
" -6 use IPv6 query transport only\n", stderr);
|
||||
" -6 use IPv6 query transport only\n"
|
||||
" -m set memory debugging flag (trace|record|usage)\n", stderr);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -556,6 +560,52 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
||||
return (result);
|
||||
}
|
||||
|
||||
static const char * optstring = "46ac:dilnm:rst:vwCDN:R:TW:";
|
||||
|
||||
static void
|
||||
pre_parse_args(int argc, char **argv) {
|
||||
int c;
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
|
||||
switch (c) {
|
||||
case 'm':
|
||||
if (strcasecmp("trace", isc_commandline_argument) == 0)
|
||||
isc_mem_debugging |= ISC_MEM_DEBUGTRACE;
|
||||
else if (!strcasecmp("record",
|
||||
isc_commandline_argument) == 0)
|
||||
isc_mem_debugging |= ISC_MEM_DEBUGRECORD;
|
||||
else if (strcasecmp("usage",
|
||||
isc_commandline_argument) == 0)
|
||||
isc_mem_debugging |= ISC_MEM_DEBUGUSAGE;
|
||||
break;
|
||||
|
||||
case '4': break;
|
||||
case '6': break;
|
||||
case 'a': break;
|
||||
case 'c': break;
|
||||
case 'd': break;
|
||||
case 'i': break;
|
||||
case 'l': break;
|
||||
case 'n': break;
|
||||
case 'r': break;
|
||||
case 's': break;
|
||||
case 't': break;
|
||||
case 'v': break;
|
||||
case 'w': break;
|
||||
case 'C': break;
|
||||
case 'D': break;
|
||||
case 'N': break;
|
||||
case 'R': break;
|
||||
case 'T': break;
|
||||
case 'W': break;
|
||||
default:
|
||||
show_usage();
|
||||
}
|
||||
}
|
||||
isc_commandline_reset = ISC_TRUE;
|
||||
isc_commandline_index = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
||||
char hostname[MXNAME];
|
||||
@ -572,8 +622,10 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
||||
|
||||
lookup = make_empty_lookup();
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, "lvwrdt:c:aTCN:R:W:Dni46"))
|
||||
!= EOF) {
|
||||
lookup->servfail_stops = ISC_FALSE;
|
||||
lookup->comments = ISC_FALSE;
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
|
||||
switch (c) {
|
||||
case 'l':
|
||||
lookup->tcp_mode = ISC_TRUE;
|
||||
@ -657,6 +709,9 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
||||
case 'n':
|
||||
/* deprecated */
|
||||
break;
|
||||
case 'm':
|
||||
/* Handled by pre_parse_args(). */
|
||||
break;
|
||||
case 'w':
|
||||
/*
|
||||
* The timer routines are coded such that
|
||||
@ -710,6 +765,9 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
||||
} else
|
||||
fatal("can't find IPv6 networking");
|
||||
break;
|
||||
case 's':
|
||||
lookup->servfail_stops = ISC_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -724,7 +782,8 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
||||
set_nameserver(argv[isc_commandline_index+1]);
|
||||
debug("server is %s", argv[isc_commandline_index+1]);
|
||||
listed_server = ISC_TRUE;
|
||||
}
|
||||
} else
|
||||
check_ra = ISC_TRUE;
|
||||
|
||||
lookup->pending = ISC_FALSE;
|
||||
if (get_reverse(store, sizeof(store), hostname,
|
||||
@ -758,6 +817,7 @@ main(int argc, char **argv) {
|
||||
|
||||
debug("main()");
|
||||
progname = argv[0];
|
||||
pre_parse_args(argc, argv);
|
||||
result = isc_app_start();
|
||||
check_result(result, "isc_app_start");
|
||||
setup_libs();
|
||||
@ -771,4 +831,3 @@ main(int argc, char **argv) {
|
||||
isc_app_finish();
|
||||
return ((seen_error == 0) ? 0 : 1);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@ -18,24 +18,29 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: host.docbook,v 1.2.2.2.4.7 2005/05/13 01:22:32 marka Exp $ -->
|
||||
<!-- $Id: host.docbook,v 1.5.18.9 2007/01/29 23:57:20 marka Exp $ -->
|
||||
<refentry id="man.host">
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
<date>Jun 30, 2000</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refentryinfo>
|
||||
<date>Jun 30, 2000</date>
|
||||
</refentryinfo>
|
||||
<refmeta>
|
||||
<refentrytitle>host</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>host</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>host</refname>
|
||||
<refpurpose>DNS lookup utility</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<year>2007</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
@ -46,183 +51,227 @@
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname>host</refname>
|
||||
<refpurpose>DNS lookup utility</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>host</command>
|
||||
<arg><option>-aCdlnrsTwv</option></arg>
|
||||
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg><option>-N <replaceable class="parameter">ndots</replaceable></option></arg>
|
||||
<arg><option>-R <replaceable class="parameter">number</replaceable></option></arg>
|
||||
<arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
|
||||
<arg><option>-W <replaceable class="parameter">wait</replaceable></option></arg>
|
||||
<arg><option>-m <replaceable class="parameter">flag</replaceable></option></arg>
|
||||
<arg><option>-4</option></arg>
|
||||
<arg><option>-6</option></arg>
|
||||
<arg choice="req">name</arg>
|
||||
<arg choice="opt">server</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>host</command>
|
||||
<arg><option>-aCdlnrTwv</option></arg>
|
||||
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg><option>-N <replaceable class="parameter">ndots</replaceable></option></arg>
|
||||
<arg><option>-R <replaceable class="parameter">number</replaceable></option></arg>
|
||||
<arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
|
||||
<arg><option>-W <replaceable class="parameter">wait</replaceable></option></arg>
|
||||
<arg><option>-4</option></arg>
|
||||
<arg><option>-6</option></arg>
|
||||
<arg choice="req">name</arg>
|
||||
<arg choice="opt">server</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<command>host</command>
|
||||
is a simple utility for performing DNS lookups.
|
||||
It is normally used to convert names to IP addresses and vice versa.
|
||||
When no arguments or options are given,
|
||||
<command>host</command>
|
||||
prints a short summary of its command line arguments and options.
|
||||
</para>
|
||||
<para><command>host</command>
|
||||
is a simple utility for performing DNS lookups.
|
||||
It is normally used to convert names to IP addresses and vice versa.
|
||||
When no arguments or options are given,
|
||||
<command>host</command>
|
||||
prints a short summary of its command line arguments and options.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<parameter>name</parameter> is the domain name that is to be looked
|
||||
up. It can also be a dotted-decimal IPv4 address or a colon-delimited
|
||||
IPv6 address, in which case <command>host</command> will by default
|
||||
perform a reverse lookup for that address.
|
||||
<parameter>server</parameter> is an optional argument which is either
|
||||
the name or IP address of the name server that <command>host</command>
|
||||
should query instead of the server or servers listed in
|
||||
<filename>/etc/resolv.conf</filename>.
|
||||
</para>
|
||||
<para><parameter>name</parameter> is the domain name that is to be
|
||||
looked
|
||||
up. It can also be a dotted-decimal IPv4 address or a colon-delimited
|
||||
IPv6 address, in which case <command>host</command> will by
|
||||
default
|
||||
perform a reverse lookup for that address.
|
||||
<parameter>server</parameter> is an optional argument which
|
||||
is either
|
||||
the name or IP address of the name server that <command>host</command>
|
||||
should query instead of the server or servers listed in
|
||||
<filename>/etc/resolv.conf</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <option>-a</option> (all) option is equivalent to setting the
|
||||
<option>-v</option> option and asking <command>host</command> to make
|
||||
a query of type ANY.
|
||||
</para>
|
||||
<para>
|
||||
The <option>-a</option> (all) option is equivalent to setting the
|
||||
<option>-v</option> option and asking <command>host</command> to make
|
||||
a query of type ANY.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When the <option>-C</option> option is used, <command>host</command>
|
||||
will attempt to display the SOA records for zone
|
||||
<parameter>name</parameter> from all the listed authoritative name
|
||||
servers for that zone. The list of name servers is defined by the NS
|
||||
records that are found for the zone.
|
||||
</para>
|
||||
<para>
|
||||
When the <option>-C</option> option is used, <command>host</command>
|
||||
will attempt to display the SOA records for zone
|
||||
<parameter>name</parameter> from all the listed
|
||||
authoritative name
|
||||
servers for that zone. The list of name servers is defined by the NS
|
||||
records that are found for the zone.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <option>-c</option> option instructs to make a DNS query of class
|
||||
<parameter>class</parameter>. This can be used to lookup Hesiod or
|
||||
Chaosnet class resource records. The default class is IN (Internet).
|
||||
</para>
|
||||
<para>
|
||||
The <option>-c</option> option instructs to make a DNS query of class
|
||||
<parameter>class</parameter>. This can be used to lookup
|
||||
Hesiod or
|
||||
Chaosnet class resource records. The default class is IN (Internet).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Verbose output is generated by <command>host</command> when the
|
||||
<option>-d</option> or <option>-v</option> option is used. The two
|
||||
options are equivalent. They have been provided for backwards
|
||||
compatibility. In previous versions, the <option>-d</option> option
|
||||
switched on debugging traces and <option>-v</option> enabled verbose
|
||||
output.
|
||||
</para>
|
||||
<para>
|
||||
Verbose output is generated by <command>host</command> when
|
||||
the
|
||||
<option>-d</option> or <option>-v</option> option is used. The two
|
||||
options are equivalent. They have been provided for backwards
|
||||
compatibility. In previous versions, the <option>-d</option> option
|
||||
switched on debugging traces and <option>-v</option> enabled verbose
|
||||
output.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
List mode is selected by the <option>-l</option> option. This makes
|
||||
<command>host</command> perform a zone transfer for zone
|
||||
<parameter>name</parameter>. Transfer the zone printing out the NS, PTR
|
||||
and address records (A/AAAA). If combined with <option>-a</option>
|
||||
all records will be printed.
|
||||
</para>
|
||||
<para>
|
||||
List mode is selected by the <option>-l</option> option. This makes
|
||||
<command>host</command> perform a zone transfer for zone
|
||||
<parameter>name</parameter>. Transfer the zone printing out
|
||||
the NS, PTR
|
||||
and address records (A/AAAA). If combined with <option>-a</option>
|
||||
all records will be printed.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <option>-i</option>
|
||||
option specifies that reverse lookups of IPv6 addresses should
|
||||
use the IP6.INT domain as defined in RFC1886.
|
||||
The default is to use IP6.ARPA.
|
||||
</para>
|
||||
<para>
|
||||
The <option>-i</option>
|
||||
option specifies that reverse lookups of IPv6 addresses should
|
||||
use the IP6.INT domain as defined in RFC1886.
|
||||
The default is to use IP6.ARPA.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <option>-N</option> option sets the number of dots that have to be
|
||||
in <parameter>name</parameter> for it to be considered absolute. The
|
||||
default value is that defined using the ndots statement in
|
||||
<filename>/etc/resolv.conf</filename>, or 1 if no ndots statement is
|
||||
present. Names with fewer dots are interpreted as relative names and
|
||||
will be searched for in the domains listed in the <type>search</type>
|
||||
or <type>domain</type> directive in
|
||||
<filename>/etc/resolv.conf</filename>.
|
||||
</para>
|
||||
<para>
|
||||
The <option>-N</option> option sets the number of dots that have to be
|
||||
in <parameter>name</parameter> for it to be considered
|
||||
absolute. The
|
||||
default value is that defined using the ndots statement in
|
||||
<filename>/etc/resolv.conf</filename>, or 1 if no ndots
|
||||
statement is
|
||||
present. Names with fewer dots are interpreted as relative names and
|
||||
will be searched for in the domains listed in the <type>search</type>
|
||||
or <type>domain</type> directive in
|
||||
<filename>/etc/resolv.conf</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The number of UDP retries for a lookup can be changed with the
|
||||
<option>-R</option> option. <parameter>number</parameter> indicates
|
||||
how many times <command>host</command> will repeat a query that does
|
||||
not get answered. The default number of retries is 1. If
|
||||
<parameter>number</parameter> is negative or zero, the number of
|
||||
retries will default to 1.
|
||||
</para>
|
||||
<para>
|
||||
The number of UDP retries for a lookup can be changed with the
|
||||
<option>-R</option> option. <parameter>number</parameter>
|
||||
indicates
|
||||
how many times <command>host</command> will repeat a query
|
||||
that does
|
||||
not get answered. The default number of retries is 1. If
|
||||
<parameter>number</parameter> is negative or zero, the
|
||||
number of
|
||||
retries will default to 1.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Non-recursive queries can be made via the <option>-r</option> option.
|
||||
Setting this option clears the <type>RD</type> — recursion
|
||||
desired — bit in the query which <command>host</command> makes.
|
||||
This should mean that the name server receiving the query will not
|
||||
attempt to resolve <parameter>name</parameter>. The
|
||||
<option>-r</option> option enables <command>host</command> to mimic
|
||||
the behaviour of a name server by making non-recursive queries and
|
||||
expecting to receive answers to those queries that are usually
|
||||
referrals to other name servers.
|
||||
</para>
|
||||
<para>
|
||||
Non-recursive queries can be made via the <option>-r</option> option.
|
||||
Setting this option clears the <type>RD</type> — recursion
|
||||
desired — bit in the query which <command>host</command> makes.
|
||||
This should mean that the name server receiving the query will not
|
||||
attempt to resolve <parameter>name</parameter>. The
|
||||
<option>-r</option> option enables <command>host</command>
|
||||
to mimic
|
||||
the behaviour of a name server by making non-recursive queries and
|
||||
expecting to receive answers to those queries that are usually
|
||||
referrals to other name servers.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
By default <command>host</command> uses UDP when making queries. The
|
||||
<option>-T</option> option makes it use a TCP connection when querying
|
||||
the name server. TCP will be automatically selected for queries that
|
||||
require it, such as zone transfer (AXFR) requests.
|
||||
</para>
|
||||
<para>
|
||||
By default <command>host</command> uses UDP when making
|
||||
queries. The
|
||||
<option>-T</option> option makes it use a TCP connection when querying
|
||||
the name server. TCP will be automatically selected for queries that
|
||||
require it, such as zone transfer (AXFR) requests.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <option>-4</option> option forces <command>host</command> to only
|
||||
use IPv4 query transport. The <option>-6</option> option forces
|
||||
<command>host</command> to only use IPv6 query transport.
|
||||
</para>
|
||||
<para>
|
||||
The <option>-4</option> option forces <command>host</command> to only
|
||||
use IPv4 query transport. The <option>-6</option> option forces
|
||||
<command>host</command> to only use IPv6 query transport.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <option>-t</option> option is used to select the query type.
|
||||
<parameter>type</parameter> can be any recognised query type: CNAME,
|
||||
NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
|
||||
<command>host</command> automatically selects an appropriate query
|
||||
type. By default it looks for A records, but if the
|
||||
<option>-C</option> option was given, queries will be made for SOA
|
||||
records, and if <parameter>name</parameter> is a dotted-decimal IPv4
|
||||
address or colon-delimited IPv6 address, <command>host</command> will
|
||||
query for PTR records. If a query type of IXFR is chosen the starting
|
||||
serial number can be specified by appending an equal followed by the
|
||||
starting serial number (e.g. -t IXFR=12345678).
|
||||
</para>
|
||||
<para>
|
||||
The <option>-t</option> option is used to select the query type.
|
||||
<parameter>type</parameter> can be any recognised query
|
||||
type: CNAME,
|
||||
NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
|
||||
<command>host</command> automatically selects an appropriate
|
||||
query
|
||||
type. By default it looks for A records, but if the
|
||||
<option>-C</option> option was given, queries will be made for SOA
|
||||
records, and if <parameter>name</parameter> is a
|
||||
dotted-decimal IPv4
|
||||
address or colon-delimited IPv6 address, <command>host</command> will
|
||||
query for PTR records. If a query type of IXFR is chosen the starting
|
||||
serial number can be specified by appending an equal followed by the
|
||||
starting serial number (e.g. -t IXFR=12345678).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The time to wait for a reply can be controlled through the
|
||||
<option>-W</option> and <option>-w</option> options. The
|
||||
<option>-W</option> option makes <command>host</command> wait for
|
||||
<parameter>wait</parameter> seconds. If <parameter>wait</parameter>
|
||||
is less than one, the wait interval is set to one second. When the
|
||||
<option>-w</option> option is used, <command>host</command> will
|
||||
effectively wait forever for a reply. The time to wait for a response
|
||||
will be set to the number of seconds given by the hardware's maximum
|
||||
value for an integer quantity.
|
||||
</para>
|
||||
<para>
|
||||
The time to wait for a reply can be controlled through the
|
||||
<option>-W</option> and <option>-w</option> options. The
|
||||
<option>-W</option> option makes <command>host</command>
|
||||
wait for
|
||||
<parameter>wait</parameter> seconds. If <parameter>wait</parameter>
|
||||
is less than one, the wait interval is set to one second. When the
|
||||
<option>-w</option> option is used, <command>host</command>
|
||||
will
|
||||
effectively wait forever for a reply. The time to wait for a response
|
||||
will be set to the number of seconds given by the hardware's maximum
|
||||
value for an integer quantity.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
<para>
|
||||
The <option>-s</option> option tells <command>host</command>
|
||||
<emphasis>not</emphasis> to send the query to the next nameserver
|
||||
if any server responds with a SERVFAIL response, which is the
|
||||
reverse of normal stub resolver behaviour.
|
||||
</para>
|
||||
|
||||
<refsect1>
|
||||
<title>FILES</title>
|
||||
<para>
|
||||
<filename>/etc/resolv.conf</filename>
|
||||
</para>
|
||||
</refsect1>
|
||||
<para>
|
||||
The <option>-m</option> can be used to set the memory usage debugging
|
||||
flags
|
||||
<parameter>record</parameter>, <parameter>usage</parameter> and
|
||||
<parameter>trace</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>.
|
||||
</para>
|
||||
<refsect1>
|
||||
<title>IDN SUPPORT</title>
|
||||
<para>
|
||||
If <command>host</command> has been built with IDN (internationalized
|
||||
domain name) support, it can accept and display non-ASCII domain names.
|
||||
<command>host</command> appropriately converts character encoding of
|
||||
domain name before sending a request to DNS server or displaying a
|
||||
reply from the server.
|
||||
If you'd like to turn off the IDN support for some reason, defines
|
||||
the <envar>IDN_DISABLE</envar> environment variable.
|
||||
The IDN support is disabled if the variable is set when
|
||||
<command>host</command> runs.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refsect1>
|
||||
<title>FILES</title>
|
||||
<para><filename>/etc/resolv.conf</filename>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para><citerefentry>
|
||||
<refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
</refentry><!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@ -14,158 +14,199 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: host.html,v 1.4.2.1.4.14 2006/06/29 13:02:30 marka Exp $ -->
|
||||
<!-- $Id: host.html,v 1.7.18.19 2007/01/30 00:23:44 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>host</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482688"></a><div class="titlepage"></div>
|
||||
<a name="man.host"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p>host — DNS lookup utility</p>
|
||||
</div>
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p><code class="command">host</code> [<code class="option">-aCdlnrTwv</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-N <em class="replaceable"><code>ndots</code></em></code>] [<code class="option">-R <em class="replaceable"><code>number</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-W <em class="replaceable"><code>wait</code></em></code>] [<code class="option">-4</code>] [<code class="option">-6</code>] {name} [server]</p></div>
|
||||
<div class="cmdsynopsis"><p><code class="command">host</code> [<code class="option">-aCdlnrsTwv</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-N <em class="replaceable"><code>ndots</code></em></code>] [<code class="option">-R <em class="replaceable"><code>number</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-W <em class="replaceable"><code>wait</code></em></code>] [<code class="option">-m <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-4</code>] [<code class="option">-6</code>] {name} [server]</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549466"></a><h2>DESCRIPTION</h2>
|
||||
<a name="id2543428"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">host</strong></span>
|
||||
is a simple utility for performing DNS lookups.
|
||||
It is normally used to convert names to IP addresses and vice versa.
|
||||
When no arguments or options are given,
|
||||
<span><strong class="command">host</strong></span>
|
||||
prints a short summary of its command line arguments and options.
|
||||
</p>
|
||||
<p><em class="parameter"><code>name</code></em> is the domain name that is to be
|
||||
looked
|
||||
up. It can also be a dotted-decimal IPv4 address or a colon-delimited
|
||||
IPv6 address, in which case <span><strong class="command">host</strong></span> will by
|
||||
default
|
||||
perform a reverse lookup for that address.
|
||||
<em class="parameter"><code>server</code></em> is an optional argument which
|
||||
is either
|
||||
the name or IP address of the name server that <span><strong class="command">host</strong></span>
|
||||
should query instead of the server or servers listed in
|
||||
<code class="filename">/etc/resolv.conf</code>.
|
||||
</p>
|
||||
<p>
|
||||
<span><strong class="command">host</strong></span>
|
||||
is a simple utility for performing DNS lookups.
|
||||
It is normally used to convert names to IP addresses and vice versa.
|
||||
When no arguments or options are given,
|
||||
<span><strong class="command">host</strong></span>
|
||||
prints a short summary of its command line arguments and options.
|
||||
</p>
|
||||
The <code class="option">-a</code> (all) option is equivalent to setting the
|
||||
<code class="option">-v</code> option and asking <span><strong class="command">host</strong></span> to make
|
||||
a query of type ANY.
|
||||
</p>
|
||||
<p>
|
||||
<em class="parameter"><code>name</code></em> is the domain name that is to be looked
|
||||
up. It can also be a dotted-decimal IPv4 address or a colon-delimited
|
||||
IPv6 address, in which case <span><strong class="command">host</strong></span> will by default
|
||||
perform a reverse lookup for that address.
|
||||
<em class="parameter"><code>server</code></em> is an optional argument which is either
|
||||
the name or IP address of the name server that <span><strong class="command">host</strong></span>
|
||||
should query instead of the server or servers listed in
|
||||
<code class="filename">/etc/resolv.conf</code>.
|
||||
</p>
|
||||
When the <code class="option">-C</code> option is used, <span><strong class="command">host</strong></span>
|
||||
will attempt to display the SOA records for zone
|
||||
<em class="parameter"><code>name</code></em> from all the listed
|
||||
authoritative name
|
||||
servers for that zone. The list of name servers is defined by the NS
|
||||
records that are found for the zone.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="option">-a</code> (all) option is equivalent to setting the
|
||||
<code class="option">-v</code> option and asking <span><strong class="command">host</strong></span> to make
|
||||
a query of type ANY.
|
||||
</p>
|
||||
The <code class="option">-c</code> option instructs to make a DNS query of class
|
||||
<em class="parameter"><code>class</code></em>. This can be used to lookup
|
||||
Hesiod or
|
||||
Chaosnet class resource records. The default class is IN (Internet).
|
||||
</p>
|
||||
<p>
|
||||
When the <code class="option">-C</code> option is used, <span><strong class="command">host</strong></span>
|
||||
will attempt to display the SOA records for zone
|
||||
<em class="parameter"><code>name</code></em> from all the listed authoritative name
|
||||
servers for that zone. The list of name servers is defined by the NS
|
||||
records that are found for the zone.
|
||||
</p>
|
||||
Verbose output is generated by <span><strong class="command">host</strong></span> when
|
||||
the
|
||||
<code class="option">-d</code> or <code class="option">-v</code> option is used. The two
|
||||
options are equivalent. They have been provided for backwards
|
||||
compatibility. In previous versions, the <code class="option">-d</code> option
|
||||
switched on debugging traces and <code class="option">-v</code> enabled verbose
|
||||
output.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="option">-c</code> option instructs to make a DNS query of class
|
||||
<em class="parameter"><code>class</code></em>. This can be used to lookup Hesiod or
|
||||
Chaosnet class resource records. The default class is IN (Internet).
|
||||
</p>
|
||||
List mode is selected by the <code class="option">-l</code> option. This makes
|
||||
<span><strong class="command">host</strong></span> perform a zone transfer for zone
|
||||
<em class="parameter"><code>name</code></em>. Transfer the zone printing out
|
||||
the NS, PTR
|
||||
and address records (A/AAAA). If combined with <code class="option">-a</code>
|
||||
all records will be printed.
|
||||
</p>
|
||||
<p>
|
||||
Verbose output is generated by <span><strong class="command">host</strong></span> when the
|
||||
<code class="option">-d</code> or <code class="option">-v</code> option is used. The two
|
||||
options are equivalent. They have been provided for backwards
|
||||
compatibility. In previous versions, the <code class="option">-d</code> option
|
||||
switched on debugging traces and <code class="option">-v</code> enabled verbose
|
||||
output.
|
||||
</p>
|
||||
The <code class="option">-i</code>
|
||||
option specifies that reverse lookups of IPv6 addresses should
|
||||
use the IP6.INT domain as defined in RFC1886.
|
||||
The default is to use IP6.ARPA.
|
||||
</p>
|
||||
<p>
|
||||
List mode is selected by the <code class="option">-l</code> option. This makes
|
||||
<span><strong class="command">host</strong></span> perform a zone transfer for zone
|
||||
<em class="parameter"><code>name</code></em>. Transfer the zone printing out the NS, PTR
|
||||
and address records (A/AAAA). If combined with <code class="option">-a</code>
|
||||
all records will be printed.
|
||||
</p>
|
||||
The <code class="option">-N</code> option sets the number of dots that have to be
|
||||
in <em class="parameter"><code>name</code></em> for it to be considered
|
||||
absolute. The
|
||||
default value is that defined using the ndots statement in
|
||||
<code class="filename">/etc/resolv.conf</code>, or 1 if no ndots
|
||||
statement is
|
||||
present. Names with fewer dots are interpreted as relative names and
|
||||
will be searched for in the domains listed in the <span class="type">search</span>
|
||||
or <span class="type">domain</span> directive in
|
||||
<code class="filename">/etc/resolv.conf</code>.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="option">-i</code>
|
||||
option specifies that reverse lookups of IPv6 addresses should
|
||||
use the IP6.INT domain as defined in RFC1886.
|
||||
The default is to use IP6.ARPA.
|
||||
</p>
|
||||
The number of UDP retries for a lookup can be changed with the
|
||||
<code class="option">-R</code> option. <em class="parameter"><code>number</code></em>
|
||||
indicates
|
||||
how many times <span><strong class="command">host</strong></span> will repeat a query
|
||||
that does
|
||||
not get answered. The default number of retries is 1. If
|
||||
<em class="parameter"><code>number</code></em> is negative or zero, the
|
||||
number of
|
||||
retries will default to 1.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="option">-N</code> option sets the number of dots that have to be
|
||||
in <em class="parameter"><code>name</code></em> for it to be considered absolute. The
|
||||
default value is that defined using the ndots statement in
|
||||
<code class="filename">/etc/resolv.conf</code>, or 1 if no ndots statement is
|
||||
present. Names with fewer dots are interpreted as relative names and
|
||||
will be searched for in the domains listed in the <span class="type">search</span>
|
||||
or <span class="type">domain</span> directive in
|
||||
<code class="filename">/etc/resolv.conf</code>.
|
||||
</p>
|
||||
Non-recursive queries can be made via the <code class="option">-r</code> option.
|
||||
Setting this option clears the <span class="type">RD</span> — recursion
|
||||
desired — bit in the query which <span><strong class="command">host</strong></span> makes.
|
||||
This should mean that the name server receiving the query will not
|
||||
attempt to resolve <em class="parameter"><code>name</code></em>. The
|
||||
<code class="option">-r</code> option enables <span><strong class="command">host</strong></span>
|
||||
to mimic
|
||||
the behaviour of a name server by making non-recursive queries and
|
||||
expecting to receive answers to those queries that are usually
|
||||
referrals to other name servers.
|
||||
</p>
|
||||
<p>
|
||||
The number of UDP retries for a lookup can be changed with the
|
||||
<code class="option">-R</code> option. <em class="parameter"><code>number</code></em> indicates
|
||||
how many times <span><strong class="command">host</strong></span> will repeat a query that does
|
||||
not get answered. The default number of retries is 1. If
|
||||
<em class="parameter"><code>number</code></em> is negative or zero, the number of
|
||||
retries will default to 1.
|
||||
</p>
|
||||
By default <span><strong class="command">host</strong></span> uses UDP when making
|
||||
queries. The
|
||||
<code class="option">-T</code> option makes it use a TCP connection when querying
|
||||
the name server. TCP will be automatically selected for queries that
|
||||
require it, such as zone transfer (AXFR) requests.
|
||||
</p>
|
||||
<p>
|
||||
Non-recursive queries can be made via the <code class="option">-r</code> option.
|
||||
Setting this option clears the <span class="type">RD</span> — recursion
|
||||
desired — bit in the query which <span><strong class="command">host</strong></span> makes.
|
||||
This should mean that the name server receiving the query will not
|
||||
attempt to resolve <em class="parameter"><code>name</code></em>. The
|
||||
<code class="option">-r</code> option enables <span><strong class="command">host</strong></span> to mimic
|
||||
the behaviour of a name server by making non-recursive queries and
|
||||
expecting to receive answers to those queries that are usually
|
||||
referrals to other name servers.
|
||||
</p>
|
||||
The <code class="option">-4</code> option forces <span><strong class="command">host</strong></span> to only
|
||||
use IPv4 query transport. The <code class="option">-6</code> option forces
|
||||
<span><strong class="command">host</strong></span> to only use IPv6 query transport.
|
||||
</p>
|
||||
<p>
|
||||
By default <span><strong class="command">host</strong></span> uses UDP when making queries. The
|
||||
<code class="option">-T</code> option makes it use a TCP connection when querying
|
||||
the name server. TCP will be automatically selected for queries that
|
||||
require it, such as zone transfer (AXFR) requests.
|
||||
</p>
|
||||
The <code class="option">-t</code> option is used to select the query type.
|
||||
<em class="parameter"><code>type</code></em> can be any recognised query
|
||||
type: CNAME,
|
||||
NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
|
||||
<span><strong class="command">host</strong></span> automatically selects an appropriate
|
||||
query
|
||||
type. By default it looks for A records, but if the
|
||||
<code class="option">-C</code> option was given, queries will be made for SOA
|
||||
records, and if <em class="parameter"><code>name</code></em> is a
|
||||
dotted-decimal IPv4
|
||||
address or colon-delimited IPv6 address, <span><strong class="command">host</strong></span> will
|
||||
query for PTR records. If a query type of IXFR is chosen the starting
|
||||
serial number can be specified by appending an equal followed by the
|
||||
starting serial number (e.g. -t IXFR=12345678).
|
||||
</p>
|
||||
<p>
|
||||
The <code class="option">-4</code> option forces <span><strong class="command">host</strong></span> to only
|
||||
use IPv4 query transport. The <code class="option">-6</code> option forces
|
||||
<span><strong class="command">host</strong></span> to only use IPv6 query transport.
|
||||
</p>
|
||||
The time to wait for a reply can be controlled through the
|
||||
<code class="option">-W</code> and <code class="option">-w</code> options. The
|
||||
<code class="option">-W</code> option makes <span><strong class="command">host</strong></span>
|
||||
wait for
|
||||
<em class="parameter"><code>wait</code></em> seconds. If <em class="parameter"><code>wait</code></em>
|
||||
is less than one, the wait interval is set to one second. When the
|
||||
<code class="option">-w</code> option is used, <span><strong class="command">host</strong></span>
|
||||
will
|
||||
effectively wait forever for a reply. The time to wait for a response
|
||||
will be set to the number of seconds given by the hardware's maximum
|
||||
value for an integer quantity.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="option">-t</code> option is used to select the query type.
|
||||
<em class="parameter"><code>type</code></em> can be any recognised query type: CNAME,
|
||||
NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
|
||||
<span><strong class="command">host</strong></span> automatically selects an appropriate query
|
||||
type. By default it looks for A records, but if the
|
||||
<code class="option">-C</code> option was given, queries will be made for SOA
|
||||
records, and if <em class="parameter"><code>name</code></em> is a dotted-decimal IPv4
|
||||
address or colon-delimited IPv6 address, <span><strong class="command">host</strong></span> will
|
||||
query for PTR records. If a query type of IXFR is chosen the starting
|
||||
serial number can be specified by appending an equal followed by the
|
||||
starting serial number (e.g. -t IXFR=12345678).
|
||||
</p>
|
||||
The <code class="option">-s</code> option tells <span><strong class="command">host</strong></span>
|
||||
<span class="emphasis"><em>not</em></span> to send the query to the next nameserver
|
||||
if any server responds with a SERVFAIL response, which is the
|
||||
reverse of normal stub resolver behaviour.
|
||||
</p>
|
||||
<p>
|
||||
The time to wait for a reply can be controlled through the
|
||||
<code class="option">-W</code> and <code class="option">-w</code> options. The
|
||||
<code class="option">-W</code> option makes <span><strong class="command">host</strong></span> wait for
|
||||
<em class="parameter"><code>wait</code></em> seconds. If <em class="parameter"><code>wait</code></em>
|
||||
is less than one, the wait interval is set to one second. When the
|
||||
<code class="option">-w</code> option is used, <span><strong class="command">host</strong></span> will
|
||||
effectively wait forever for a reply. The time to wait for a response
|
||||
will be set to the number of seconds given by the hardware's maximum
|
||||
value for an integer quantity.
|
||||
</p>
|
||||
The <code class="option">-m</code> can be used to set the memory usage debugging
|
||||
flags
|
||||
<em class="parameter"><code>record</code></em>, <em class="parameter"><code>usage</code></em> and
|
||||
<em class="parameter"><code>trace</code></em>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549874"></a><h2>FILES</h2>
|
||||
<a name="id2543725"></a><h2>IDN SUPPORT</h2>
|
||||
<p>
|
||||
<code class="filename">/etc/resolv.conf</code>
|
||||
</p>
|
||||
If <span><strong class="command">host</strong></span> has been built with IDN (internationalized
|
||||
domain name) support, it can accept and display non-ASCII domain names.
|
||||
<span><strong class="command">host</strong></span> appropriately converts character encoding of
|
||||
domain name before sending a request to DNS server or displaying a
|
||||
reply from the server.
|
||||
If you'd like to turn off the IDN support for some reason, defines
|
||||
the <code class="envar">IDN_DISABLE</code> environment variable.
|
||||
The IDN support is disabled if the variable is set when
|
||||
<span><strong class="command">host</strong></span> runs.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549886"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>.
|
||||
</p>
|
||||
<a name="id2543748"></a><h2>FILES</h2>
|
||||
<p><code class="filename">/etc/resolv.conf</code>
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2543828"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>.
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
</html>
|
||||
|
@ -15,11 +15,13 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.h,v 1.71.2.6.2.14 2006/12/07 01:26:33 marka Exp $ */
|
||||
/* $Id: dig.h,v 1.82.18.19 2006/12/07 06:08:02 marka Exp $ */
|
||||
|
||||
#ifndef DIG_H
|
||||
#define DIG_H
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <dns/rdatalist.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
@ -38,29 +40,36 @@
|
||||
#define MXSERV 20
|
||||
#define MXNAME (DNS_NAME_MAXTEXT+1)
|
||||
#define MXRD 32
|
||||
/*% Buffer Size */
|
||||
#define BUFSIZE 512
|
||||
#define COMMSIZE 0xffff
|
||||
#ifndef RESOLV_CONF
|
||||
/*% location of resolve.conf */
|
||||
#define RESOLV_CONF "/etc/resolv.conf"
|
||||
#endif
|
||||
/*% output buffer */
|
||||
#define OUTPUTBUF 32767
|
||||
/*% Max RR Limit */
|
||||
#define MAXRRLIMIT 0xffffffff
|
||||
#define MAXTIMEOUT 0xffff
|
||||
/*% Max number of tries */
|
||||
#define MAXTRIES 0xffffffff
|
||||
/*% Max number of dots */
|
||||
#define MAXNDOTS 0xffff
|
||||
/*% Max number of ports */
|
||||
#define MAXPORT 0xffff
|
||||
/*% Max serial number */
|
||||
#define MAXSERIAL 0xffffffff
|
||||
|
||||
/*
|
||||
* Default timeout values
|
||||
*/
|
||||
/*% Default TCP Timeout */
|
||||
#define TCP_TIMEOUT 10
|
||||
/*% Default UDP Timeout */
|
||||
#define UDP_TIMEOUT 5
|
||||
|
||||
#define SERVER_TIMEOUT 1
|
||||
|
||||
#define LOOKUP_LIMIT 64
|
||||
/*
|
||||
/*%
|
||||
* Lookup_limit is just a limiter, keeping too many lookups from being
|
||||
* created. It's job is mainly to prevent the program from running away
|
||||
* in a tight loop of constant lookups. It's value is arbitrary.
|
||||
@ -90,22 +99,23 @@ typedef struct dig_message dig_message_t;
|
||||
typedef ISC_LIST(dig_server_t) dig_serverlist_t;
|
||||
typedef struct dig_searchlist dig_searchlist_t;
|
||||
|
||||
/*% The dig_lookup structure */
|
||||
struct dig_lookup {
|
||||
isc_boolean_t
|
||||
pending, /* Pending a successful answer */
|
||||
pending, /*%< Pending a successful answer */
|
||||
waiting_connect,
|
||||
doing_xfr,
|
||||
ns_search_only, /* dig +nssearch, host -C */
|
||||
identify, /* Append an "on server <foo>" message */
|
||||
identify_previous_line, /* Prepend a "Nameserver <foo>:"
|
||||
ns_search_only, /*%< dig +nssearch, host -C */
|
||||
identify, /*%< Append an "on server <foo>" message */
|
||||
identify_previous_line, /*% Prepend a "Nameserver <foo>:"
|
||||
message, with newline and tab */
|
||||
ignore,
|
||||
recurse,
|
||||
aaonly,
|
||||
adflag,
|
||||
cdflag,
|
||||
trace, /* dig +trace */
|
||||
trace_root, /* initial query for either +trace or +nssearch */
|
||||
trace, /*% dig +trace */
|
||||
trace_root, /*% initial query for either +trace or +nssearch */
|
||||
tcp_mode,
|
||||
ip6_int,
|
||||
comments,
|
||||
@ -116,6 +126,8 @@ struct dig_lookup {
|
||||
section_additional,
|
||||
servfail_stops,
|
||||
new_search,
|
||||
need_search,
|
||||
done_as_is,
|
||||
besteffort,
|
||||
dnssec;
|
||||
#ifdef DIG_SIGCHASE
|
||||
@ -130,7 +142,7 @@ isc_boolean_t sigchase;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
char textname[MXNAME]; /* Name we're going to be looking up */
|
||||
char textname[MXNAME]; /*% Name we're going to be looking up */
|
||||
char cmdline[MXNAME];
|
||||
dns_rdatatype_t rdtype;
|
||||
dns_rdatatype_t qrdtype;
|
||||
@ -162,14 +174,17 @@ isc_boolean_t sigchase;
|
||||
isc_uint32_t retries;
|
||||
int nsfound;
|
||||
isc_uint16_t udpsize;
|
||||
isc_int16_t edns;
|
||||
isc_uint32_t ixfr_serial;
|
||||
isc_buffer_t rdatabuf;
|
||||
char rdatastore[MXNAME];
|
||||
dst_context_t *tsigctx;
|
||||
isc_buffer_t *querysig;
|
||||
isc_uint32_t msgcounter;
|
||||
dns_fixedname_t fdomain;
|
||||
};
|
||||
|
||||
/*% The dig_query structure */
|
||||
struct dig_query {
|
||||
dig_lookup_t *lookup;
|
||||
isc_boolean_t waiting_connect,
|
||||
@ -200,6 +215,7 @@ struct dig_query {
|
||||
ISC_LINK(dig_query_t) link;
|
||||
isc_sockaddr_t sockaddr;
|
||||
isc_time_t time_sent;
|
||||
isc_uint64_t byte_count;
|
||||
isc_buffer_t sendbuf;
|
||||
};
|
||||
|
||||
@ -230,9 +246,10 @@ typedef ISC_LIST(dig_lookup_t) dig_lookuplist_t;
|
||||
extern dig_lookuplist_t lookup_list;
|
||||
extern dig_serverlist_t server_list;
|
||||
extern dig_searchlistlist_t search_list;
|
||||
extern unsigned int extrabytes;
|
||||
|
||||
extern isc_boolean_t have_ipv4, have_ipv6, specified_source,
|
||||
usesearch, qr;
|
||||
extern isc_boolean_t check_ra, have_ipv4, have_ipv6, specified_source,
|
||||
usesearch, showsearch, qr;
|
||||
extern in_port_t port;
|
||||
extern unsigned int timeout;
|
||||
extern isc_mem_t *mctx;
|
||||
@ -245,6 +262,8 @@ extern isc_sockaddr_t bind_address;
|
||||
extern char keynametext[MXNAME];
|
||||
extern char keyfile[MXNAME];
|
||||
extern char keysecret[MXNAME];
|
||||
extern dns_name_t *hmacname;
|
||||
extern unsigned int digestbits;
|
||||
#ifdef DIG_SIGCHASE
|
||||
extern char trustedkey[MXNAME];
|
||||
#endif
|
||||
@ -346,13 +365,13 @@ printrdataset(dns_name_t *owner_name, dns_rdataset_t *rdataset,
|
||||
|
||||
isc_result_t
|
||||
printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers);
|
||||
/*
|
||||
/*%<
|
||||
* Print the final result of the lookup.
|
||||
*/
|
||||
|
||||
void
|
||||
received(int bytes, isc_sockaddr_t *from, dig_query_t *query);
|
||||
/*
|
||||
/*%<
|
||||
* Print a message about where and when the response
|
||||
* was received from, like the final comment in the
|
||||
* output of "dig".
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
@ -12,13 +12,13 @@
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" $Id: nslookup.1,v 1.1.6.7 2006/06/29 13:02:30 marka Exp $
|
||||
.\" $Id: nslookup.1,v 1.1.10.12 2007/01/30 00:23:44 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: nslookup
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: Jun 30, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
@ -42,10 +42,10 @@ has two modes: interactive and non\-interactive. Interactive mode allows the use
|
||||
.SH "ARGUMENTS"
|
||||
.PP
|
||||
Interactive mode is entered in the following cases:
|
||||
.TP 3n
|
||||
.TP 4
|
||||
1.
|
||||
when no arguments are given (the default name server will be used)
|
||||
.TP 3n
|
||||
.TP 4
|
||||
2.
|
||||
when the first argument is a hyphen (\-) and the second argument is the host name or Internet address of a name server.
|
||||
.sp
|
||||
@ -54,17 +54,22 @@ when the first argument is a hyphen (\-) and the second argument is the host nam
|
||||
Non\-interactive mode is used when the name or Internet address of the host to be looked up is given as the first argument. The optional second argument specifies the host name or address of a name server.
|
||||
.PP
|
||||
Options can also be specified on the command line if they precede the arguments and are prefixed with a hyphen. For example, to change the default query type to host information, and the initial timeout to 10 seconds, type:
|
||||
.sp .RS 3n .nf nslookup \-query=hinfo \-timeout=10 .fi .RE
|
||||
.sp .RS 4 .nf nslookup \-query=hinfo \-timeout=10 .fi .RE
|
||||
.SH "INTERACTIVE COMMANDS"
|
||||
.TP 3n
|
||||
host [server]
|
||||
.PP
|
||||
\fBhost\fR [server]
|
||||
.RS 4
|
||||
Look up information for host using the current default server or using server, if specified. If host is an Internet address and the query type is A or PTR, the name of the host is returned. If host is a name and does not have a trailing period, the search list is used to qualify the name.
|
||||
.sp
|
||||
To look up a host not in the current domain, append a period to the name.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBserver\fR \fIdomain\fR
|
||||
.TP 3n
|
||||
.RS 4
|
||||
.RE
|
||||
.PP
|
||||
\fBlserver\fR \fIdomain\fR
|
||||
.RS 4
|
||||
Change the default server to
|
||||
\fIdomain\fR;
|
||||
\fBlserver\fR
|
||||
@ -72,107 +77,165 @@ uses the initial server to look up information about
|
||||
\fIdomain\fR, while
|
||||
\fBserver\fR
|
||||
uses the current default server. If an authoritative answer can't be found, the names of servers that might have the answer are returned.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBroot\fR
|
||||
.RS 4
|
||||
not implemented
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBfinger\fR
|
||||
.RS 4
|
||||
not implemented
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBls\fR
|
||||
.RS 4
|
||||
not implemented
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBview\fR
|
||||
.RS 4
|
||||
not implemented
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBhelp\fR
|
||||
.RS 4
|
||||
not implemented
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fB?\fR
|
||||
.RS 4
|
||||
not implemented
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBexit\fR
|
||||
.RS 4
|
||||
Exits the program.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBset\fR \fIkeyword\fR\fI[=value]\fR
|
||||
.RS 4
|
||||
This command is used to change state information that affects the lookups. Valid keywords are:
|
||||
.RS 3n
|
||||
.TP 3n
|
||||
.RS 4
|
||||
.PP
|
||||
\fBall\fR
|
||||
.RS 4
|
||||
Prints the current values of the frequently used options to
|
||||
\fBset\fR. Information about the current default server and host is also printed.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBclass=\fR\fIvalue\fR
|
||||
.RS 4
|
||||
Change the query class to one of:
|
||||
.RS 3n
|
||||
.TP 3n
|
||||
.RS 4
|
||||
.PP
|
||||
\fBIN\fR
|
||||
.RS 4
|
||||
the Internet class
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBCH\fR
|
||||
.RS 4
|
||||
the Chaos class
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBHS\fR
|
||||
.RS 4
|
||||
the Hesiod class
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBANY\fR
|
||||
.RS 4
|
||||
wildcard
|
||||
.RE
|
||||
.IP "" 3n
|
||||
.RE
|
||||
.IP "" 4
|
||||
The class specifies the protocol group of the information.
|
||||
.sp
|
||||
(Default = IN; abbreviation = cl)
|
||||
.TP 3n
|
||||
\fB\fI[no]\fR\fR\fBdebug\fR
|
||||
.RE
|
||||
.PP
|
||||
\fB \fR\fB\fI[no]\fR\fR\fBdebug\fR
|
||||
.RS 4
|
||||
Turn debugging mode on. A lot more information is printed about the packet sent to the server and the resulting answer.
|
||||
.sp
|
||||
(Default = nodebug; abbreviation =
|
||||
[no]deb)
|
||||
.TP 3n
|
||||
\fB\fI[no]\fR\fR\fBd2\fR
|
||||
.RE
|
||||
.PP
|
||||
\fB \fR\fB\fI[no]\fR\fR\fBd2\fR
|
||||
.RS 4
|
||||
Turn debugging mode on. A lot more information is printed about the packet sent to the server and the resulting answer.
|
||||
.sp
|
||||
(Default = nod2)
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBdomain=\fR\fIname\fR
|
||||
.RS 4
|
||||
Sets the search list to
|
||||
\fIname\fR.
|
||||
.TP 3n
|
||||
\fB\fI[no]\fR\fR\fBsearch\fR
|
||||
.RE
|
||||
.PP
|
||||
\fB \fR\fB\fI[no]\fR\fR\fBsearch\fR
|
||||
.RS 4
|
||||
If the lookup request contains at least one period but doesn't end with a trailing period, append the domain names in the domain search list to the request until an answer is received.
|
||||
.sp
|
||||
(Default = search)
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBport=\fR\fIvalue\fR
|
||||
.RS 4
|
||||
Change the default TCP/UDP name server port to
|
||||
\fIvalue\fR.
|
||||
.sp
|
||||
(Default = 53; abbreviation = po)
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBquerytype=\fR\fIvalue\fR
|
||||
.TP 3n
|
||||
.RS 4
|
||||
.RE
|
||||
.PP
|
||||
\fBtype=\fR\fIvalue\fR
|
||||
.RS 4
|
||||
Change the type of the information query.
|
||||
.sp
|
||||
(Default = A; abbreviations = q, ty)
|
||||
.TP 3n
|
||||
\fB\fI[no]\fR\fR\fBrecurse\fR
|
||||
.RE
|
||||
.PP
|
||||
\fB \fR\fB\fI[no]\fR\fR\fBrecurse\fR
|
||||
.RS 4
|
||||
Tell the name server to query other servers if it does not have the information.
|
||||
.sp
|
||||
(Default = recurse; abbreviation = [no]rec)
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBretry=\fR\fInumber\fR
|
||||
.RS 4
|
||||
Set the number of retries to number.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fBtimeout=\fR\fInumber\fR
|
||||
.RS 4
|
||||
Change the initial timeout interval for waiting for a reply to number seconds.
|
||||
.TP 3n
|
||||
\fB\fI[no]\fR\fR\fBvc\fR
|
||||
.RE
|
||||
.PP
|
||||
\fB \fR\fB\fI[no]\fR\fR\fBvc\fR
|
||||
.RS 4
|
||||
Always use a virtual circuit when sending requests to the server.
|
||||
.sp
|
||||
(Default = novc)
|
||||
.RE
|
||||
.IP "" 3n
|
||||
.PP
|
||||
\fB \fR\fB\fI[no]\fR\fR\fBfail\fR
|
||||
.RS 4
|
||||
Try the next nameserver if a nameserver responds with SERVFAIL or a referral (nofail) or terminate query (fail) on such a response.
|
||||
.sp
|
||||
(Default = nofail)
|
||||
.RE
|
||||
.RE
|
||||
.IP "" 4
|
||||
.RE
|
||||
.SH "FILES"
|
||||
.PP
|
||||
\fI/etc/resolv.conf\fR
|
||||
@ -185,4 +248,5 @@ Always use a virtual circuit when sending requests to the server.
|
||||
.PP
|
||||
Andrew Cherenson
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004\-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2004\-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: nslookup.c,v 1.90.2.4.2.12 2006/06/09 23:50:53 marka Exp $ */
|
||||
/* $Id: nslookup.c,v 1.101.18.12 2006/12/07 06:08:02 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -50,7 +50,8 @@ static isc_boolean_t short_form = ISC_TRUE,
|
||||
comments = ISC_TRUE, section_question = ISC_TRUE,
|
||||
section_answer = ISC_TRUE, section_authority = ISC_TRUE,
|
||||
section_additional = ISC_TRUE, recurse = ISC_TRUE,
|
||||
aaonly = ISC_FALSE;
|
||||
aaonly = ISC_FALSE, nofail = ISC_TRUE;
|
||||
|
||||
static isc_boolean_t in_use = ISC_FALSE;
|
||||
static char defclass[MXRD] = "IN";
|
||||
static char deftype[MXRD] = "A";
|
||||
@ -619,8 +620,10 @@ setoption(char *opt) {
|
||||
tcpmode = ISC_FALSE;
|
||||
} else if (strncasecmp(opt, "deb", 3) == 0) {
|
||||
short_form = ISC_FALSE;
|
||||
showsearch = ISC_TRUE;
|
||||
} else if (strncasecmp(opt, "nodeb", 5) == 0) {
|
||||
short_form = ISC_TRUE;
|
||||
showsearch = ISC_FALSE;
|
||||
} else if (strncasecmp(opt, "d2", 2) == 0) {
|
||||
debugging = ISC_TRUE;
|
||||
} else if (strncasecmp(opt, "nod2", 4) == 0) {
|
||||
@ -631,6 +634,10 @@ setoption(char *opt) {
|
||||
usesearch = ISC_FALSE;
|
||||
} else if (strncasecmp(opt, "sil", 3) == 0) {
|
||||
/* deprecation_msg = ISC_FALSE; */
|
||||
} else if (strncasecmp(opt, "fail", 3) == 0) {
|
||||
nofail=ISC_FALSE;
|
||||
} else if (strncasecmp(opt, "nofail", 3) == 0) {
|
||||
nofail=ISC_TRUE;
|
||||
} else {
|
||||
printf("*** Invalid option: %s\n", opt);
|
||||
}
|
||||
@ -689,6 +696,8 @@ addlookup(char *opt) {
|
||||
lookup->section_authority = section_authority;
|
||||
lookup->section_additional = section_additional;
|
||||
lookup->new_search = ISC_TRUE;
|
||||
if (nofail)
|
||||
lookup->servfail_stops = ISC_FALSE;
|
||||
ISC_LIST_INIT(lookup->q);
|
||||
ISC_LINK_INIT(lookup, link);
|
||||
ISC_LIST_APPEND(lookup_list, lookup, link);
|
||||
@ -728,6 +737,7 @@ get_next_command(void) {
|
||||
(strcasecmp(ptr, "lserver") == 0)) {
|
||||
isc_app_block();
|
||||
set_nameserver(arg);
|
||||
check_ra = ISC_FALSE;
|
||||
isc_app_unblock();
|
||||
show_settings(ISC_TRUE, ISC_TRUE);
|
||||
} else if (strcasecmp(ptr, "exit") == 0) {
|
||||
@ -766,9 +776,10 @@ parse_args(int argc, char **argv) {
|
||||
have_lookup = ISC_TRUE;
|
||||
in_use = ISC_TRUE;
|
||||
addlookup(argv[0]);
|
||||
}
|
||||
else
|
||||
} else {
|
||||
set_nameserver(argv[0]);
|
||||
check_ra = ISC_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -844,6 +855,8 @@ main(int argc, char **argv) {
|
||||
ISC_LIST_INIT(server_list);
|
||||
ISC_LIST_INIT(search_list);
|
||||
|
||||
check_ra = ISC_TRUE;
|
||||
|
||||
result = isc_app_start();
|
||||
check_result(result, "isc_app_start");
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!--
|
||||
- Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
- purpose with or without fee is hereby granted, provided that the above
|
||||
@ -17,12 +17,11 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: nslookup.docbook,v 1.3.6.7 2006/01/06 00:01:42 marka Exp $ -->
|
||||
|
||||
<!-- $Id: nslookup.docbook,v 1.4.2.10 2007/01/29 23:57:20 marka Exp $ -->
|
||||
<!--
|
||||
- Copyright (c) 1985, 1989
|
||||
- The Regents of the University of California. All rights reserved.
|
||||
-
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions
|
||||
- are met:
|
||||
@ -38,7 +37,7 @@
|
||||
- 4. Neither the name of the University nor the names of its contributors
|
||||
- may be used to endorse or promote products derived from this software
|
||||
- without specific prior written permission.
|
||||
-
|
||||
-
|
||||
- THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
@ -51,281 +50,449 @@
|
||||
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
- SUCH DAMAGE.
|
||||
-->
|
||||
|
||||
<refentry>
|
||||
|
||||
<refentryinfo>
|
||||
<date>Jun 30, 2000</date>
|
||||
</refentryinfo>
|
||||
<refentryinfo>
|
||||
<date>Jun 30, 2000</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>nslookup</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
<refmeta>
|
||||
<refentrytitle>nslookup</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>nslookup</refname>
|
||||
<refpurpose>query Internet name servers interactively</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<year>2006</year>
|
||||
<year>2007</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname>nslookup</refname>
|
||||
<refpurpose>query Internet name servers interactively</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>nslookup</command>
|
||||
<arg><option>-option</option></arg>
|
||||
<arg choice="opt">name | -</arg>
|
||||
<arg choice="opt">server</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>nslookup</command>
|
||||
<arg><option>-option</option></arg>
|
||||
<arg choice="opt">name | -</arg>
|
||||
<arg choice="opt">server</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para><command>Nslookup</command>
|
||||
is a program to query Internet domain name servers. <command>Nslookup</command>
|
||||
has two modes: interactive and non-interactive. Interactive mode allows
|
||||
the user to query name servers for information about various hosts and
|
||||
domains or to print a list of hosts in a domain. Non-interactive mode
|
||||
is
|
||||
used to print just the name and requested information for a host or
|
||||
domain.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<command>Nslookup</command>
|
||||
is a program to query Internet domain name servers. <command>Nslookup</command>
|
||||
has two modes: interactive and non-interactive. Interactive mode allows
|
||||
the user to query name servers for information about various hosts and
|
||||
domains or to print a list of hosts in a domain. Non-interactive mode is
|
||||
used to print just the name and requested information for a host or
|
||||
domain.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
<title>ARGUMENTS</title>
|
||||
<para>
|
||||
Interactive mode is entered in the following cases:
|
||||
<orderedlist numeration="loweralpha">
|
||||
<listitem>
|
||||
<para>
|
||||
when no arguments are given (the default name server will be used)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
when the first argument is a hyphen (-) and the second argument is
|
||||
the host name or Internet address of a name server.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
|
||||
<refsect1>
|
||||
<title>ARGUMENTS</title>
|
||||
<para>
|
||||
Interactive mode is entered in the following cases:
|
||||
<orderedlist numeration="loweralpha">
|
||||
<listitem>
|
||||
<para>
|
||||
when no arguments are given (the default name server will be used)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
when the first argument is a hyphen (-) and the second argument is
|
||||
the host name or Internet address of a name server.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
<para>
|
||||
Non-interactive mode is used when the name or Internet address of the
|
||||
host to be looked up is given as the first argument. The optional second
|
||||
argument specifies the host name or address of a name server.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Non-interactive mode is used when the name or Internet address of the
|
||||
host to be looked up is given as the first argument. The optional second
|
||||
argument specifies the host name or address of a name server.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Options can also be specified on the command line if they precede the
|
||||
arguments and are prefixed with a hyphen. For example, to
|
||||
change the default query type to host information, and the initial timeout to 10 seconds, type:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
<para>
|
||||
Options can also be specified on the command line if they precede the
|
||||
arguments and are prefixed with a hyphen. For example, to
|
||||
change the default query type to host information, and the initial
|
||||
timeout to 10 seconds, type:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
nslookup -query=hinfo -timeout=10
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>INTERACTIVE COMMANDS</title>
|
||||
<variablelist>
|
||||
<varlistentry><term>host <optional>server</optional></term>
|
||||
<listitem><para>
|
||||
Look up information for host using the current default server or
|
||||
using server, if specified. If host is an Internet address and
|
||||
the query type is A or PTR, the name of the host is returned.
|
||||
If host is a name and does not have a trailing period, the
|
||||
search list is used to qualify the name.
|
||||
</para>
|
||||
<refsect1>
|
||||
<title>INTERACTIVE COMMANDS</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><constant>host</constant> <optional>server</optional></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Look up information for host using the current default server or
|
||||
using server, if specified. If host is an Internet address and
|
||||
the query type is A or PTR, the name of the host is returned.
|
||||
If host is a name and does not have a trailing period, the
|
||||
search list is used to qualify the name.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To look up a host not in the current domain, append a period to
|
||||
the name.
|
||||
</para></listitem></varlistentry>
|
||||
<para>
|
||||
To look up a host not in the current domain, append a period to
|
||||
the name.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>server</constant> <replaceable class="parameter">domain</replaceable></term>
|
||||
<listitem><para></para></listitem></varlistentry>
|
||||
<varlistentry><term><constant>lserver</constant> <replaceable class="parameter">domain</replaceable></term>
|
||||
<listitem><para>
|
||||
Change the default server to <replaceable>domain</replaceable>; <constant>lserver</constant> uses the initial
|
||||
server to look up information about <replaceable>domain</replaceable>, while <constant>server</constant> uses
|
||||
the current default server. If an authoritative answer can't be
|
||||
found, the names of servers that might have the answer are
|
||||
returned.
|
||||
</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>server</constant> <replaceable class="parameter">domain</replaceable></term>
|
||||
<listitem>
|
||||
<para/>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>lserver</constant> <replaceable class="parameter">domain</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Change the default server to <replaceable>domain</replaceable>; <constant>lserver</constant> uses the initial
|
||||
server to look up information about <replaceable>domain</replaceable>, while <constant>server</constant> uses
|
||||
the current default server. If an authoritative answer can't be
|
||||
found, the names of servers that might have the answer are
|
||||
returned.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>root</constant></term>
|
||||
<listitem><para>not implemented</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>root</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
not implemented
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>finger</constant></term>
|
||||
<listitem><para>not implemented</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>finger</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
not implemented
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>ls</constant></term>
|
||||
<listitem><para>not implemented</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>ls</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
not implemented
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>view</constant></term>
|
||||
<listitem><para>not implemented</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>view</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
not implemented
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>help</constant></term>
|
||||
<listitem><para>not implemented</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>help</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
not implemented
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>?</constant></term>
|
||||
<listitem><para>not implemented</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>?</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
not implemented
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>exit</constant></term>
|
||||
<listitem><para>Exits the program.</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>exit</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Exits the program.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>set</constant> <replaceable>keyword<optional>=value</optional></replaceable></term>
|
||||
<listitem><para>This command is used to change state information that affects
|
||||
the lookups. Valid keywords are:
|
||||
<variablelist>
|
||||
<varlistentry><term><constant>all</constant></term>
|
||||
<listitem>
|
||||
<para>Prints the current values of the frequently used
|
||||
options to <command>set</command>. Information about the current default
|
||||
server and host is also printed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>set</constant>
|
||||
<replaceable>keyword<optional>=value</optional></replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This command is used to change state information that affects
|
||||
the lookups. Valid keywords are:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><constant>all</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints the current values of the frequently used
|
||||
options to <command>set</command>.
|
||||
Information about the current default
|
||||
server and host is also printed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>class=</constant><replaceable>value</replaceable></term>
|
||||
<listitem><para>
|
||||
Change the query class to one of:
|
||||
<variablelist>
|
||||
<varlistentry><term><constant>IN</constant></term>
|
||||
<listitem><para>the Internet class</para></listitem></varlistentry>
|
||||
<varlistentry><term><constant>CH</constant></term>
|
||||
<listitem><para>the Chaos class</para></listitem></varlistentry>
|
||||
<varlistentry><term><constant>HS</constant></term>
|
||||
<listitem><para>the Hesiod class</para></listitem></varlistentry>
|
||||
<varlistentry><term><constant>ANY</constant></term>
|
||||
<listitem><para>wildcard</para></listitem></varlistentry>
|
||||
</variablelist>
|
||||
The class specifies the protocol group of the information.
|
||||
</para><para>
|
||||
(Default = IN; abbreviation = cl)
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>class=</constant><replaceable>value</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Change the query class to one of:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><constant>IN</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
the Internet class
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>CH</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
the Chaos class
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>HS</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
the Hesiod class
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>ANY</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
wildcard
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
The class specifies the protocol group of the information.
|
||||
|
||||
<varlistentry><term><constant><replaceable><optional>no</optional></replaceable>debug</constant></term>
|
||||
<listitem><para>
|
||||
Turn debugging mode on. A lot more information is
|
||||
printed about the packet sent to the server and the
|
||||
resulting answer.
|
||||
</para><para>
|
||||
(Default = nodebug; abbreviation = <optional>no</optional>deb)
|
||||
</para></listitem></varlistentry>
|
||||
</para>
|
||||
<para>
|
||||
(Default = IN; abbreviation = cl)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant><replaceable><optional>no</optional></replaceable>d2</constant></term>
|
||||
<listitem><para>
|
||||
Turn debugging mode on. A lot more information is
|
||||
printed about the packet sent to the server and the
|
||||
resulting answer.
|
||||
</para><para>
|
||||
(Default = nod2)
|
||||
</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>
|
||||
<replaceable><optional>no</optional></replaceable>debug</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Turn debugging mode on. A lot more information is
|
||||
printed about the packet sent to the server and the
|
||||
resulting answer.
|
||||
</para>
|
||||
<para>
|
||||
(Default = nodebug; abbreviation = <optional>no</optional>deb)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>domain=</constant><replaceable>name</replaceable></term>
|
||||
<listitem><para>
|
||||
Sets the search list to <replaceable>name</replaceable>.
|
||||
</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>
|
||||
<replaceable><optional>no</optional></replaceable>d2</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Turn debugging mode on. A lot more information is
|
||||
printed about the packet sent to the server and the
|
||||
resulting answer.
|
||||
</para>
|
||||
<para>
|
||||
(Default = nod2)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant><replaceable><optional>no</optional></replaceable>search</constant></term>
|
||||
<listitem><para>
|
||||
If the lookup request contains at least one period but
|
||||
doesn't end with a trailing period, append the domain
|
||||
names in the domain search list to the request until an
|
||||
answer is received.
|
||||
</para><para>
|
||||
(Default = search)
|
||||
</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>domain=</constant><replaceable>name</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the search list to <replaceable>name</replaceable>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>port=</constant><replaceable>value</replaceable></term>
|
||||
<listitem><para>
|
||||
Change the default TCP/UDP name server port to <replaceable>value</replaceable>.
|
||||
</para><para>
|
||||
(Default = 53; abbreviation = po)
|
||||
</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>
|
||||
<replaceable><optional>no</optional></replaceable>search</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If the lookup request contains at least one period but
|
||||
doesn't end with a trailing period, append the domain
|
||||
names in the domain search list to the request until an
|
||||
answer is received.
|
||||
</para>
|
||||
<para>
|
||||
(Default = search)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>querytype=</constant><replaceable>value</replaceable></term>
|
||||
<listitem><para></para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>port=</constant><replaceable>value</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Change the default TCP/UDP name server port to <replaceable>value</replaceable>.
|
||||
</para>
|
||||
<para>
|
||||
(Default = 53; abbreviation = po)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>type=</constant><replaceable>value</replaceable></term>
|
||||
<listitem><para>
|
||||
Change the type of the information query.
|
||||
</para><para>
|
||||
(Default = A; abbreviations = q, ty)
|
||||
</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>querytype=</constant><replaceable>value</replaceable></term>
|
||||
<listitem>
|
||||
<para/>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant><replaceable><optional>no</optional></replaceable>recurse</constant></term>
|
||||
<listitem><para>
|
||||
Tell the name server to query other servers if it does not have the
|
||||
information.
|
||||
</para><para>
|
||||
(Default = recurse; abbreviation = [no]rec)
|
||||
</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>type=</constant><replaceable>value</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Change the type of the information query.
|
||||
</para>
|
||||
<para>
|
||||
(Default = A; abbreviations = q, ty)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>retry=</constant><replaceable>number</replaceable></term>
|
||||
<listitem><para>
|
||||
Set the number of retries to number.
|
||||
</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>
|
||||
<replaceable><optional>no</optional></replaceable>recurse</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Tell the name server to query other servers if it does not
|
||||
have the
|
||||
information.
|
||||
</para>
|
||||
<para>
|
||||
(Default = recurse; abbreviation = [no]rec)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant>timeout=</constant><replaceable>number</replaceable></term>
|
||||
<listitem><para>
|
||||
Change the initial timeout interval for waiting for a
|
||||
reply to number seconds.
|
||||
</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>retry=</constant><replaceable>number</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Set the number of retries to number.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><constant><replaceable><optional>no</optional></replaceable>vc</constant></term>
|
||||
<listitem><para>
|
||||
Always use a virtual circuit when sending requests to the server.
|
||||
</para><para>
|
||||
(Default = novc)
|
||||
</para></listitem></varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>timeout=</constant><replaceable>number</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Change the initial timeout interval for waiting for a
|
||||
reply to number seconds.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para></listitem></varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<varlistentry>
|
||||
<term><constant>
|
||||
<replaceable><optional>no</optional></replaceable>vc</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Always use a virtual circuit when sending requests to the
|
||||
server.
|
||||
</para>
|
||||
<para>
|
||||
(Default = novc)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<refsect1>
|
||||
<title>FILES</title>
|
||||
<para>
|
||||
<filename>/etc/resolv.conf</filename>
|
||||
</para>
|
||||
</refsect1>
|
||||
<varlistentry>
|
||||
<term><constant>
|
||||
<replaceable><optional>no</optional></replaceable>fail</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Try the next nameserver if a nameserver responds with
|
||||
SERVFAIL or a referral (nofail) or terminate query
|
||||
(fail) on such a response.
|
||||
</para>
|
||||
<para>
|
||||
(Default = nofail)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>host</refentrytitle><manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</variablelist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Author</title>
|
||||
<para>
|
||||
Andrew Cherenson
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refsect1>
|
||||
<title>FILES</title>
|
||||
<para><filename>/etc/resolv.conf</filename>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para><citerefentry>
|
||||
<refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>host</refentrytitle><manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Author</title>
|
||||
<para>
|
||||
Andrew Cherenson
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry><!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
- Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
- purpose with or without fee is hereby granted, provided that the above
|
||||
@ -13,15 +13,15 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: nslookup.html,v 1.1.6.12 2006/06/29 13:02:30 marka Exp $ -->
|
||||
<!-- $Id: nslookup.html,v 1.1.10.19 2007/01/30 00:23:44 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>nslookup</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482694"></a><div class="titlepage"></div>
|
||||
<a name="id2476276"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p>nslookup — query Internet name servers interactively</p>
|
||||
@ -31,234 +31,279 @@
|
||||
<div class="cmdsynopsis"><p><code class="command">nslookup</code> [<code class="option">-option</code>] [name | -] [server]</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549404"></a><h2>DESCRIPTION</h2>
|
||||
<p>
|
||||
<span><strong class="command">Nslookup</strong></span>
|
||||
is a program to query Internet domain name servers. <span><strong class="command">Nslookup</strong></span>
|
||||
has two modes: interactive and non-interactive. Interactive mode allows
|
||||
the user to query name servers for information about various hosts and
|
||||
domains or to print a list of hosts in a domain. Non-interactive mode is
|
||||
used to print just the name and requested information for a host or
|
||||
domain.
|
||||
</p>
|
||||
<a name="id2543355"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">Nslookup</strong></span>
|
||||
is a program to query Internet domain name servers. <span><strong class="command">Nslookup</strong></span>
|
||||
has two modes: interactive and non-interactive. Interactive mode allows
|
||||
the user to query name servers for information about various hosts and
|
||||
domains or to print a list of hosts in a domain. Non-interactive mode
|
||||
is
|
||||
used to print just the name and requested information for a host or
|
||||
domain.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549421"></a><h2>ARGUMENTS</h2>
|
||||
<a name="id2543371"></a><h2>ARGUMENTS</h2>
|
||||
<p>
|
||||
Interactive mode is entered in the following cases:
|
||||
</p>
|
||||
Interactive mode is entered in the following cases:
|
||||
</p>
|
||||
<div class="orderedlist"><ol type="a">
|
||||
<li><p>
|
||||
when no arguments are given (the default name server will be used)
|
||||
</p></li>
|
||||
when no arguments are given (the default name server will be used)
|
||||
</p></li>
|
||||
<li><p>
|
||||
when the first argument is a hyphen (-) and the second argument is
|
||||
the host name or Internet address of a name server.
|
||||
</p></li>
|
||||
when the first argument is a hyphen (-) and the second argument is
|
||||
the host name or Internet address of a name server.
|
||||
</p></li>
|
||||
</ol></div>
|
||||
<p>
|
||||
</p>
|
||||
</p>
|
||||
<p>
|
||||
Non-interactive mode is used when the name or Internet address of the
|
||||
host to be looked up is given as the first argument. The optional second
|
||||
argument specifies the host name or address of a name server.
|
||||
</p>
|
||||
Non-interactive mode is used when the name or Internet address of the
|
||||
host to be looked up is given as the first argument. The optional second
|
||||
argument specifies the host name or address of a name server.
|
||||
</p>
|
||||
<p>
|
||||
Options can also be specified on the command line if they precede the
|
||||
arguments and are prefixed with a hyphen. For example, to
|
||||
change the default query type to host information, and the initial timeout to 10 seconds, type:
|
||||
</p>
|
||||
Options can also be specified on the command line if they precede the
|
||||
arguments and are prefixed with a hyphen. For example, to
|
||||
change the default query type to host information, and the initial
|
||||
timeout to 10 seconds, type:
|
||||
</p>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
nslookup -query=hinfo -timeout=10
|
||||
</pre></div>
|
||||
<p>
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549464"></a><h2>INTERACTIVE COMMANDS</h2>
|
||||
<a name="id2543413"></a><h2>INTERACTIVE COMMANDS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">host [<span class="optional">server</span>]</span></dt>
|
||||
<dt><span class="term"><code class="constant">host</code> [<span class="optional">server</span>]</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Look up information for host using the current default server or
|
||||
using server, if specified. If host is an Internet address and
|
||||
the query type is A or PTR, the name of the host is returned.
|
||||
If host is a name and does not have a trailing period, the
|
||||
search list is used to qualify the name.
|
||||
</p>
|
||||
Look up information for host using the current default server or
|
||||
using server, if specified. If host is an Internet address and
|
||||
the query type is A or PTR, the name of the host is returned.
|
||||
If host is a name and does not have a trailing period, the
|
||||
search list is used to qualify the name.
|
||||
</p>
|
||||
<p>
|
||||
To look up a host not in the current domain, append a period to
|
||||
the name.
|
||||
</p>
|
||||
To look up a host not in the current domain, append a period to
|
||||
the name.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant">server</code> <em class="replaceable"><code>domain</code></em></span></dt>
|
||||
<dd><p></p></dd>
|
||||
<dt><span class="term"><code class="constant">lserver</code> <em class="replaceable"><code>domain</code></em></span></dt>
|
||||
<dd><p>
|
||||
Change the default server to <em class="replaceable"><code>domain</code></em>; <code class="constant">lserver</code> uses the initial
|
||||
server to look up information about <em class="replaceable"><code>domain</code></em>, while <code class="constant">server</code> uses
|
||||
the current default server. If an authoritative answer can't be
|
||||
found, the names of servers that might have the answer are
|
||||
returned.
|
||||
</p></dd>
|
||||
Change the default server to <em class="replaceable"><code>domain</code></em>; <code class="constant">lserver</code> uses the initial
|
||||
server to look up information about <em class="replaceable"><code>domain</code></em>, while <code class="constant">server</code> uses
|
||||
the current default server. If an authoritative answer can't be
|
||||
found, the names of servers that might have the answer are
|
||||
returned.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">root</code></span></dt>
|
||||
<dd><p>not implemented</p></dd>
|
||||
<dd><p>
|
||||
not implemented
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">finger</code></span></dt>
|
||||
<dd><p>not implemented</p></dd>
|
||||
<dd><p>
|
||||
not implemented
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">ls</code></span></dt>
|
||||
<dd><p>not implemented</p></dd>
|
||||
<dd><p>
|
||||
not implemented
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">view</code></span></dt>
|
||||
<dd><p>not implemented</p></dd>
|
||||
<dd><p>
|
||||
not implemented
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">help</code></span></dt>
|
||||
<dd><p>not implemented</p></dd>
|
||||
<dd><p>
|
||||
not implemented
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">?</code></span></dt>
|
||||
<dd><p>not implemented</p></dd>
|
||||
<dd><p>
|
||||
not implemented
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">exit</code></span></dt>
|
||||
<dd><p>Exits the program.</p></dd>
|
||||
<dt><span class="term"><code class="constant">set</code> <em class="replaceable"><code>keyword[<span class="optional">=value</span>]</code></em></span></dt>
|
||||
<dd><p>
|
||||
Exits the program.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">set</code>
|
||||
<em class="replaceable"><code>keyword[<span class="optional">=value</span>]</code></em></span></dt>
|
||||
<dd>
|
||||
<p>This command is used to change state information that affects
|
||||
the lookups. Valid keywords are:
|
||||
</p>
|
||||
<p>
|
||||
This command is used to change state information that affects
|
||||
the lookups. Valid keywords are:
|
||||
</p>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term"><code class="constant">all</code></span></dt>
|
||||
<dd><p>Prints the current values of the frequently used
|
||||
options to <span><strong class="command">set</strong></span>. Information about the current default
|
||||
server and host is also printed.
|
||||
</p></dd>
|
||||
<dd><p>
|
||||
Prints the current values of the frequently used
|
||||
options to <span><strong class="command">set</strong></span>.
|
||||
Information about the current default
|
||||
server and host is also printed.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">class=</code><em class="replaceable"><code>value</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Change the query class to one of:
|
||||
</p>
|
||||
Change the query class to one of:
|
||||
</p>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term"><code class="constant">IN</code></span></dt>
|
||||
<dd><p>the Internet class</p></dd>
|
||||
<dd><p>
|
||||
the Internet class
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">CH</code></span></dt>
|
||||
<dd><p>the Chaos class</p></dd>
|
||||
<dd><p>
|
||||
the Chaos class
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">HS</code></span></dt>
|
||||
<dd><p>the Hesiod class</p></dd>
|
||||
<dd><p>
|
||||
the Hesiod class
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">ANY</code></span></dt>
|
||||
<dd><p>wildcard</p></dd>
|
||||
<dd><p>
|
||||
wildcard
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
<p>
|
||||
The class specifies the protocol group of the information.
|
||||
</p>
|
||||
The class specifies the protocol group of the information.
|
||||
|
||||
</p>
|
||||
<p>
|
||||
(Default = IN; abbreviation = cl)
|
||||
</p>
|
||||
(Default = IN; abbreviation = cl)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>debug</code></span></dt>
|
||||
<dt><span class="term"><code class="constant">
|
||||
<em class="replaceable"><code>[<span class="optional">no</span>]</code></em>debug</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Turn debugging mode on. A lot more information is
|
||||
printed about the packet sent to the server and the
|
||||
resulting answer.
|
||||
</p>
|
||||
Turn debugging mode on. A lot more information is
|
||||
printed about the packet sent to the server and the
|
||||
resulting answer.
|
||||
</p>
|
||||
<p>
|
||||
(Default = nodebug; abbreviation = [<span class="optional">no</span>]deb)
|
||||
</p>
|
||||
(Default = nodebug; abbreviation = [<span class="optional">no</span>]deb)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>d2</code></span></dt>
|
||||
<dt><span class="term"><code class="constant">
|
||||
<em class="replaceable"><code>[<span class="optional">no</span>]</code></em>d2</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Turn debugging mode on. A lot more information is
|
||||
printed about the packet sent to the server and the
|
||||
resulting answer.
|
||||
</p>
|
||||
Turn debugging mode on. A lot more information is
|
||||
printed about the packet sent to the server and the
|
||||
resulting answer.
|
||||
</p>
|
||||
<p>
|
||||
(Default = nod2)
|
||||
</p>
|
||||
(Default = nod2)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant">domain=</code><em class="replaceable"><code>name</code></em></span></dt>
|
||||
<dd><p>
|
||||
Sets the search list to <em class="replaceable"><code>name</code></em>.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>search</code></span></dt>
|
||||
Sets the search list to <em class="replaceable"><code>name</code></em>.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">
|
||||
<em class="replaceable"><code>[<span class="optional">no</span>]</code></em>search</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
If the lookup request contains at least one period but
|
||||
doesn't end with a trailing period, append the domain
|
||||
names in the domain search list to the request until an
|
||||
answer is received.
|
||||
</p>
|
||||
If the lookup request contains at least one period but
|
||||
doesn't end with a trailing period, append the domain
|
||||
names in the domain search list to the request until an
|
||||
answer is received.
|
||||
</p>
|
||||
<p>
|
||||
(Default = search)
|
||||
</p>
|
||||
(Default = search)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant">port=</code><em class="replaceable"><code>value</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Change the default TCP/UDP name server port to <em class="replaceable"><code>value</code></em>.
|
||||
</p>
|
||||
Change the default TCP/UDP name server port to <em class="replaceable"><code>value</code></em>.
|
||||
</p>
|
||||
<p>
|
||||
(Default = 53; abbreviation = po)
|
||||
</p>
|
||||
(Default = 53; abbreviation = po)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant">querytype=</code><em class="replaceable"><code>value</code></em></span></dt>
|
||||
<dd><p></p></dd>
|
||||
<dt><span class="term"><code class="constant">type=</code><em class="replaceable"><code>value</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Change the type of the information query.
|
||||
</p>
|
||||
Change the type of the information query.
|
||||
</p>
|
||||
<p>
|
||||
(Default = A; abbreviations = q, ty)
|
||||
</p>
|
||||
(Default = A; abbreviations = q, ty)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>recurse</code></span></dt>
|
||||
<dt><span class="term"><code class="constant">
|
||||
<em class="replaceable"><code>[<span class="optional">no</span>]</code></em>recurse</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Tell the name server to query other servers if it does not have the
|
||||
information.
|
||||
</p>
|
||||
Tell the name server to query other servers if it does not
|
||||
have the
|
||||
information.
|
||||
</p>
|
||||
<p>
|
||||
(Default = recurse; abbreviation = [no]rec)
|
||||
</p>
|
||||
(Default = recurse; abbreviation = [no]rec)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant">retry=</code><em class="replaceable"><code>number</code></em></span></dt>
|
||||
<dd><p>
|
||||
Set the number of retries to number.
|
||||
</p></dd>
|
||||
Set the number of retries to number.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">timeout=</code><em class="replaceable"><code>number</code></em></span></dt>
|
||||
<dd><p>
|
||||
Change the initial timeout interval for waiting for a
|
||||
reply to number seconds.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>vc</code></span></dt>
|
||||
Change the initial timeout interval for waiting for a
|
||||
reply to number seconds.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="constant">
|
||||
<em class="replaceable"><code>[<span class="optional">no</span>]</code></em>vc</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Always use a virtual circuit when sending requests to the server.
|
||||
</p>
|
||||
Always use a virtual circuit when sending requests to the
|
||||
server.
|
||||
</p>
|
||||
<p>
|
||||
(Default = novc)
|
||||
</p>
|
||||
(Default = novc)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="constant">
|
||||
<em class="replaceable"><code>[<span class="optional">no</span>]</code></em>fail</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Try the next nameserver if a nameserver responds with
|
||||
SERVFAIL or a referral (nofail) or terminate query
|
||||
(fail) on such a response.
|
||||
</p>
|
||||
<p>
|
||||
(Default = nofail)
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
<p>
|
||||
</p>
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549990"></a><h2>FILES</h2>
|
||||
<p>
|
||||
<code class="filename">/etc/resolv.conf</code>
|
||||
</p>
|
||||
<a name="id2546279"></a><h2>FILES</h2>
|
||||
<p><code class="filename">/etc/resolv.conf</code>
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550003"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>.
|
||||
</p>
|
||||
<a name="id2546291"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550038"></a><h2>Author</h2>
|
||||
<a name="id2546325"></a><h2>Author</h2>
|
||||
<p>
|
||||
Andrew Cherenson
|
||||
</p>
|
||||
Andrew Cherenson
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
</html>
|
||||
|
@ -13,7 +13,7 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: Makefile.in,v 1.19.12.12 2005/05/02 00:25:54 marka Exp $
|
||||
# $Id: Makefile.in,v 1.26.18.4 2005/05/02 00:26:11 marka Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
@ -13,13 +13,13 @@
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" $Id: dnssec-keygen.8,v 1.19.12.10 2006/06/29 13:02:30 marka Exp $
|
||||
.\" $Id: dnssec-keygen.8,v 1.23.18.13 2007/01/30 00:23:44 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: dnssec\-keygen
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: June 30, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
@ -39,8 +39,9 @@ dnssec\-keygen \- DNSSEC key generation tool
|
||||
\fBdnssec\-keygen\fR
|
||||
generates keys for DNSSEC (Secure DNS), as defined in RFC 2535 and RFC <TBA\\>. It can also generate keys for use with TSIG (Transaction Signatures), as defined in RFC 2845.
|
||||
.SH "OPTIONS"
|
||||
.TP 3n
|
||||
.PP
|
||||
\-a \fIalgorithm\fR
|
||||
.RS 4
|
||||
Selects the cryptographic algorithm. The value of
|
||||
\fBalgorithm\fR
|
||||
must be one of RSAMD5 (RSA) or RSASHA1, DSA, DH (Diffie Hellman), or HMAC\-MD5. These values are case insensitive.
|
||||
@ -48,38 +49,58 @@ must be one of RSAMD5 (RSA) or RSASHA1, DSA, DH (Diffie Hellman), or HMAC\-MD5.
|
||||
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement algorithm, and DSA is recommended. For TSIG, HMAC\-MD5 is mandatory.
|
||||
.sp
|
||||
Note 2: HMAC\-MD5 and DH automatically set the \-k flag.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-b \fIkeysize\fR
|
||||
.RS 4
|
||||
Specifies the number of bits in the key. The choice of key size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be between 512 and 2048 bits. Diffie Hellman keys must be between 128 and 4096 bits. DSA keys must be between 512 and 1024 bits and an exact multiple of 64. HMAC\-MD5 keys must be between 1 and 512 bits.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-n \fInametype\fR
|
||||
.RS 4
|
||||
Specifies the owner type of the key. The value of
|
||||
\fBnametype\fR
|
||||
must either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)), USER (for a key associated with a user(KEY)) or OTHER (DNSKEY). These values are case insensitive.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-c \fIclass\fR
|
||||
.RS 4
|
||||
Indicates that the DNS record containing the key should have the specified class. If not specified, class IN is used.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-e
|
||||
.RS 4
|
||||
If generating an RSAMD5/RSASHA1 key, use a large exponent.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-f \fIflag\fR
|
||||
.RS 4
|
||||
Set the specified flag in the flag field of the KEY/DNSKEY record. The only recognized flag is KSK (Key Signing Key) DNSKEY.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-g \fIgenerator\fR
|
||||
.RS 4
|
||||
If generating a Diffie Hellman key, use this generator. Allowed values are 2 and 5. If no generator is specified, a known prime from RFC 2539 will be used if possible; otherwise the default is 2.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-h
|
||||
.RS 4
|
||||
Prints a short summary of the options and arguments to
|
||||
\fBdnssec\-keygen\fR.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-k
|
||||
.RS 4
|
||||
Generate KEY records rather than DNSKEY records.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-p \fIprotocol\fR
|
||||
.RS 4
|
||||
Sets the protocol value for the generated key. The protocol is a number between 0 and 255. The default is 3 (DNSSEC). Other possible values for this argument are listed in RFC 2535 and its successors.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-r \fIrandomdev\fR
|
||||
.RS 4
|
||||
Specifies the source of randomness. If the operating system does not provide a
|
||||
\fI/dev/random\fR
|
||||
or equivalent device, the default source of randomness is keyboard input.
|
||||
@ -87,17 +108,24 @@ or equivalent device, the default source of randomness is keyboard input.
|
||||
specifies the name of a character device or file containing random data to be used instead of the default. The special value
|
||||
\fIkeyboard\fR
|
||||
indicates that keyboard input should be used.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-s \fIstrength\fR
|
||||
.RS 4
|
||||
Specifies the strength value of the key. The strength is a number between 0 and 15, and currently has no defined purpose in DNSSEC.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-t \fItype\fR
|
||||
.RS 4
|
||||
Indicates the use of the key.
|
||||
\fBtype\fR
|
||||
must be one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH refers to the ability to authenticate data, and CONF the ability to encrypt data.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-v \fIlevel\fR
|
||||
.RS 4
|
||||
Sets the debugging level.
|
||||
.RE
|
||||
.SH "GENERATED KEYS"
|
||||
.PP
|
||||
When
|
||||
@ -105,20 +133,18 @@ When
|
||||
completes successfully, it prints a string of the form
|
||||
\fIKnnnn.+aaa+iiiii\fR
|
||||
to the standard output. This is an identification string for the key it has generated.
|
||||
.TP 3n
|
||||
.TP 4
|
||||
\(bu
|
||||
\fInnnn\fR
|
||||
is the key name.
|
||||
.TP 3n
|
||||
.TP 4
|
||||
\(bu
|
||||
\fIaaa\fR
|
||||
is the numeric representation of the algorithm.
|
||||
.TP 3n
|
||||
.TP 4
|
||||
\(bu
|
||||
\fIiiiii\fR
|
||||
is the key identifier (or footprint).
|
||||
.sp
|
||||
.RE
|
||||
.PP
|
||||
\fBdnssec\-keygen\fR
|
||||
creates two file, with names based on the printed string.
|
||||
@ -168,4 +194,7 @@ RFC 2539.
|
||||
.PP
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
Copyright \(co 2000\-2003 Internet Software Consortium.
|
||||
.br
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Portions Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
* Portions Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -16,7 +16,9 @@
|
||||
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-keygen.c,v 1.48.2.1.10.11 2004/06/11 01:17:34 marka Exp $ */
|
||||
/* $Id: dnssec-keygen.c,v 1.66.18.9 2007/01/18 00:06:11 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -47,7 +49,9 @@
|
||||
const char *program = "dnssec-keygen";
|
||||
int verbose;
|
||||
|
||||
static const char *algs = "RSA | RSAMD5 | DH | DSA | RSASHA1 | HMAC-MD5";
|
||||
static const char *algs = "RSA | RSAMD5 | DH | DSA | RSASHA1 | HMAC-MD5 |"
|
||||
" HMAC-SHA1 | HMAC-SHA224 | HMAC-SHA256 | "
|
||||
" HMAC-SHA384 | HMAC-SHA512";
|
||||
|
||||
static isc_boolean_t
|
||||
dsa_size_ok(int size) {
|
||||
@ -68,10 +72,16 @@ usage(void) {
|
||||
fprintf(stderr, " DH:\t\t[128..4096]\n");
|
||||
fprintf(stderr, " DSA:\t\t[512..1024] and divisible by 64\n");
|
||||
fprintf(stderr, " HMAC-MD5:\t[1..512]\n");
|
||||
fprintf(stderr, " HMAC-SHA1:\t[1..160]\n");
|
||||
fprintf(stderr, " HMAC-SHA224:\t[1..224]\n");
|
||||
fprintf(stderr, " HMAC-SHA256:\t[1..256]\n");
|
||||
fprintf(stderr, " HMAC-SHA384:\t[1..384]\n");
|
||||
fprintf(stderr, " HMAC-SHA512:\t[1..512]\n");
|
||||
fprintf(stderr, " -n nametype: ZONE | HOST | ENTITY | USER | OTHER\n");
|
||||
fprintf(stderr, " name: owner of the key\n");
|
||||
fprintf(stderr, "Other options:\n");
|
||||
fprintf(stderr, " -c <class> (default: IN)\n");
|
||||
fprintf(stderr, " -d <digest bits> (0 => max, default)\n");
|
||||
fprintf(stderr, " -e use large exponent (RSAMD5/RSASHA1 only)\n");
|
||||
fprintf(stderr, " -f keyflag: KSK\n");
|
||||
fprintf(stderr, " -g <generator> use specified generator "
|
||||
@ -115,6 +125,7 @@ main(int argc, char **argv) {
|
||||
isc_entropy_t *ectx = NULL;
|
||||
dns_rdataclass_t rdclass;
|
||||
int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
|
||||
int dbits = 0;
|
||||
|
||||
if (argc == 1)
|
||||
usage();
|
||||
@ -124,7 +135,7 @@ main(int argc, char **argv) {
|
||||
dns_result_register();
|
||||
|
||||
while ((ch = isc_commandline_parse(argc, argv,
|
||||
"a:b:c:ef:g:kn:t:p:s:r:v:h")) != -1)
|
||||
"a:b:c:d:ef:g:kn:t:p:s:r:v:h")) != -1)
|
||||
{
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
@ -138,6 +149,11 @@ main(int argc, char **argv) {
|
||||
case 'c':
|
||||
classname = isc_commandline_argument;
|
||||
break;
|
||||
case 'd':
|
||||
dbits = strtol(isc_commandline_argument, &endp, 10);
|
||||
if (*endp != '\0' || dbits < 0)
|
||||
fatal("-d requires a non-negative number");
|
||||
break;
|
||||
case 'e':
|
||||
rsa_exp = 1;
|
||||
break;
|
||||
@ -211,9 +227,29 @@ main(int argc, char **argv) {
|
||||
|
||||
if (algname == NULL)
|
||||
fatal("no algorithm was specified");
|
||||
if (strcasecmp(algname, "HMAC-MD5") == 0) {
|
||||
if (strcasecmp(algname, "RSA") == 0) {
|
||||
fprintf(stderr, "The use of RSA (RSAMD5) is not recommended.\n"
|
||||
"If you still wish to use RSA (RSAMD5) please "
|
||||
"specify \"-a RSAMD5\"\n");
|
||||
return (1);
|
||||
} else if (strcasecmp(algname, "HMAC-MD5") == 0) {
|
||||
options |= DST_TYPE_KEY;
|
||||
alg = DST_ALG_HMACMD5;
|
||||
} else if (strcasecmp(algname, "HMAC-SHA1") == 0) {
|
||||
options |= DST_TYPE_KEY;
|
||||
alg = DST_ALG_HMACSHA1;
|
||||
} else if (strcasecmp(algname, "HMAC-SHA224") == 0) {
|
||||
options |= DST_TYPE_KEY;
|
||||
alg = DST_ALG_HMACSHA224;
|
||||
} else if (strcasecmp(algname, "HMAC-SHA256") == 0) {
|
||||
options |= DST_TYPE_KEY;
|
||||
alg = DST_ALG_HMACSHA256;
|
||||
} else if (strcasecmp(algname, "HMAC-SHA384") == 0) {
|
||||
options |= DST_TYPE_KEY;
|
||||
alg = DST_ALG_HMACSHA384;
|
||||
} else if (strcasecmp(algname, "HMAC-SHA512") == 0) {
|
||||
options |= DST_TYPE_KEY;
|
||||
alg = DST_ALG_HMACSHA512;
|
||||
} else {
|
||||
r.base = algname;
|
||||
r.length = strlen(algname);
|
||||
@ -260,6 +296,56 @@ main(int argc, char **argv) {
|
||||
case DST_ALG_HMACMD5:
|
||||
if (size < 1 || size > 512)
|
||||
fatal("HMAC-MD5 key size %d out of range", size);
|
||||
if (dbits != 0 && (dbits < 80 || dbits > 128))
|
||||
fatal("HMAC-MD5 digest bits %d out of range", dbits);
|
||||
if ((dbits % 8) != 0)
|
||||
fatal("HMAC-MD5 digest bits %d not divisible by 8",
|
||||
dbits);
|
||||
break;
|
||||
case DST_ALG_HMACSHA1:
|
||||
if (size < 1 || size > 160)
|
||||
fatal("HMAC-SHA1 key size %d out of range", size);
|
||||
if (dbits != 0 && (dbits < 80 || dbits > 160))
|
||||
fatal("HMAC-SHA1 digest bits %d out of range", dbits);
|
||||
if ((dbits % 8) != 0)
|
||||
fatal("HMAC-SHA1 digest bits %d not divisible by 8",
|
||||
dbits);
|
||||
break;
|
||||
case DST_ALG_HMACSHA224:
|
||||
if (size < 1 || size > 224)
|
||||
fatal("HMAC-SHA224 key size %d out of range", size);
|
||||
if (dbits != 0 && (dbits < 112 || dbits > 224))
|
||||
fatal("HMAC-SHA224 digest bits %d out of range", dbits);
|
||||
if ((dbits % 8) != 0)
|
||||
fatal("HMAC-SHA224 digest bits %d not divisible by 8",
|
||||
dbits);
|
||||
break;
|
||||
case DST_ALG_HMACSHA256:
|
||||
if (size < 1 || size > 256)
|
||||
fatal("HMAC-SHA256 key size %d out of range", size);
|
||||
if (dbits != 0 && (dbits < 128 || dbits > 256))
|
||||
fatal("HMAC-SHA256 digest bits %d out of range", dbits);
|
||||
if ((dbits % 8) != 0)
|
||||
fatal("HMAC-SHA256 digest bits %d not divisible by 8",
|
||||
dbits);
|
||||
break;
|
||||
case DST_ALG_HMACSHA384:
|
||||
if (size < 1 || size > 384)
|
||||
fatal("HMAC-384 key size %d out of range", size);
|
||||
if (dbits != 0 && (dbits < 192 || dbits > 384))
|
||||
fatal("HMAC-SHA384 digest bits %d out of range", dbits);
|
||||
if ((dbits % 8) != 0)
|
||||
fatal("HMAC-SHA384 digest bits %d not divisible by 8",
|
||||
dbits);
|
||||
break;
|
||||
case DST_ALG_HMACSHA512:
|
||||
if (size < 1 || size > 512)
|
||||
fatal("HMAC-SHA512 key size %d out of range", size);
|
||||
if (dbits != 0 && (dbits < 256 || dbits > 512))
|
||||
fatal("HMAC-SHA512 digest bits %d out of range", dbits);
|
||||
if ((dbits % 8) != 0)
|
||||
fatal("HMAC-SHA512 digest bits %d not divisible by 8",
|
||||
dbits);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -306,7 +392,10 @@ main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
if ((flags & DNS_KEYFLAG_OWNERMASK) == DNS_KEYOWNER_ZONE &&
|
||||
(alg == DNS_KEYALG_DH || alg == DST_ALG_HMACMD5))
|
||||
(alg == DNS_KEYALG_DH || alg == DST_ALG_HMACMD5 ||
|
||||
alg == DST_ALG_HMACSHA1 || alg == DST_ALG_HMACSHA224 ||
|
||||
alg == DST_ALG_HMACSHA256 || alg == DST_ALG_HMACSHA384 ||
|
||||
alg == DST_ALG_HMACSHA512))
|
||||
fatal("a key with algorithm '%s' cannot be a zone key",
|
||||
algname);
|
||||
|
||||
@ -330,6 +419,11 @@ main(int argc, char **argv) {
|
||||
break;
|
||||
case DNS_KEYALG_DSA:
|
||||
case DST_ALG_HMACMD5:
|
||||
case DST_ALG_HMACSHA1:
|
||||
case DST_ALG_HMACSHA224:
|
||||
case DST_ALG_HMACSHA256:
|
||||
case DST_ALG_HMACSHA384:
|
||||
case DST_ALG_HMACSHA512:
|
||||
param = 0;
|
||||
break;
|
||||
}
|
||||
@ -358,6 +452,8 @@ main(int argc, char **argv) {
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
dst_key_setbits(key, dbits);
|
||||
|
||||
/*
|
||||
* Try to read a key with the same name, alg and id from disk.
|
||||
* If there is one we must continue generating a new one
|
||||
@ -407,6 +503,7 @@ main(int argc, char **argv) {
|
||||
cleanup_logging(&log);
|
||||
cleanup_entropy(&ectx);
|
||||
dst_lib_destroy();
|
||||
dns_name_destroy();
|
||||
if (verbose > 10)
|
||||
isc_mem_stats(mctx, stdout);
|
||||
isc_mem_destroy(&mctx);
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@ -18,9 +18,8 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: dnssec-keygen.docbook,v 1.3.12.9 2005/08/30 01:41:41 marka Exp $ -->
|
||||
|
||||
<refentry>
|
||||
<!-- $Id: dnssec-keygen.docbook,v 1.7.18.9 2007/01/29 23:57:20 marka Exp $ -->
|
||||
<refentry id="man.dnssec-keygen">
|
||||
<refentryinfo>
|
||||
<date>June 30, 2000</date>
|
||||
</refentryinfo>
|
||||
@ -31,10 +30,16 @@
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>dnssec-keygen</application></refname>
|
||||
<refpurpose>DNSSEC key generation tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<year>2007</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
@ -46,11 +51,6 @@
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>dnssec-keygen</application></refname>
|
||||
<refpurpose>DNSSEC key generation tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>dnssec-keygen</command>
|
||||
@ -74,11 +74,10 @@
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<command>dnssec-keygen</command> generates keys for DNSSEC
|
||||
(Secure DNS), as defined in RFC 2535 and RFC <TBA\>. It can also generate
|
||||
keys for use with TSIG (Transaction Signatures), as
|
||||
defined in RFC 2845.
|
||||
<para><command>dnssec-keygen</command>
|
||||
generates keys for DNSSEC (Secure DNS), as defined in RFC 2535
|
||||
and RFC <TBA\>. It can also generate keys for use with
|
||||
TSIG (Transaction Signatures), as defined in RFC 2845.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
@ -88,168 +87,173 @@
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-a <replaceable class="parameter">algorithm</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Selects the cryptographic algorithm. The value of
|
||||
<option>algorithm</option> must be one of RSAMD5 (RSA) or RSASHA1,
|
||||
DSA, DH (Diffie Hellman), or HMAC-MD5. These values
|
||||
are case insensitive.
|
||||
</para>
|
||||
<para>
|
||||
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement algorithm,
|
||||
and DSA is recommended. For TSIG, HMAC-MD5 is mandatory.
|
||||
</para>
|
||||
<para>
|
||||
Note 2: HMAC-MD5 and DH automatically set the -k flag.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Selects the cryptographic algorithm. The value of
|
||||
<option>algorithm</option> must be one of RSAMD5 (RSA) or RSASHA1,
|
||||
DSA, DH (Diffie Hellman), or HMAC-MD5. These values
|
||||
are case insensitive.
|
||||
</para>
|
||||
<para>
|
||||
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
|
||||
algorithm,
|
||||
and DSA is recommended. For TSIG, HMAC-MD5 is mandatory.
|
||||
</para>
|
||||
<para>
|
||||
Note 2: HMAC-MD5 and DH automatically set the -k flag.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-b <replaceable class="parameter">keysize</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of bits in the key. The choice of key
|
||||
size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be between
|
||||
512 and 2048 bits. Diffie Hellman keys must be between
|
||||
128 and 4096 bits. DSA keys must be between 512 and 1024
|
||||
bits and an exact multiple of 64. HMAC-MD5 keys must be
|
||||
between 1 and 512 bits.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of bits in the key. The choice of key
|
||||
size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be
|
||||
between
|
||||
512 and 2048 bits. Diffie Hellman keys must be between
|
||||
128 and 4096 bits. DSA keys must be between 512 and 1024
|
||||
bits and an exact multiple of 64. HMAC-MD5 keys must be
|
||||
between 1 and 512 bits.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-n <replaceable class="parameter">nametype</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the owner type of the key. The value of
|
||||
<option>nametype</option> must either be ZONE (for a DNSSEC
|
||||
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)),
|
||||
USER (for a key associated with a user(KEY)) or OTHER (DNSKEY). These values are
|
||||
case insensitive.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the owner type of the key. The value of
|
||||
<option>nametype</option> must either be ZONE (for a DNSSEC
|
||||
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with
|
||||
a host (KEY)),
|
||||
USER (for a key associated with a user(KEY)) or OTHER (DNSKEY).
|
||||
These values are
|
||||
case insensitive.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-c <replaceable class="parameter">class</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Indicates that the DNS record containing the key should have
|
||||
the specified class. If not specified, class IN is used.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Indicates that the DNS record containing the key should have
|
||||
the specified class. If not specified, class IN is used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-e</term>
|
||||
<listitem>
|
||||
<para>
|
||||
If generating an RSAMD5/RSASHA1 key, use a large exponent.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
If generating an RSAMD5/RSASHA1 key, use a large exponent.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-f <replaceable class="parameter">flag</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Set the specified flag in the flag field of the KEY/DNSKEY record.
|
||||
The only recognized flag is KSK (Key Signing Key) DNSKEY.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Set the specified flag in the flag field of the KEY/DNSKEY record.
|
||||
The only recognized flag is KSK (Key Signing Key) DNSKEY.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-g <replaceable class="parameter">generator</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If generating a Diffie Hellman key, use this generator.
|
||||
Allowed values are 2 and 5. If no generator
|
||||
is specified, a known prime from RFC 2539 will be used
|
||||
if possible; otherwise the default is 2.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
If generating a Diffie Hellman key, use this generator.
|
||||
Allowed values are 2 and 5. If no generator
|
||||
is specified, a known prime from RFC 2539 will be used
|
||||
if possible; otherwise the default is 2.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints a short summary of the options and arguments to
|
||||
<command>dnssec-keygen</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints a short summary of the options and arguments to
|
||||
<command>dnssec-keygen</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-k</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Generate KEY records rather than DNSKEY records.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Generate KEY records rather than DNSKEY records.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-p <replaceable class="parameter">protocol</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the protocol value for the generated key. The protocol
|
||||
is a number between 0 and 255. The default is 3 (DNSSEC).
|
||||
Other possible values for this argument are listed in
|
||||
RFC 2535 and its successors.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the protocol value for the generated key. The protocol
|
||||
is a number between 0 and 255. The default is 3 (DNSSEC).
|
||||
Other possible values for this argument are listed in
|
||||
RFC 2535 and its successors.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-r <replaceable class="parameter">randomdev</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a <filename>/dev/random</filename>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <filename>randomdev</filename> specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<filename>keyboard</filename> indicates that keyboard
|
||||
input should be used.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a <filename>/dev/random</filename>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <filename>randomdev</filename>
|
||||
specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<filename>keyboard</filename> indicates that keyboard
|
||||
input should be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-s <replaceable class="parameter">strength</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the strength value of the key. The strength is
|
||||
a number between 0 and 15, and currently has no defined
|
||||
purpose in DNSSEC.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the strength value of the key. The strength is
|
||||
a number between 0 and 15, and currently has no defined
|
||||
purpose in DNSSEC.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-t <replaceable class="parameter">type</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Indicates the use of the key. <option>type</option> must be
|
||||
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
|
||||
is AUTHCONF. AUTH refers to the ability to authenticate
|
||||
data, and CONF the ability to encrypt data.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Indicates the use of the key. <option>type</option> must be
|
||||
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
|
||||
is AUTHCONF. AUTH refers to the ability to authenticate
|
||||
data, and CONF the ability to encrypt data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v <replaceable class="parameter">level</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the debugging level.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the debugging level.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
@ -258,82 +262,82 @@
|
||||
<refsect1>
|
||||
<title>GENERATED KEYS</title>
|
||||
<para>
|
||||
When <command>dnssec-keygen</command> completes successfully,
|
||||
it prints a string of the form <filename>Knnnn.+aaa+iiiii</filename>
|
||||
to the standard output. This is an identification string for
|
||||
the key it has generated.
|
||||
When <command>dnssec-keygen</command> completes
|
||||
successfully,
|
||||
it prints a string of the form <filename>Knnnn.+aaa+iiiii</filename>
|
||||
to the standard output. This is an identification string for
|
||||
the key it has generated.
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<filename>nnnn</filename> is the key name.
|
||||
<para><filename>nnnn</filename> is the key name.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<filename>aaa</filename> is the numeric representation of the
|
||||
<para><filename>aaa</filename> is the numeric representation
|
||||
of the
|
||||
algorithm.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<filename>iiiii</filename> is the key identifier (or footprint).
|
||||
<para><filename>iiiii</filename> is the key identifier (or
|
||||
footprint).
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
<command>dnssec-keygen</command> creates two file, with names based
|
||||
on the printed string. <filename>Knnnn.+aaa+iiiii.key</filename>
|
||||
contains the public key, and
|
||||
<filename>Knnnn.+aaa+iiiii.private</filename> contains the private
|
||||
key.
|
||||
<para><command>dnssec-keygen</command>
|
||||
creates two file, with names based
|
||||
on the printed string. <filename>Knnnn.+aaa+iiiii.key</filename>
|
||||
contains the public key, and
|
||||
<filename>Knnnn.+aaa+iiiii.private</filename> contains the
|
||||
private
|
||||
key.
|
||||
</para>
|
||||
<para>
|
||||
The <filename>.key</filename> file contains a DNS KEY record that
|
||||
can be inserted into a zone file (directly or with a $INCLUDE
|
||||
statement).
|
||||
The <filename>.key</filename> file contains a DNS KEY record
|
||||
that
|
||||
can be inserted into a zone file (directly or with a $INCLUDE
|
||||
statement).
|
||||
</para>
|
||||
<para>
|
||||
The <filename>.private</filename> file contains algorithm specific
|
||||
fields. For obvious security reasons, this file does not have
|
||||
general read permission.
|
||||
The <filename>.private</filename> file contains algorithm
|
||||
specific
|
||||
fields. For obvious security reasons, this file does not have
|
||||
general read permission.
|
||||
</para>
|
||||
<para>
|
||||
Both <filename>.key</filename> and <filename>.private</filename>
|
||||
files are generated for symmetric encryption algorithm such as
|
||||
HMAC-MD5, even though the public and private key are equivalent.
|
||||
Both <filename>.key</filename> and <filename>.private</filename>
|
||||
files are generated for symmetric encryption algorithm such as
|
||||
HMAC-MD5, even though the public and private key are equivalent.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>EXAMPLE</title>
|
||||
<para>
|
||||
To generate a 768-bit DSA key for the domain
|
||||
<userinput>example.com</userinput>, the following command would be
|
||||
issued:
|
||||
To generate a 768-bit DSA key for the domain
|
||||
<userinput>example.com</userinput>, the following command would be
|
||||
issued:
|
||||
</para>
|
||||
<para><userinput>dnssec-keygen -a DSA -b 768 -n ZONE example.com</userinput>
|
||||
</para>
|
||||
<para>
|
||||
<userinput>dnssec-keygen -a DSA -b 768 -n ZONE example.com</userinput>
|
||||
The command would print a string of the form:
|
||||
</para>
|
||||
<para><userinput>Kexample.com.+003+26160</userinput>
|
||||
</para>
|
||||
<para>
|
||||
The command would print a string of the form:
|
||||
</para>
|
||||
<para>
|
||||
<userinput>Kexample.com.+003+26160</userinput>
|
||||
</para>
|
||||
<para>
|
||||
In this example, <command>dnssec-keygen</command> creates
|
||||
the files <filename>Kexample.com.+003+26160.key</filename> and
|
||||
<filename>Kexample.com.+003+26160.private</filename>
|
||||
In this example, <command>dnssec-keygen</command> creates
|
||||
the files <filename>Kexample.com.+003+26160.key</filename>
|
||||
and
|
||||
<filename>Kexample.com.+003+26160.private</filename>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>dnssec-signzone</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<para><citerefentry>
|
||||
<refentrytitle>dnssec-signzone</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>,
|
||||
<citetitle>RFC 2535</citetitle>,
|
||||
@ -344,14 +348,11 @@
|
||||
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
<para>
|
||||
<corpauthor>Internet Systems Consortium</corpauthor>
|
||||
<para><corpauthor>Internet Systems Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!--
|
||||
</refentry><!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@ -14,15 +14,15 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: dnssec-keygen.html,v 1.5.2.1.4.15 2006/06/29 13:02:30 marka Exp $ -->
|
||||
<!-- $Id: dnssec-keygen.html,v 1.9.18.19 2007/01/30 00:23:44 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>dnssec-keygen</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482688"></a><div class="titlepage"></div>
|
||||
<a name="man.dnssec-keygen"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p><span class="application">dnssec-keygen</span> — DNSSEC key generation tool</p>
|
||||
@ -32,186 +32,191 @@
|
||||
<div class="cmdsynopsis"><p><code class="command">dnssec-keygen</code> {-a <em class="replaceable"><code>algorithm</code></em>} {-b <em class="replaceable"><code>keysize</code></em>} {-n <em class="replaceable"><code>nametype</code></em>} [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-e</code>] [<code class="option">-f <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-g <em class="replaceable"><code>generator</code></em></code>] [<code class="option">-h</code>] [<code class="option">-k</code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-s <em class="replaceable"><code>strength</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] {name}</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549521"></a><h2>DESCRIPTION</h2>
|
||||
<p>
|
||||
<span><strong class="command">dnssec-keygen</strong></span> generates keys for DNSSEC
|
||||
(Secure DNS), as defined in RFC 2535 and RFC <TBA\>. It can also generate
|
||||
keys for use with TSIG (Transaction Signatures), as
|
||||
defined in RFC 2845.
|
||||
<a name="id2543474"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">dnssec-keygen</strong></span>
|
||||
generates keys for DNSSEC (Secure DNS), as defined in RFC 2535
|
||||
and RFC <TBA\>. It can also generate keys for use with
|
||||
TSIG (Transaction Signatures), as defined in RFC 2845.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549533"></a><h2>OPTIONS</h2>
|
||||
<a name="id2543485"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Selects the cryptographic algorithm. The value of
|
||||
<code class="option">algorithm</code> must be one of RSAMD5 (RSA) or RSASHA1,
|
||||
DSA, DH (Diffie Hellman), or HMAC-MD5. These values
|
||||
are case insensitive.
|
||||
</p>
|
||||
Selects the cryptographic algorithm. The value of
|
||||
<code class="option">algorithm</code> must be one of RSAMD5 (RSA) or RSASHA1,
|
||||
DSA, DH (Diffie Hellman), or HMAC-MD5. These values
|
||||
are case insensitive.
|
||||
</p>
|
||||
<p>
|
||||
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement algorithm,
|
||||
and DSA is recommended. For TSIG, HMAC-MD5 is mandatory.
|
||||
</p>
|
||||
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement
|
||||
algorithm,
|
||||
and DSA is recommended. For TSIG, HMAC-MD5 is mandatory.
|
||||
</p>
|
||||
<p>
|
||||
Note 2: HMAC-MD5 and DH automatically set the -k flag.
|
||||
</p>
|
||||
Note 2: HMAC-MD5 and DH automatically set the -k flag.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-b <em class="replaceable"><code>keysize</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the number of bits in the key. The choice of key
|
||||
size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be between
|
||||
512 and 2048 bits. Diffie Hellman keys must be between
|
||||
128 and 4096 bits. DSA keys must be between 512 and 1024
|
||||
bits and an exact multiple of 64. HMAC-MD5 keys must be
|
||||
between 1 and 512 bits.
|
||||
</p></dd>
|
||||
Specifies the number of bits in the key. The choice of key
|
||||
size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be
|
||||
between
|
||||
512 and 2048 bits. Diffie Hellman keys must be between
|
||||
128 and 4096 bits. DSA keys must be between 512 and 1024
|
||||
bits and an exact multiple of 64. HMAC-MD5 keys must be
|
||||
between 1 and 512 bits.
|
||||
</p></dd>
|
||||
<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the owner type of the key. The value of
|
||||
<code class="option">nametype</code> must either be ZONE (for a DNSSEC
|
||||
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)),
|
||||
USER (for a key associated with a user(KEY)) or OTHER (DNSKEY). These values are
|
||||
case insensitive.
|
||||
</p></dd>
|
||||
Specifies the owner type of the key. The value of
|
||||
<code class="option">nametype</code> must either be ZONE (for a DNSSEC
|
||||
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with
|
||||
a host (KEY)),
|
||||
USER (for a key associated with a user(KEY)) or OTHER (DNSKEY).
|
||||
These values are
|
||||
case insensitive.
|
||||
</p></dd>
|
||||
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
|
||||
<dd><p>
|
||||
Indicates that the DNS record containing the key should have
|
||||
the specified class. If not specified, class IN is used.
|
||||
</p></dd>
|
||||
Indicates that the DNS record containing the key should have
|
||||
the specified class. If not specified, class IN is used.
|
||||
</p></dd>
|
||||
<dt><span class="term">-e</span></dt>
|
||||
<dd><p>
|
||||
If generating an RSAMD5/RSASHA1 key, use a large exponent.
|
||||
</p></dd>
|
||||
If generating an RSAMD5/RSASHA1 key, use a large exponent.
|
||||
</p></dd>
|
||||
<dt><span class="term">-f <em class="replaceable"><code>flag</code></em></span></dt>
|
||||
<dd><p>
|
||||
Set the specified flag in the flag field of the KEY/DNSKEY record.
|
||||
The only recognized flag is KSK (Key Signing Key) DNSKEY.
|
||||
</p></dd>
|
||||
Set the specified flag in the flag field of the KEY/DNSKEY record.
|
||||
The only recognized flag is KSK (Key Signing Key) DNSKEY.
|
||||
</p></dd>
|
||||
<dt><span class="term">-g <em class="replaceable"><code>generator</code></em></span></dt>
|
||||
<dd><p>
|
||||
If generating a Diffie Hellman key, use this generator.
|
||||
Allowed values are 2 and 5. If no generator
|
||||
is specified, a known prime from RFC 2539 will be used
|
||||
if possible; otherwise the default is 2.
|
||||
</p></dd>
|
||||
If generating a Diffie Hellman key, use this generator.
|
||||
Allowed values are 2 and 5. If no generator
|
||||
is specified, a known prime from RFC 2539 will be used
|
||||
if possible; otherwise the default is 2.
|
||||
</p></dd>
|
||||
<dt><span class="term">-h</span></dt>
|
||||
<dd><p>
|
||||
Prints a short summary of the options and arguments to
|
||||
<span><strong class="command">dnssec-keygen</strong></span>.
|
||||
</p></dd>
|
||||
Prints a short summary of the options and arguments to
|
||||
<span><strong class="command">dnssec-keygen</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-k</span></dt>
|
||||
<dd><p>
|
||||
Generate KEY records rather than DNSKEY records.
|
||||
</p></dd>
|
||||
Generate KEY records rather than DNSKEY records.
|
||||
</p></dd>
|
||||
<dt><span class="term">-p <em class="replaceable"><code>protocol</code></em></span></dt>
|
||||
<dd><p>
|
||||
Sets the protocol value for the generated key. The protocol
|
||||
is a number between 0 and 255. The default is 3 (DNSSEC).
|
||||
Other possible values for this argument are listed in
|
||||
RFC 2535 and its successors.
|
||||
</p></dd>
|
||||
Sets the protocol value for the generated key. The protocol
|
||||
is a number between 0 and 255. The default is 3 (DNSSEC).
|
||||
Other possible values for this argument are listed in
|
||||
RFC 2535 and its successors.
|
||||
</p></dd>
|
||||
<dt><span class="term">-r <em class="replaceable"><code>randomdev</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a <code class="filename">/dev/random</code>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <code class="filename">randomdev</code> specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<code class="filename">keyboard</code> indicates that keyboard
|
||||
input should be used.
|
||||
</p></dd>
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a <code class="filename">/dev/random</code>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <code class="filename">randomdev</code>
|
||||
specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<code class="filename">keyboard</code> indicates that keyboard
|
||||
input should be used.
|
||||
</p></dd>
|
||||
<dt><span class="term">-s <em class="replaceable"><code>strength</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the strength value of the key. The strength is
|
||||
a number between 0 and 15, and currently has no defined
|
||||
purpose in DNSSEC.
|
||||
</p></dd>
|
||||
Specifies the strength value of the key. The strength is
|
||||
a number between 0 and 15, and currently has no defined
|
||||
purpose in DNSSEC.
|
||||
</p></dd>
|
||||
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
|
||||
<dd><p>
|
||||
Indicates the use of the key. <code class="option">type</code> must be
|
||||
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
|
||||
is AUTHCONF. AUTH refers to the ability to authenticate
|
||||
data, and CONF the ability to encrypt data.
|
||||
</p></dd>
|
||||
Indicates the use of the key. <code class="option">type</code> must be
|
||||
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
|
||||
is AUTHCONF. AUTH refers to the ability to authenticate
|
||||
data, and CONF the ability to encrypt data.
|
||||
</p></dd>
|
||||
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
|
||||
<dd><p>
|
||||
Sets the debugging level.
|
||||
</p></dd>
|
||||
Sets the debugging level.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549939"></a><h2>GENERATED KEYS</h2>
|
||||
<a name="id2543820"></a><h2>GENERATED KEYS</h2>
|
||||
<p>
|
||||
When <span><strong class="command">dnssec-keygen</strong></span> completes successfully,
|
||||
it prints a string of the form <code class="filename">Knnnn.+aaa+iiiii</code>
|
||||
to the standard output. This is an identification string for
|
||||
the key it has generated.
|
||||
When <span><strong class="command">dnssec-keygen</strong></span> completes
|
||||
successfully,
|
||||
it prints a string of the form <code class="filename">Knnnn.+aaa+iiiii</code>
|
||||
to the standard output. This is an identification string for
|
||||
the key it has generated.
|
||||
</p>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><p>
|
||||
<code class="filename">nnnn</code> is the key name.
|
||||
<li><p><code class="filename">nnnn</code> is the key name.
|
||||
</p></li>
|
||||
<li><p>
|
||||
<code class="filename">aaa</code> is the numeric representation of the
|
||||
<li><p><code class="filename">aaa</code> is the numeric representation
|
||||
of the
|
||||
algorithm.
|
||||
</p></li>
|
||||
<li><p>
|
||||
<code class="filename">iiiii</code> is the key identifier (or footprint).
|
||||
<li><p><code class="filename">iiiii</code> is the key identifier (or
|
||||
footprint).
|
||||
</p></li>
|
||||
</ul></div>
|
||||
<p>
|
||||
<span><strong class="command">dnssec-keygen</strong></span> creates two file, with names based
|
||||
on the printed string. <code class="filename">Knnnn.+aaa+iiiii.key</code>
|
||||
contains the public key, and
|
||||
<code class="filename">Knnnn.+aaa+iiiii.private</code> contains the private
|
||||
key.
|
||||
<p><span><strong class="command">dnssec-keygen</strong></span>
|
||||
creates two file, with names based
|
||||
on the printed string. <code class="filename">Knnnn.+aaa+iiiii.key</code>
|
||||
contains the public key, and
|
||||
<code class="filename">Knnnn.+aaa+iiiii.private</code> contains the
|
||||
private
|
||||
key.
|
||||
</p>
|
||||
<p>
|
||||
The <code class="filename">.key</code> file contains a DNS KEY record that
|
||||
can be inserted into a zone file (directly or with a $INCLUDE
|
||||
statement).
|
||||
The <code class="filename">.key</code> file contains a DNS KEY record
|
||||
that
|
||||
can be inserted into a zone file (directly or with a $INCLUDE
|
||||
statement).
|
||||
</p>
|
||||
<p>
|
||||
The <code class="filename">.private</code> file contains algorithm specific
|
||||
fields. For obvious security reasons, this file does not have
|
||||
general read permission.
|
||||
The <code class="filename">.private</code> file contains algorithm
|
||||
specific
|
||||
fields. For obvious security reasons, this file does not have
|
||||
general read permission.
|
||||
</p>
|
||||
<p>
|
||||
Both <code class="filename">.key</code> and <code class="filename">.private</code>
|
||||
files are generated for symmetric encryption algorithm such as
|
||||
HMAC-MD5, even though the public and private key are equivalent.
|
||||
Both <code class="filename">.key</code> and <code class="filename">.private</code>
|
||||
files are generated for symmetric encryption algorithm such as
|
||||
HMAC-MD5, even though the public and private key are equivalent.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550027"></a><h2>EXAMPLE</h2>
|
||||
<a name="id2543902"></a><h2>EXAMPLE</h2>
|
||||
<p>
|
||||
To generate a 768-bit DSA key for the domain
|
||||
<strong class="userinput"><code>example.com</code></strong>, the following command would be
|
||||
issued:
|
||||
To generate a 768-bit DSA key for the domain
|
||||
<strong class="userinput"><code>example.com</code></strong>, the following command would be
|
||||
issued:
|
||||
</p>
|
||||
<p><strong class="userinput"><code>dnssec-keygen -a DSA -b 768 -n ZONE example.com</code></strong>
|
||||
</p>
|
||||
<p>
|
||||
<strong class="userinput"><code>dnssec-keygen -a DSA -b 768 -n ZONE example.com</code></strong>
|
||||
The command would print a string of the form:
|
||||
</p>
|
||||
<p><strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
|
||||
</p>
|
||||
<p>
|
||||
The command would print a string of the form:
|
||||
</p>
|
||||
<p>
|
||||
<strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
|
||||
</p>
|
||||
<p>
|
||||
In this example, <span><strong class="command">dnssec-keygen</strong></span> creates
|
||||
the files <code class="filename">Kexample.com.+003+26160.key</code> and
|
||||
<code class="filename">Kexample.com.+003+26160.private</code>
|
||||
In this example, <span><strong class="command">dnssec-keygen</strong></span> creates
|
||||
the files <code class="filename">Kexample.com.+003+26160.key</code>
|
||||
and
|
||||
<code class="filename">Kexample.com.+003+26160.private</code>
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550073"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
|
||||
<a name="id2543946"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
|
||||
<em class="citetitle">RFC 2535</em>,
|
||||
<em class="citetitle">RFC 2845</em>,
|
||||
@ -219,9 +224,8 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550106"></a><h2>AUTHOR</h2>
|
||||
<p>
|
||||
<span class="corpauthor">Internet Systems Consortium</span>
|
||||
<a name="id2544045"></a><h2>AUTHOR</h2>
|
||||
<p><span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
@ -13,13 +13,13 @@
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" $Id: dnssec-signzone.8,v 1.23.2.1.4.11 2006/06/29 13:02:30 marka Exp $
|
||||
.\" $Id: dnssec-signzone.8,v 1.28.18.16 2007/01/30 00:23:44 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: dnssec\-signzone
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: June 30, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
@ -33,7 +33,7 @@
|
||||
dnssec\-signzone \- DNSSEC zone signing tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP 16
|
||||
\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-n\ \fR\fB\fInthreads\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-p\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-t\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-z\fR] {zonefile} [key...]
|
||||
\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-j\ \fR\fB\fIjitter\fR\fR] [\fB\-N\ \fR\fB\fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-O\ \fR\fB\fIoutput\-format\fR\fR] [\fB\-p\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-t\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-z\fR] {zonefile} [key...]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdnssec\-signzone\fR
|
||||
@ -41,50 +41,71 @@ signs a zone. It generates NSEC and RRSIG records and produces a signed version
|
||||
\fIkeyset\fR
|
||||
file for each child zone.
|
||||
.SH "OPTIONS"
|
||||
.TP 3n
|
||||
.PP
|
||||
\-a
|
||||
.RS 4
|
||||
Verify all generated signatures.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-c \fIclass\fR
|
||||
.RS 4
|
||||
Specifies the DNS class of the zone.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-k \fIkey\fR
|
||||
.RS 4
|
||||
Treat specified key as a key signing key ignoring any key flags. This option may be specified multiple times.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-l \fIdomain\fR
|
||||
.RS 4
|
||||
Generate a DLV set in addition to the key (DNSKEY) and DS sets. The domain is appended to the name of the records.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-d \fIdirectory\fR
|
||||
.RS 4
|
||||
Look for
|
||||
\fIkeyset\fR
|
||||
files in
|
||||
\fBdirectory\fR
|
||||
as the directory
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-g
|
||||
.RS 4
|
||||
Generate DS records for child zones from keyset files. Existing DS records will be removed.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-s \fIstart\-time\fR
|
||||
.RS 4
|
||||
Specify the date and time when the generated RRSIG records become valid. This can be either an absolute or relative time. An absolute start time is indicated by a number in YYYYMMDDHHMMSS notation; 20000530144500 denotes 14:45:00 UTC on May 30th, 2000. A relative start time is indicated by +N, which is N seconds from the current time. If no
|
||||
\fBstart\-time\fR
|
||||
is specified, the current time minus 1 hour (to allow for clock skew) is used.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-e \fIend\-time\fR
|
||||
.RS 4
|
||||
Specify the date and time when the generated RRSIG records expire. As with
|
||||
\fBstart\-time\fR, an absolute time is indicated in YYYYMMDDHHMMSS notation. A time relative to the start time is indicated with +N, which is N seconds from the start time. A time relative to the current time is indicated with now+N. If no
|
||||
\fBend\-time\fR
|
||||
is specified, 30 days from the start time is used as a default.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-f \fIoutput\-file\fR
|
||||
.RS 4
|
||||
The name of the output file containing the signed zone. The default is to append
|
||||
\fI.signed\fR
|
||||
to the input file.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-h
|
||||
.RS 4
|
||||
Prints a short summary of the options and arguments to
|
||||
\fBdnssec\-signzone\fR.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-i \fIinterval\fR
|
||||
.RS 4
|
||||
When a previously signed zone is passed as input, records may be resigned. The
|
||||
\fBinterval\fR
|
||||
option specifies the cycle interval as an offset from the current time (in seconds). If a RRSIG record expires after the cycle interval, it is retained. Otherwise, it is considered to be expiring soon, and it will be replaced.
|
||||
@ -96,17 +117,77 @@ or
|
||||
are specified,
|
||||
\fBdnssec\-signzone\fR
|
||||
generates signatures that are valid for 30 days, with a cycle interval of 7.5 days. Therefore, if any existing RRSIG records are due to expire in less than 7.5 days, they would be replaced.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-I \fIinput\-format\fR
|
||||
.RS 4
|
||||
The format of the input zone file. Possible formats are
|
||||
\fB"text"\fR
|
||||
(default) and
|
||||
\fB"raw"\fR. This option is primarily intended to be used for dynamic signed zones so that the dumped zone file in a non\-text format containing updates can be signed directly. The use of this option does not make much sense for non\-dynamic zones.
|
||||
.RE
|
||||
.PP
|
||||
\-j \fIjitter\fR
|
||||
.RS 4
|
||||
When signing a zone with a fixed signature lifetime, all RRSIG records issued at the time of signing expires simultaneously. If the zone is incrementally signed, i.e. a previously signed zone is passed as input to the signer, all expired signatures has to be regenerated at about the same time. The
|
||||
\fBjitter\fR
|
||||
option specifies a jitter window that will be used to randomize the signature expire time, thus spreading incremental signature regeneration over time.
|
||||
.sp
|
||||
Signature lifetime jitter also to some extent benefits validators and servers by spreading out cache expiration, i.e. if large numbers of RRSIGs don't expire at the same time from all caches there will be less congestion than if all validators need to refetch at mostly the same time.
|
||||
.RE
|
||||
.PP
|
||||
\-n \fIncpus\fR
|
||||
.RS 4
|
||||
Specifies the number of threads to use. By default, one thread is started for each detected CPU.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-N \fIsoa\-serial\-format\fR
|
||||
.RS 4
|
||||
The SOA serial number format of the signed zone. Possible formats are
|
||||
\fB"keep"\fR
|
||||
(default),
|
||||
\fB"increment"\fR
|
||||
and
|
||||
\fB"unixtime"\fR.
|
||||
.RS 4
|
||||
.PP
|
||||
\fB"keep"\fR
|
||||
.RS 4
|
||||
Do not modify the SOA serial number.
|
||||
.RE
|
||||
.PP
|
||||
\fB"increment"\fR
|
||||
.RS 4
|
||||
Increment the SOA serial number using RFC 1982 arithmetics.
|
||||
.RE
|
||||
.PP
|
||||
\fB"unixtime"\fR
|
||||
.RS 4
|
||||
Set the SOA serial number to the number of seconds since epoch.
|
||||
.RE
|
||||
.RE
|
||||
.RE
|
||||
.PP
|
||||
\-o \fIorigin\fR
|
||||
.RS 4
|
||||
The zone origin. If not specified, the name of the zone file is assumed to be the origin.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-O \fIoutput\-format\fR
|
||||
.RS 4
|
||||
The format of the output file containing the signed zone. Possible formats are
|
||||
\fB"text"\fR
|
||||
(default) and
|
||||
\fB"raw"\fR.
|
||||
.RE
|
||||
.PP
|
||||
\-p
|
||||
.RS 4
|
||||
Use pseudo\-random data when signing the zone. This is faster, but less secure, than using real random data. This option may be useful when signing large zones or when the entropy source is limited.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-r \fIrandomdev\fR
|
||||
.RS 4
|
||||
Specifies the source of randomness. If the operating system does not provide a
|
||||
\fI/dev/random\fR
|
||||
or equivalent device, the default source of randomness is keyboard input.
|
||||
@ -114,21 +195,32 @@ or equivalent device, the default source of randomness is keyboard input.
|
||||
specifies the name of a character device or file containing random data to be used instead of the default. The special value
|
||||
\fIkeyboard\fR
|
||||
indicates that keyboard input should be used.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-t
|
||||
.RS 4
|
||||
Print statistics at completion.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-v \fIlevel\fR
|
||||
.RS 4
|
||||
Sets the debugging level.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-z
|
||||
.RS 4
|
||||
Ignore KSK flag on key when determining what to sign.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
zonefile
|
||||
.RS 4
|
||||
The file containing the zone to be signed.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
key
|
||||
.RS 4
|
||||
The keys used to sign the zone. If no keys are specified, the default all zone keys that have private key files in the current directory.
|
||||
.RE
|
||||
.SH "EXAMPLE"
|
||||
.PP
|
||||
The following command signs the
|
||||
@ -159,4 +251,7 @@ RFC 2535.
|
||||
.PP
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2004\-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
Copyright \(co 2000\-2003 Internet Software Consortium.
|
||||
.br
|
||||
|
@ -16,7 +16,9 @@
|
||||
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-signzone.c,v 1.139.2.2.4.23 2006/01/04 23:50:19 marka Exp $ */
|
||||
/* $Id: dnssec-signzone.c,v 1.177.18.21 2006/08/30 23:01:54 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -33,6 +35,7 @@
|
||||
#include <isc/mutex.h>
|
||||
#include <isc/os.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/serial.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/string.h>
|
||||
@ -58,6 +61,7 @@
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/soa.h>
|
||||
#include <dns/time.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
@ -85,6 +89,10 @@ struct signer_key_struct {
|
||||
#define SIGNER_EVENT_WRITE (SIGNER_EVENTCLASS + 0)
|
||||
#define SIGNER_EVENT_WORK (SIGNER_EVENTCLASS + 1)
|
||||
|
||||
#define SOA_SERIAL_KEEP 0
|
||||
#define SOA_SERIAL_INCREMENT 1
|
||||
#define SOA_SERIAL_UNIXTIME 2
|
||||
|
||||
typedef struct signer_event sevent_t;
|
||||
struct signer_event {
|
||||
ISC_EVENT_COMMON(sevent_t);
|
||||
@ -96,6 +104,7 @@ static ISC_LIST(signer_key_t) keylist;
|
||||
static unsigned int keycount = 0;
|
||||
static isc_stdtime_t starttime = 0, endtime = 0, now;
|
||||
static int cycle = -1;
|
||||
static int jitter = 0;
|
||||
static isc_boolean_t tryverify = ISC_FALSE;
|
||||
static isc_boolean_t printstats = ISC_FALSE;
|
||||
static isc_mem_t *mctx = NULL;
|
||||
@ -104,6 +113,8 @@ static dns_ttl_t zonettl;
|
||||
static FILE *fp;
|
||||
static char *tempfile = NULL;
|
||||
static const dns_master_style_t *masterstyle;
|
||||
static dns_masterformat_t inputformat = dns_masterformat_text;
|
||||
static dns_masterformat_t outputformat = dns_masterformat_text;
|
||||
static unsigned int nsigned = 0, nretained = 0, ndropped = 0;
|
||||
static unsigned int nverified = 0, nverifyfailed = 0;
|
||||
static const char *directory;
|
||||
@ -125,6 +136,7 @@ static isc_boolean_t ignoreksk = ISC_FALSE;
|
||||
static dns_name_t *dlv = NULL;
|
||||
static dns_fixedname_t dlv_fixed;
|
||||
static dns_master_style_t *dsstyle = NULL;
|
||||
static unsigned int serialformat = SOA_SERIAL_KEEP;
|
||||
|
||||
#define INCSTAT(counter) \
|
||||
if (printstats) { \
|
||||
@ -154,42 +166,13 @@ static void
|
||||
dumpnode(dns_name_t *name, dns_dbnode_t *node) {
|
||||
isc_result_t result;
|
||||
|
||||
if (outputformat != dns_masterformat_text)
|
||||
return;
|
||||
result = dns_master_dumpnodetostream(mctx, gdb, gversion, node, name,
|
||||
masterstyle, fp);
|
||||
check_result(result, "dns_master_dumpnodetostream");
|
||||
}
|
||||
|
||||
static void
|
||||
dumpdb(dns_db_t *db) {
|
||||
dns_dbiterator_t *dbiter = NULL;
|
||||
dns_dbnode_t *node;
|
||||
dns_fixedname_t fname;
|
||||
dns_name_t *name;
|
||||
isc_result_t result;
|
||||
|
||||
dbiter = NULL;
|
||||
result = dns_db_createiterator(db, ISC_FALSE, &dbiter);
|
||||
check_result(result, "dns_db_createiterator()");
|
||||
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
node = NULL;
|
||||
|
||||
for (result = dns_dbiterator_first(dbiter);
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_dbiterator_next(dbiter))
|
||||
{
|
||||
result = dns_dbiterator_current(dbiter, &node, name);
|
||||
check_result(result, "dns_dbiterator_current()");
|
||||
dumpnode(name, node);
|
||||
dns_db_detachnode(db, &node);
|
||||
}
|
||||
if (result != ISC_R_NOMORE)
|
||||
fatal("iterating database: %s", isc_result_totext(result));
|
||||
|
||||
dns_dbiterator_destroy(&dbiter);
|
||||
}
|
||||
|
||||
static signer_key_t *
|
||||
newkeystruct(dst_key_t *dstkey, isc_boolean_t signwithkey) {
|
||||
signer_key_t *key;
|
||||
@ -217,8 +200,10 @@ signwithkey(dns_name_t *name, dns_rdataset_t *rdataset, dns_rdata_t *rdata,
|
||||
dst_key_t *key, isc_buffer_t *b)
|
||||
{
|
||||
isc_result_t result;
|
||||
isc_stdtime_t jendtime;
|
||||
|
||||
result = dns_dnssec_sign(name, rdataset, key, &starttime, &endtime,
|
||||
jendtime = (jitter != 0) ? isc_random_jitter(endtime, jitter) : endtime;
|
||||
result = dns_dnssec_sign(name, rdataset, key, &starttime, &jendtime,
|
||||
mctx, b, rdata);
|
||||
isc_entropy_stopcallbacksources(ectx);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
@ -253,7 +238,7 @@ iszonekey(signer_key_t *key) {
|
||||
dst_key_iszonekey(key->key)));
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Finds the key that generated a RRSIG, if possible. First look at the keys
|
||||
* that we've loaded already, and then see if there's a key on disk.
|
||||
*/
|
||||
@ -291,7 +276,7 @@ keythatsigned(dns_rdata_rrsig_t *rrsig) {
|
||||
return (key);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Check to see if we expect to find a key at this name. If we see a RRSIG
|
||||
* and can't find the signing key that we expect to find, we drop the rrsig.
|
||||
* I'm not sure if this is completely correct, but it seems to work.
|
||||
@ -337,7 +322,7 @@ setverifies(dns_name_t *name, dns_rdataset_t *set, signer_key_t *key,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Signs a set. Goes through contortions to decide if each RRSIG should
|
||||
* be dropped or retained, and then determines if any new SIGs need to
|
||||
* be generated.
|
||||
@ -598,7 +583,7 @@ opendb(const char *prefix, dns_name_t *name, dns_rdataclass_t rdclass,
|
||||
dns_db_detach(dbp);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Loads the key set for a child zone, if there is one, and builds DS records.
|
||||
*/
|
||||
static isc_result_t
|
||||
@ -653,6 +638,16 @@ loadds(dns_name_t *name, isc_uint32_t ttl, dns_rdataset_t *dsset) {
|
||||
ttl, &ds, &tuple);
|
||||
check_result(result, "dns_difftuple_create");
|
||||
dns_diff_append(&diff, &tuple);
|
||||
|
||||
dns_rdata_reset(&ds);
|
||||
result = dns_ds_buildrdata(name, &key, DNS_DSDIGEST_SHA256,
|
||||
dsbuf, &ds);
|
||||
check_result(result, "dns_ds_buildrdata");
|
||||
|
||||
result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD, name,
|
||||
ttl, &ds, &tuple);
|
||||
check_result(result, "dns_difftuple_create");
|
||||
dns_diff_append(&diff, &tuple);
|
||||
}
|
||||
result = dns_diff_apply(&diff, db, ver);
|
||||
check_result(result, "dns_diff_apply");
|
||||
@ -775,7 +770,7 @@ delegation(dns_name_t *name, dns_dbnode_t *node, isc_uint32_t *ttlp) {
|
||||
return (ISC_TF(result == ISC_R_SUCCESS));
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Signs all records at a name. This mostly just signs each set individually,
|
||||
* but also adds the RRSIG bit to any NSECs generated earlier, deals with
|
||||
* parent/child KEY signatures, and handles other exceptional cases.
|
||||
@ -957,7 +952,7 @@ active_node(dns_dbnode_t *node) {
|
||||
isc_result_totext(result));
|
||||
|
||||
if (!active) {
|
||||
/*
|
||||
/*%
|
||||
* The node is empty of everything but NSEC / RRSIG records.
|
||||
*/
|
||||
for (result = dns_rdatasetiter_first(rdsiter);
|
||||
@ -1021,7 +1016,7 @@ active_node(dns_dbnode_t *node) {
|
||||
return (active);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Extracts the TTL from the SOA.
|
||||
*/
|
||||
static dns_ttl_t
|
||||
@ -1053,7 +1048,82 @@ soattl(void) {
|
||||
return (ttl);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Increment (or set if nonzero) the SOA serial
|
||||
*/
|
||||
static isc_result_t
|
||||
setsoaserial(isc_uint32_t serial) {
|
||||
isc_result_t result;
|
||||
dns_dbnode_t *node = NULL;
|
||||
dns_rdataset_t rdataset;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
isc_uint32_t old_serial, new_serial;
|
||||
|
||||
result = dns_db_getoriginnode(gdb, &node);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return result;
|
||||
|
||||
dns_rdataset_init(&rdataset);
|
||||
|
||||
result = dns_db_findrdataset(gdb, node, gversion,
|
||||
dns_rdatatype_soa, 0,
|
||||
0, &rdataset, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
|
||||
result = dns_rdataset_first(&rdataset);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
|
||||
dns_rdataset_current(&rdataset, &rdata);
|
||||
|
||||
old_serial = dns_soa_getserial(&rdata);
|
||||
|
||||
if (serial) {
|
||||
/* Set SOA serial to the value provided. */
|
||||
new_serial = serial;
|
||||
} else {
|
||||
/* Increment SOA serial using RFC 1982 arithmetics */
|
||||
new_serial = (old_serial + 1) & 0xFFFFFFFF;
|
||||
if (new_serial == 0)
|
||||
new_serial = 1;
|
||||
}
|
||||
|
||||
/* If the new serial is not likely to cause a zone transfer
|
||||
* (a/ixfr) from servers having the old serial, warn the user.
|
||||
*
|
||||
* RFC1982 section 7 defines the maximum increment to be
|
||||
* (2^(32-1))-1. Using u_int32_t arithmetic, we can do a single
|
||||
* comparison. (5 - 6 == (2^32)-1, not negative-one)
|
||||
*/
|
||||
if (new_serial == old_serial ||
|
||||
(new_serial - old_serial) > 0x7fffffffU)
|
||||
fprintf(stderr, "%s: warning: Serial number not advanced, "
|
||||
"zone may not transfer\n", program);
|
||||
|
||||
dns_soa_setserial(new_serial, &rdata);
|
||||
|
||||
result = dns_db_deleterdataset(gdb, node, gversion,
|
||||
dns_rdatatype_soa, 0);
|
||||
check_result(result, "dns_db_deleterdataset");
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
|
||||
result = dns_db_addrdataset(gdb, node, gversion,
|
||||
0, &rdataset, 0, NULL);
|
||||
check_result(result, "dns_db_addrdataset");
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
|
||||
cleanup:
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
if (node != NULL)
|
||||
dns_db_detachnode(gdb, &node);
|
||||
dns_rdata_reset(&rdata);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*%
|
||||
* Delete any RRSIG records at a node.
|
||||
*/
|
||||
static void
|
||||
@ -1062,6 +1132,9 @@ cleannode(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node) {
|
||||
dns_rdataset_t set;
|
||||
isc_result_t result, dresult;
|
||||
|
||||
if (outputformat != dns_masterformat_text)
|
||||
return;
|
||||
|
||||
dns_rdataset_init(&set);
|
||||
result = dns_db_allrdatasets(db, node, version, 0, &rdsiter);
|
||||
check_result(result, "dns_db_allrdatasets");
|
||||
@ -1089,7 +1162,7 @@ cleannode(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node) {
|
||||
dns_rdatasetiter_destroy(&rdsiter);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Set up the iterator and global state before starting the tasks.
|
||||
*/
|
||||
static void
|
||||
@ -1104,7 +1177,7 @@ presign(void) {
|
||||
check_result(result, "dns_dbiterator_first()");
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Clean up the iterator and global state after the tasks complete.
|
||||
*/
|
||||
static void
|
||||
@ -1112,7 +1185,33 @@ postsign(void) {
|
||||
dns_dbiterator_destroy(&gdbiter);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Sign the apex of the zone.
|
||||
*/
|
||||
static void
|
||||
signapex(void) {
|
||||
dns_dbnode_t *node = NULL;
|
||||
dns_fixedname_t fixed;
|
||||
dns_name_t *name;
|
||||
isc_result_t result;
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
result = dns_dbiterator_current(gdbiter, &node, name);
|
||||
check_result(result, "dns_dbiterator_current()");
|
||||
signname(node, name);
|
||||
dumpnode(name, node);
|
||||
cleannode(gdb, gversion, node);
|
||||
dns_db_detachnode(gdb, &node);
|
||||
result = dns_dbiterator_next(gdbiter);
|
||||
if (result == ISC_R_NOMORE)
|
||||
finished = ISC_TRUE;
|
||||
else if (result != ISC_R_SUCCESS)
|
||||
fatal("failure iterating database: %s",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
|
||||
/*%
|
||||
* Assigns a node to a worker thread. This is protected by the master task's
|
||||
* lock.
|
||||
*/
|
||||
@ -1192,7 +1291,7 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
|
||||
assigned++;
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Start a worker task
|
||||
*/
|
||||
static void
|
||||
@ -1204,7 +1303,7 @@ startworker(isc_task_t *task, isc_event_t *event) {
|
||||
isc_event_free(&event);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Write a node to the output file, and restart the worker task.
|
||||
*/
|
||||
static void
|
||||
@ -1222,7 +1321,7 @@ writenode(isc_task_t *task, isc_event_t *event) {
|
||||
isc_event_free(&event);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Sign a database node.
|
||||
*/
|
||||
static void
|
||||
@ -1247,7 +1346,7 @@ sign(isc_task_t *task, isc_event_t *event) {
|
||||
isc_task_send(master, ISC_EVENT_PTR(&wevent));
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Generate NSEC records for the zone.
|
||||
*/
|
||||
static void
|
||||
@ -1318,7 +1417,7 @@ nsecify(void) {
|
||||
dns_dbiterator_destroy(&dbiter);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Load the zone file from disk
|
||||
*/
|
||||
static void
|
||||
@ -1344,13 +1443,13 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
|
||||
rdclass, 0, NULL, db);
|
||||
check_result(result, "dns_db_create()");
|
||||
|
||||
result = dns_db_load(*db, file);
|
||||
result = dns_db_load2(*db, file, inputformat);
|
||||
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
|
||||
fatal("failed loading zone from '%s': %s",
|
||||
file, isc_result_totext(result));
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Finds all public zone keys in the zone, and attempts to load the
|
||||
* private keys from disk.
|
||||
*/
|
||||
@ -1389,7 +1488,7 @@ loadzonekeys(dns_db_t *db) {
|
||||
dns_db_closeversion(db, ¤tversion, ISC_FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Finds all public zone keys in the zone.
|
||||
*/
|
||||
static void
|
||||
@ -1580,6 +1679,19 @@ writeset(const char *prefix, dns_rdatatype_t type) {
|
||||
ds.type = dns_rdatatype_dlv;
|
||||
result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD,
|
||||
name, 0, &ds, &tuple);
|
||||
check_result(result, "dns_difftuple_create");
|
||||
dns_diff_append(&diff, &tuple);
|
||||
|
||||
dns_rdata_reset(&ds);
|
||||
result = dns_ds_buildrdata(gorigin, &rdata,
|
||||
DNS_DSDIGEST_SHA256,
|
||||
dsbuf, &ds);
|
||||
check_result(result, "dns_ds_buildrdata");
|
||||
if (type == dns_rdatatype_dlv)
|
||||
ds.type = dns_rdatatype_dlv;
|
||||
result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD,
|
||||
name, 0, &ds, &tuple);
|
||||
|
||||
} else
|
||||
result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD,
|
||||
gorigin, zonettl,
|
||||
@ -1612,12 +1724,18 @@ static void
|
||||
print_time(FILE *fp) {
|
||||
time_t currenttime;
|
||||
|
||||
if (outputformat != dns_masterformat_text)
|
||||
return;
|
||||
|
||||
currenttime = time(NULL);
|
||||
fprintf(fp, "; File written on %s", ctime(¤ttime));
|
||||
}
|
||||
|
||||
static void
|
||||
print_version(FILE *fp) {
|
||||
if (outputformat != dns_masterformat_text)
|
||||
return;
|
||||
|
||||
fprintf(fp, "; dnssec_signzone version " VERSION "\n");
|
||||
}
|
||||
|
||||
@ -1644,12 +1762,20 @@ usage(void) {
|
||||
fprintf(stderr, "\t-i interval:\n");
|
||||
fprintf(stderr, "\t\tcycle interval - resign "
|
||||
"if < interval from end ( (end-start)/4 )\n");
|
||||
fprintf(stderr, "\t-j jitter:\n");
|
||||
fprintf(stderr, "\t\trandomize signature end time up to jitter seconds\n");
|
||||
fprintf(stderr, "\t-v debuglevel (0)\n");
|
||||
fprintf(stderr, "\t-o origin:\n");
|
||||
fprintf(stderr, "\t\tzone origin (name of zonefile)\n");
|
||||
fprintf(stderr, "\t-f outfile:\n");
|
||||
fprintf(stderr, "\t\tfile the signed zone is written in "
|
||||
"(zonefile + .signed)\n");
|
||||
fprintf(stderr, "\t-I format:\n");
|
||||
fprintf(stderr, "\t\tfile format of input zonefile (text)\n");
|
||||
fprintf(stderr, "\t-O format:\n");
|
||||
fprintf(stderr, "\t\tfile format of signed zone file (text)\n");
|
||||
fprintf(stderr, "\t-N format:\n");
|
||||
fprintf(stderr, "\t\tsoa serial format of signed zone file (keep)\n");
|
||||
fprintf(stderr, "\t-r randomdev:\n");
|
||||
fprintf(stderr, "\t\ta file containing random data\n");
|
||||
fprintf(stderr, "\t-a:\t");
|
||||
@ -1708,6 +1834,8 @@ main(int argc, char *argv[]) {
|
||||
int i, ch;
|
||||
char *startstr = NULL, *endstr = NULL, *classname = NULL;
|
||||
char *origin = NULL, *file = NULL, *output = NULL;
|
||||
char *inputformatstr = NULL, *outputformatstr = NULL;
|
||||
char *serialformatstr = NULL;
|
||||
char *dskeyfile[MAXDSKEYS];
|
||||
int ndskeys = 0;
|
||||
char *endp;
|
||||
@ -1720,7 +1848,6 @@ main(int argc, char *argv[]) {
|
||||
isc_boolean_t free_output = ISC_FALSE;
|
||||
int tempfilelen;
|
||||
dns_rdataclass_t rdclass;
|
||||
dns_db_t *udb = NULL;
|
||||
isc_task_t **tasks = NULL;
|
||||
isc_buffer_t b;
|
||||
int len;
|
||||
@ -1736,7 +1863,7 @@ main(int argc, char *argv[]) {
|
||||
dns_result_register();
|
||||
|
||||
while ((ch = isc_commandline_parse(argc, argv,
|
||||
"ac:d:e:f:ghi:k:l:n:o:pr:s:Stv:z"))
|
||||
"ac:d:e:f:ghi:I:j:k:l:n:N:o:O:pr:s:Stv:z"))
|
||||
!= -1) {
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
@ -1776,6 +1903,17 @@ main(int argc, char *argv[]) {
|
||||
"positive");
|
||||
break;
|
||||
|
||||
case 'I':
|
||||
inputformatstr = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 'j':
|
||||
endp = NULL;
|
||||
jitter = strtol(isc_commandline_argument, &endp, 0);
|
||||
if (*endp != '\0' || jitter < 0)
|
||||
fatal("jitter must be numeric and positive");
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
dns_fixedname_init(&dlv_fixed);
|
||||
len = strlen(isc_commandline_argument);
|
||||
@ -1802,10 +1940,18 @@ main(int argc, char *argv[]) {
|
||||
fatal("number of cpus must be numeric");
|
||||
break;
|
||||
|
||||
case 'N':
|
||||
serialformatstr = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
origin = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 'O':
|
||||
outputformatstr = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
pseudorandom = ISC_TRUE;
|
||||
break;
|
||||
@ -1901,6 +2047,36 @@ main(int argc, char *argv[]) {
|
||||
sprintf(output, "%s.signed", file);
|
||||
}
|
||||
|
||||
if (inputformatstr != NULL) {
|
||||
if (strcasecmp(inputformatstr, "text") == 0)
|
||||
inputformat = dns_masterformat_text;
|
||||
else if (strcasecmp(inputformatstr, "raw") == 0)
|
||||
inputformat = dns_masterformat_raw;
|
||||
else
|
||||
fatal("unknown file format: %s\n", inputformatstr);
|
||||
}
|
||||
|
||||
if (outputformatstr != NULL) {
|
||||
if (strcasecmp(outputformatstr, "text") == 0)
|
||||
outputformat = dns_masterformat_text;
|
||||
else if (strcasecmp(outputformatstr, "raw") == 0)
|
||||
outputformat = dns_masterformat_raw;
|
||||
else
|
||||
fatal("unknown file format: %s\n", outputformatstr);
|
||||
}
|
||||
|
||||
if (serialformatstr != NULL) {
|
||||
if (strcasecmp(serialformatstr, "keep") == 0)
|
||||
serialformat = SOA_SERIAL_KEEP;
|
||||
else if (strcasecmp(serialformatstr, "increment") == 0 ||
|
||||
strcasecmp(serialformatstr, "incr") == 0)
|
||||
serialformat = SOA_SERIAL_INCREMENT;
|
||||
else if (strcasecmp(serialformatstr, "unixtime") == 0)
|
||||
serialformat = SOA_SERIAL_UNIXTIME;
|
||||
else
|
||||
fatal("unknown soa serial format: %s\n", serialformatstr);
|
||||
}
|
||||
|
||||
result = dns_master_stylecreate(&dsstyle, DNS_STYLEFLAG_NO_TTL,
|
||||
0, 24, 0, 0, 0, 8, mctx);
|
||||
check_result(result, "dns_master_stylecreate");
|
||||
@ -2005,6 +2181,19 @@ main(int argc, char *argv[]) {
|
||||
result = dns_db_newversion(gdb, &gversion);
|
||||
check_result(result, "dns_db_newversion()");
|
||||
|
||||
switch (serialformat) {
|
||||
case SOA_SERIAL_INCREMENT:
|
||||
setsoaserial(0);
|
||||
break;
|
||||
case SOA_SERIAL_UNIXTIME:
|
||||
setsoaserial(now);
|
||||
break;
|
||||
case SOA_SERIAL_KEEP:
|
||||
default:
|
||||
/* do nothing */
|
||||
break;
|
||||
}
|
||||
|
||||
nsecify();
|
||||
|
||||
if (!nokeys) {
|
||||
@ -2053,10 +2242,6 @@ main(int argc, char *argv[]) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("failed to create task: %s",
|
||||
isc_result_totext(result));
|
||||
result = isc_app_onrun(mctx, master, startworker, tasks[i]);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("failed to start task: %s",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
|
||||
RUNTIME_CHECK(isc_mutex_init(&namelock) == ISC_R_SUCCESS);
|
||||
@ -2064,9 +2249,24 @@ main(int argc, char *argv[]) {
|
||||
RUNTIME_CHECK(isc_mutex_init(&statslock) == ISC_R_SUCCESS);
|
||||
|
||||
presign();
|
||||
(void)isc_app_run();
|
||||
if (!finished)
|
||||
fatal("process aborted by user");
|
||||
signapex();
|
||||
if (!finished) {
|
||||
/*
|
||||
* There is more work to do. Spread it out over multiple
|
||||
* processors if possible.
|
||||
*/
|
||||
for (i = 0; i < (int)ntasks; i++) {
|
||||
result = isc_app_onrun(mctx, master, startworker,
|
||||
tasks[i]);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("failed to start task: %s",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
(void)isc_app_run();
|
||||
if (!finished)
|
||||
fatal("process aborted by user");
|
||||
} else
|
||||
isc_task_detach(&master);
|
||||
shuttingdown = ISC_TRUE;
|
||||
for (i = 0; i < (int)ntasks; i++)
|
||||
isc_task_detach(&tasks[i]);
|
||||
@ -2074,9 +2274,11 @@ main(int argc, char *argv[]) {
|
||||
isc_mem_put(mctx, tasks, ntasks * sizeof(isc_task_t *));
|
||||
postsign();
|
||||
|
||||
if (udb != NULL) {
|
||||
dumpdb(udb);
|
||||
dns_db_detach(&udb);
|
||||
if (outputformat != dns_masterformat_text) {
|
||||
result = dns_master_dumptostream2(mctx, gdb, gversion,
|
||||
masterstyle, outputformat,
|
||||
fp);
|
||||
check_result(result, "dns_master_dumptostream2");
|
||||
}
|
||||
|
||||
result = isc_stdio_close(fp);
|
||||
@ -2115,6 +2317,7 @@ main(int argc, char *argv[]) {
|
||||
dst_lib_destroy();
|
||||
isc_hash_destroy();
|
||||
cleanup_entropy(&ectx);
|
||||
dns_name_destroy();
|
||||
if (verbose > 10)
|
||||
isc_mem_stats(mctx, stdout);
|
||||
isc_mem_destroy(&mctx);
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@ -18,23 +18,29 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: dnssec-signzone.docbook,v 1.2.2.2.4.11 2005/06/24 00:18:15 marka Exp $ -->
|
||||
|
||||
<refentry>
|
||||
<!-- $Id: dnssec-signzone.docbook,v 1.10.18.15 2007/01/29 23:57:20 marka Exp $ -->
|
||||
<refentry id="man.dnssec-signzone">
|
||||
<refentryinfo>
|
||||
<date>June 30, 2000</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle><application>dnssec-signzone</application></refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<manvolnum>8</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>dnssec-signzone</application></refname>
|
||||
<refpurpose>DNSSEC zone signing tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<year>2006</year>
|
||||
<year>2007</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
@ -46,11 +52,6 @@
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>dnssec-signzone</application></refname>
|
||||
<refpurpose>DNSSEC zone signing tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>dnssec-signzone</command>
|
||||
@ -64,8 +65,11 @@
|
||||
<arg><option>-k <replaceable class="parameter">key</replaceable></option></arg>
|
||||
<arg><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
||||
<arg><option>-i <replaceable class="parameter">interval</replaceable></option></arg>
|
||||
<arg><option>-n <replaceable class="parameter">nthreads</replaceable></option></arg>
|
||||
<arg><option>-I <replaceable class="parameter">input-format</replaceable></option></arg>
|
||||
<arg><option>-j <replaceable class="parameter">jitter</replaceable></option></arg>
|
||||
<arg><option>-N <replaceable class="parameter">soa-serial-format</replaceable></option></arg>
|
||||
<arg><option>-o <replaceable class="parameter">origin</replaceable></option></arg>
|
||||
<arg><option>-O <replaceable class="parameter">output-format</replaceable></option></arg>
|
||||
<arg><option>-p</option></arg>
|
||||
<arg><option>-r <replaceable class="parameter">randomdev</replaceable></option></arg>
|
||||
<arg><option>-s <replaceable class="parameter">start-time</replaceable></option></arg>
|
||||
@ -79,13 +83,13 @@
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<command>dnssec-signzone</command> signs a zone. It generates
|
||||
NSEC and RRSIG records and produces a signed version of the
|
||||
zone. The security status of delegations from the signed zone
|
||||
(that is, whether the child zones are secure or not) is
|
||||
determined by the presence or absence of a
|
||||
<filename>keyset</filename> file for each child zone.
|
||||
<para><command>dnssec-signzone</command>
|
||||
signs a zone. It generates
|
||||
NSEC and RRSIG records and produces a signed version of the
|
||||
zone. The security status of delegations from the signed zone
|
||||
(that is, whether the child zones are secure or not) is
|
||||
determined by the presence or absence of a
|
||||
<filename>keyset</filename> file for each child zone.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
@ -95,231 +99,323 @@
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-a</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Verify all generated signatures.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Verify all generated signatures.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-c <replaceable class="parameter">class</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the DNS class of the zone.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the DNS class of the zone.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-k <replaceable class="parameter">key</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Treat specified key as a key signing key ignoring any
|
||||
key flags. This option may be specified multiple times.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Treat specified key as a key signing key ignoring any
|
||||
key flags. This option may be specified multiple times.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-l <replaceable class="parameter">domain</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Generate a DLV set in addition to the key (DNSKEY) and DS sets.
|
||||
The domain is appended to the name of the records.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Generate a DLV set in addition to the key (DNSKEY) and DS sets.
|
||||
The domain is appended to the name of the records.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-d <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Look for <filename>keyset</filename> files in
|
||||
<option>directory</option> as the directory
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Look for <filename>keyset</filename> files in
|
||||
<option>directory</option> as the directory
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-g</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Generate DS records for child zones from keyset files.
|
||||
Existing DS records will be removed.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Generate DS records for child zones from keyset files.
|
||||
Existing DS records will be removed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-s <replaceable class="parameter">start-time</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the date and time when the generated RRSIG records
|
||||
become valid. This can be either an absolute or relative
|
||||
time. An absolute start time is indicated by a number
|
||||
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
|
||||
14:45:00 UTC on May 30th, 2000. A relative start time is
|
||||
indicated by +N, which is N seconds from the current time.
|
||||
If no <option>start-time</option> is specified, the current
|
||||
time minus 1 hour (to allow for clock skew) is used.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the date and time when the generated RRSIG records
|
||||
become valid. This can be either an absolute or relative
|
||||
time. An absolute start time is indicated by a number
|
||||
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
|
||||
14:45:00 UTC on May 30th, 2000. A relative start time is
|
||||
indicated by +N, which is N seconds from the current time.
|
||||
If no <option>start-time</option> is specified, the current
|
||||
time minus 1 hour (to allow for clock skew) is used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-e <replaceable class="parameter">end-time</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the date and time when the generated RRSIG records
|
||||
expire. As with <option>start-time</option>, an absolute
|
||||
time is indicated in YYYYMMDDHHMMSS notation. A time relative
|
||||
to the start time is indicated with +N, which is N seconds from
|
||||
the start time. A time relative to the current time is
|
||||
indicated with now+N. If no <option>end-time</option> is
|
||||
specified, 30 days from the start time is used as a default.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the date and time when the generated RRSIG records
|
||||
expire. As with <option>start-time</option>, an absolute
|
||||
time is indicated in YYYYMMDDHHMMSS notation. A time relative
|
||||
to the start time is indicated with +N, which is N seconds from
|
||||
the start time. A time relative to the current time is
|
||||
indicated with now+N. If no <option>end-time</option> is
|
||||
specified, 30 days from the start time is used as a default.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-f <replaceable class="parameter">output-file</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the output file containing the signed zone. The
|
||||
default is to append <filename>.signed</filename> to the
|
||||
input file.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the output file containing the signed zone. The
|
||||
default is to append <filename>.signed</filename> to
|
||||
the
|
||||
input file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints a short summary of the options and arguments to
|
||||
<command>dnssec-signzone</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints a short summary of the options and arguments to
|
||||
<command>dnssec-signzone</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-i <replaceable class="parameter">interval</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
When a previously signed zone is passed as input, records
|
||||
may be resigned. The <option>interval</option> option
|
||||
specifies the cycle interval as an offset from the current
|
||||
time (in seconds). If a RRSIG record expires after the
|
||||
cycle interval, it is retained. Otherwise, it is considered
|
||||
to be expiring soon, and it will be replaced.
|
||||
</para>
|
||||
<para>
|
||||
The default cycle interval is one quarter of the difference
|
||||
between the signature end and start times. So if neither
|
||||
<option>end-time</option> or <option>start-time</option>
|
||||
are specified, <command>dnssec-signzone</command> generates
|
||||
signatures that are valid for 30 days, with a cycle
|
||||
interval of 7.5 days. Therefore, if any existing RRSIG records
|
||||
are due to expire in less than 7.5 days, they would be
|
||||
replaced.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
When a previously signed zone is passed as input, records
|
||||
may be resigned. The <option>interval</option> option
|
||||
specifies the cycle interval as an offset from the current
|
||||
time (in seconds). If a RRSIG record expires after the
|
||||
cycle interval, it is retained. Otherwise, it is considered
|
||||
to be expiring soon, and it will be replaced.
|
||||
</para>
|
||||
<para>
|
||||
The default cycle interval is one quarter of the difference
|
||||
between the signature end and start times. So if neither
|
||||
<option>end-time</option> or <option>start-time</option>
|
||||
are specified, <command>dnssec-signzone</command>
|
||||
generates
|
||||
signatures that are valid for 30 days, with a cycle
|
||||
interval of 7.5 days. Therefore, if any existing RRSIG records
|
||||
are due to expire in less than 7.5 days, they would be
|
||||
replaced.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-I <replaceable class="parameter">input-format</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The format of the input zone file.
|
||||
Possible formats are <command>"text"</command> (default)
|
||||
and <command>"raw"</command>.
|
||||
This option is primarily intended to be used for dynamic
|
||||
signed zones so that the dumped zone file in a non-text
|
||||
format containing updates can be signed directly.
|
||||
The use of this option does not make much sense for
|
||||
non-dynamic zones.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-j <replaceable class="parameter">jitter</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
When signing a zone with a fixed signature lifetime, all
|
||||
RRSIG records issued at the time of signing expires
|
||||
simultaneously. If the zone is incrementally signed, i.e.
|
||||
a previously signed zone is passed as input to the signer,
|
||||
all expired signatures has to be regenerated at about the
|
||||
same time. The <option>jitter</option> option specifies a
|
||||
jitter window that will be used to randomize the signature
|
||||
expire time, thus spreading incremental signature
|
||||
regeneration over time.
|
||||
</para>
|
||||
<para>
|
||||
Signature lifetime jitter also to some extent benefits
|
||||
validators and servers by spreading out cache expiration,
|
||||
i.e. if large numbers of RRSIGs don't expire at the same time
|
||||
from all caches there will be less congestion than if all
|
||||
validators need to refetch at mostly the same time.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-n <replaceable class="parameter">ncpus</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of threads to use. By default, one
|
||||
thread is started for each detected CPU.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of threads to use. By default, one
|
||||
thread is started for each detected CPU.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-N <replaceable class="parameter">soa-serial-format</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The SOA serial number format of the signed zone.
|
||||
Possible formats are <command>"keep"</command> (default),
|
||||
<command>"increment"</command> and
|
||||
<command>"unixtime"</command>.
|
||||
</para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><command>"keep"</command></term>
|
||||
<listitem>
|
||||
<para>Do not modify the SOA serial number.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><command>"increment"</command></term>
|
||||
<listitem>
|
||||
<para>Increment the SOA serial number using RFC 1982
|
||||
arithmetics.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><command>"unixtime"</command></term>
|
||||
<listitem>
|
||||
<para>Set the SOA serial number to the number of seconds
|
||||
since epoch.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-o <replaceable class="parameter">origin</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The zone origin. If not specified, the name of the zone file
|
||||
is assumed to be the origin.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The zone origin. If not specified, the name of the zone file
|
||||
is assumed to be the origin.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-O <replaceable class="parameter">output-format</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The format of the output file containing the signed zone.
|
||||
Possible formats are <command>"text"</command> (default)
|
||||
and <command>"raw"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-p</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use pseudo-random data when signing the zone. This is faster,
|
||||
but less secure, than using real random data. This option
|
||||
may be useful when signing large zones or when the entropy
|
||||
source is limited.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Use pseudo-random data when signing the zone. This is faster,
|
||||
but less secure, than using real random data. This option
|
||||
may be useful when signing large zones or when the entropy
|
||||
source is limited.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-r <replaceable class="parameter">randomdev</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a <filename>/dev/random</filename>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <filename>randomdev</filename> specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<filename>keyboard</filename> indicates that keyboard
|
||||
input should be used.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a <filename>/dev/random</filename>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <filename>randomdev</filename>
|
||||
specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<filename>keyboard</filename> indicates that keyboard
|
||||
input should be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-t</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print statistics at completion.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Print statistics at completion.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v <replaceable class="parameter">level</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the debugging level.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the debugging level.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-z</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Ignore KSK flag on key when determining what to sign.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Ignore KSK flag on key when determining what to sign.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>zonefile</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file containing the zone to be signed.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The file containing the zone to be signed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>key</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The keys used to sign the zone. If no keys are specified, the
|
||||
default all zone keys that have private key files in the
|
||||
current directory.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The keys used to sign the zone. If no keys are specified, the
|
||||
default all zone keys that have private key files in the
|
||||
current directory.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
@ -328,34 +424,34 @@
|
||||
<refsect1>
|
||||
<title>EXAMPLE</title>
|
||||
<para>
|
||||
The following command signs the <userinput>example.com</userinput>
|
||||
zone with the DSA key generated in the <command>dnssec-keygen</command>
|
||||
man page. The zone's keys must be in the zone. If there are
|
||||
<filename>keyset</filename> files associated with child zones,
|
||||
they must be in the current directory.
|
||||
<userinput>example.com</userinput>, the following command would be
|
||||
issued:
|
||||
The following command signs the <userinput>example.com</userinput>
|
||||
zone with the DSA key generated in the <command>dnssec-keygen</command>
|
||||
man page. The zone's keys must be in the zone. If there are
|
||||
<filename>keyset</filename> files associated with child
|
||||
zones,
|
||||
they must be in the current directory.
|
||||
<userinput>example.com</userinput>, the following command would be
|
||||
issued:
|
||||
</para>
|
||||
<para><userinput>dnssec-signzone -o example.com db.example.com
|
||||
Kexample.com.+003+26160</userinput>
|
||||
</para>
|
||||
<para>
|
||||
<userinput>dnssec-signzone -o example.com db.example.com Kexample.com.+003+26160</userinput>
|
||||
The command would print a string of the form:
|
||||
</para>
|
||||
<para>
|
||||
The command would print a string of the form:
|
||||
</para>
|
||||
<para>
|
||||
In this example, <command>dnssec-signzone</command> creates
|
||||
the file <filename>db.example.com.signed</filename>. This file
|
||||
should be referenced in a zone statement in a
|
||||
<filename>named.conf</filename> file.
|
||||
In this example, <command>dnssec-signzone</command> creates
|
||||
the file <filename>db.example.com.signed</filename>. This
|
||||
file
|
||||
should be referenced in a zone statement in a
|
||||
<filename>named.conf</filename> file.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>dnssec-keygen</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<para><citerefentry>
|
||||
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>,
|
||||
<citetitle>RFC 2535</citetitle>.
|
||||
@ -364,14 +460,11 @@
|
||||
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
<para>
|
||||
<corpauthor>Internet Systems Consortium</corpauthor>
|
||||
<para><corpauthor>Internet Systems Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!--
|
||||
</refentry><!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@ -14,206 +14,266 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: dnssec-signzone.html,v 1.4.2.1.4.16 2006/06/29 13:02:30 marka Exp $ -->
|
||||
<!-- $Id: dnssec-signzone.html,v 1.8.18.22 2007/01/30 00:23:44 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>dnssec-signzone</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482688"></a><div class="titlepage"></div>
|
||||
<a name="man.dnssec-signzone"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p><span class="application">dnssec-signzone</span> — DNSSEC zone signing tool</p>
|
||||
</div>
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p><code class="command">dnssec-signzone</code> [<code class="option">-a</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-d <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-e <em class="replaceable"><code>end-time</code></em></code>] [<code class="option">-f <em class="replaceable"><code>output-file</code></em></code>] [<code class="option">-g</code>] [<code class="option">-h</code>] [<code class="option">-k <em class="replaceable"><code>key</code></em></code>] [<code class="option">-l <em class="replaceable"><code>domain</code></em></code>] [<code class="option">-i <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-n <em class="replaceable"><code>nthreads</code></em></code>] [<code class="option">-o <em class="replaceable"><code>origin</code></em></code>] [<code class="option">-p</code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>] [<code class="option">-t</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-z</code>] {zonefile} [key...]</p></div>
|
||||
<div class="cmdsynopsis"><p><code class="command">dnssec-signzone</code> [<code class="option">-a</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-d <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-e <em class="replaceable"><code>end-time</code></em></code>] [<code class="option">-f <em class="replaceable"><code>output-file</code></em></code>] [<code class="option">-g</code>] [<code class="option">-h</code>] [<code class="option">-k <em class="replaceable"><code>key</code></em></code>] [<code class="option">-l <em class="replaceable"><code>domain</code></em></code>] [<code class="option">-i <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-I <em class="replaceable"><code>input-format</code></em></code>] [<code class="option">-j <em class="replaceable"><code>jitter</code></em></code>] [<code class="option">-N <em class="replaceable"><code>soa-serial-format</code></em></code>] [<code class="option">-o <em class="replaceable"><code>origin</code></em></code>] [<code class="option">-O <em class="replaceable"><code>output-format</code></em></code>] [<code class="option">-p</code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>] [<code class="option">-t</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-z</code>] {zonefile} [key...]</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549544"></a><h2>DESCRIPTION</h2>
|
||||
<p>
|
||||
<span><strong class="command">dnssec-signzone</strong></span> signs a zone. It generates
|
||||
NSEC and RRSIG records and produces a signed version of the
|
||||
zone. The security status of delegations from the signed zone
|
||||
(that is, whether the child zones are secure or not) is
|
||||
determined by the presence or absence of a
|
||||
<code class="filename">keyset</code> file for each child zone.
|
||||
<a name="id2543526"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">dnssec-signzone</strong></span>
|
||||
signs a zone. It generates
|
||||
NSEC and RRSIG records and produces a signed version of the
|
||||
zone. The security status of delegations from the signed zone
|
||||
(that is, whether the child zones are secure or not) is
|
||||
determined by the presence or absence of a
|
||||
<code class="filename">keyset</code> file for each child zone.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549560"></a><h2>OPTIONS</h2>
|
||||
<a name="id2543541"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-a</span></dt>
|
||||
<dd><p>
|
||||
Verify all generated signatures.
|
||||
</p></dd>
|
||||
Verify all generated signatures.
|
||||
</p></dd>
|
||||
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the DNS class of the zone.
|
||||
</p></dd>
|
||||
Specifies the DNS class of the zone.
|
||||
</p></dd>
|
||||
<dt><span class="term">-k <em class="replaceable"><code>key</code></em></span></dt>
|
||||
<dd><p>
|
||||
Treat specified key as a key signing key ignoring any
|
||||
key flags. This option may be specified multiple times.
|
||||
</p></dd>
|
||||
Treat specified key as a key signing key ignoring any
|
||||
key flags. This option may be specified multiple times.
|
||||
</p></dd>
|
||||
<dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
|
||||
<dd><p>
|
||||
Generate a DLV set in addition to the key (DNSKEY) and DS sets.
|
||||
The domain is appended to the name of the records.
|
||||
</p></dd>
|
||||
Generate a DLV set in addition to the key (DNSKEY) and DS sets.
|
||||
The domain is appended to the name of the records.
|
||||
</p></dd>
|
||||
<dt><span class="term">-d <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd><p>
|
||||
Look for <code class="filename">keyset</code> files in
|
||||
<code class="option">directory</code> as the directory
|
||||
</p></dd>
|
||||
Look for <code class="filename">keyset</code> files in
|
||||
<code class="option">directory</code> as the directory
|
||||
</p></dd>
|
||||
<dt><span class="term">-g</span></dt>
|
||||
<dd><p>
|
||||
Generate DS records for child zones from keyset files.
|
||||
Existing DS records will be removed.
|
||||
</p></dd>
|
||||
Generate DS records for child zones from keyset files.
|
||||
Existing DS records will be removed.
|
||||
</p></dd>
|
||||
<dt><span class="term">-s <em class="replaceable"><code>start-time</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify the date and time when the generated RRSIG records
|
||||
become valid. This can be either an absolute or relative
|
||||
time. An absolute start time is indicated by a number
|
||||
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
|
||||
14:45:00 UTC on May 30th, 2000. A relative start time is
|
||||
indicated by +N, which is N seconds from the current time.
|
||||
If no <code class="option">start-time</code> is specified, the current
|
||||
time minus 1 hour (to allow for clock skew) is used.
|
||||
</p></dd>
|
||||
Specify the date and time when the generated RRSIG records
|
||||
become valid. This can be either an absolute or relative
|
||||
time. An absolute start time is indicated by a number
|
||||
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
|
||||
14:45:00 UTC on May 30th, 2000. A relative start time is
|
||||
indicated by +N, which is N seconds from the current time.
|
||||
If no <code class="option">start-time</code> is specified, the current
|
||||
time minus 1 hour (to allow for clock skew) is used.
|
||||
</p></dd>
|
||||
<dt><span class="term">-e <em class="replaceable"><code>end-time</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specify the date and time when the generated RRSIG records
|
||||
expire. As with <code class="option">start-time</code>, an absolute
|
||||
time is indicated in YYYYMMDDHHMMSS notation. A time relative
|
||||
to the start time is indicated with +N, which is N seconds from
|
||||
the start time. A time relative to the current time is
|
||||
indicated with now+N. If no <code class="option">end-time</code> is
|
||||
specified, 30 days from the start time is used as a default.
|
||||
</p></dd>
|
||||
Specify the date and time when the generated RRSIG records
|
||||
expire. As with <code class="option">start-time</code>, an absolute
|
||||
time is indicated in YYYYMMDDHHMMSS notation. A time relative
|
||||
to the start time is indicated with +N, which is N seconds from
|
||||
the start time. A time relative to the current time is
|
||||
indicated with now+N. If no <code class="option">end-time</code> is
|
||||
specified, 30 days from the start time is used as a default.
|
||||
</p></dd>
|
||||
<dt><span class="term">-f <em class="replaceable"><code>output-file</code></em></span></dt>
|
||||
<dd><p>
|
||||
The name of the output file containing the signed zone. The
|
||||
default is to append <code class="filename">.signed</code> to the
|
||||
input file.
|
||||
</p></dd>
|
||||
The name of the output file containing the signed zone. The
|
||||
default is to append <code class="filename">.signed</code> to
|
||||
the
|
||||
input file.
|
||||
</p></dd>
|
||||
<dt><span class="term">-h</span></dt>
|
||||
<dd><p>
|
||||
Prints a short summary of the options and arguments to
|
||||
<span><strong class="command">dnssec-signzone</strong></span>.
|
||||
</p></dd>
|
||||
Prints a short summary of the options and arguments to
|
||||
<span><strong class="command">dnssec-signzone</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-i <em class="replaceable"><code>interval</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
When a previously signed zone is passed as input, records
|
||||
may be resigned. The <code class="option">interval</code> option
|
||||
specifies the cycle interval as an offset from the current
|
||||
time (in seconds). If a RRSIG record expires after the
|
||||
cycle interval, it is retained. Otherwise, it is considered
|
||||
to be expiring soon, and it will be replaced.
|
||||
</p>
|
||||
When a previously signed zone is passed as input, records
|
||||
may be resigned. The <code class="option">interval</code> option
|
||||
specifies the cycle interval as an offset from the current
|
||||
time (in seconds). If a RRSIG record expires after the
|
||||
cycle interval, it is retained. Otherwise, it is considered
|
||||
to be expiring soon, and it will be replaced.
|
||||
</p>
|
||||
<p>
|
||||
The default cycle interval is one quarter of the difference
|
||||
between the signature end and start times. So if neither
|
||||
<code class="option">end-time</code> or <code class="option">start-time</code>
|
||||
are specified, <span><strong class="command">dnssec-signzone</strong></span> generates
|
||||
signatures that are valid for 30 days, with a cycle
|
||||
interval of 7.5 days. Therefore, if any existing RRSIG records
|
||||
are due to expire in less than 7.5 days, they would be
|
||||
replaced.
|
||||
</p>
|
||||
The default cycle interval is one quarter of the difference
|
||||
between the signature end and start times. So if neither
|
||||
<code class="option">end-time</code> or <code class="option">start-time</code>
|
||||
are specified, <span><strong class="command">dnssec-signzone</strong></span>
|
||||
generates
|
||||
signatures that are valid for 30 days, with a cycle
|
||||
interval of 7.5 days. Therefore, if any existing RRSIG records
|
||||
are due to expire in less than 7.5 days, they would be
|
||||
replaced.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-I <em class="replaceable"><code>input-format</code></em></span></dt>
|
||||
<dd><p>
|
||||
The format of the input zone file.
|
||||
Possible formats are <span><strong class="command">"text"</strong></span> (default)
|
||||
and <span><strong class="command">"raw"</strong></span>.
|
||||
This option is primarily intended to be used for dynamic
|
||||
signed zones so that the dumped zone file in a non-text
|
||||
format containing updates can be signed directly.
|
||||
The use of this option does not make much sense for
|
||||
non-dynamic zones.
|
||||
</p></dd>
|
||||
<dt><span class="term">-j <em class="replaceable"><code>jitter</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
When signing a zone with a fixed signature lifetime, all
|
||||
RRSIG records issued at the time of signing expires
|
||||
simultaneously. If the zone is incrementally signed, i.e.
|
||||
a previously signed zone is passed as input to the signer,
|
||||
all expired signatures has to be regenerated at about the
|
||||
same time. The <code class="option">jitter</code> option specifies a
|
||||
jitter window that will be used to randomize the signature
|
||||
expire time, thus spreading incremental signature
|
||||
regeneration over time.
|
||||
</p>
|
||||
<p>
|
||||
Signature lifetime jitter also to some extent benefits
|
||||
validators and servers by spreading out cache expiration,
|
||||
i.e. if large numbers of RRSIGs don't expire at the same time
|
||||
from all caches there will be less congestion than if all
|
||||
validators need to refetch at mostly the same time.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-n <em class="replaceable"><code>ncpus</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the number of threads to use. By default, one
|
||||
thread is started for each detected CPU.
|
||||
</p></dd>
|
||||
Specifies the number of threads to use. By default, one
|
||||
thread is started for each detected CPU.
|
||||
</p></dd>
|
||||
<dt><span class="term">-N <em class="replaceable"><code>soa-serial-format</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
The SOA serial number format of the signed zone.
|
||||
Possible formats are <span><strong class="command">"keep"</strong></span> (default),
|
||||
<span><strong class="command">"increment"</strong></span> and
|
||||
<span><strong class="command">"unixtime"</strong></span>.
|
||||
</p>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term"><span><strong class="command">"keep"</strong></span></span></dt>
|
||||
<dd><p>Do not modify the SOA serial number.</p></dd>
|
||||
<dt><span class="term"><span><strong class="command">"increment"</strong></span></span></dt>
|
||||
<dd><p>Increment the SOA serial number using RFC 1982
|
||||
arithmetics.</p></dd>
|
||||
<dt><span class="term"><span><strong class="command">"unixtime"</strong></span></span></dt>
|
||||
<dd><p>Set the SOA serial number to the number of seconds
|
||||
since epoch.</p></dd>
|
||||
</dl></div>
|
||||
</dd>
|
||||
<dt><span class="term">-o <em class="replaceable"><code>origin</code></em></span></dt>
|
||||
<dd><p>
|
||||
The zone origin. If not specified, the name of the zone file
|
||||
is assumed to be the origin.
|
||||
</p></dd>
|
||||
The zone origin. If not specified, the name of the zone file
|
||||
is assumed to be the origin.
|
||||
</p></dd>
|
||||
<dt><span class="term">-O <em class="replaceable"><code>output-format</code></em></span></dt>
|
||||
<dd><p>
|
||||
The format of the output file containing the signed zone.
|
||||
Possible formats are <span><strong class="command">"text"</strong></span> (default)
|
||||
and <span><strong class="command">"raw"</strong></span>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-p</span></dt>
|
||||
<dd><p>
|
||||
Use pseudo-random data when signing the zone. This is faster,
|
||||
but less secure, than using real random data. This option
|
||||
may be useful when signing large zones or when the entropy
|
||||
source is limited.
|
||||
</p></dd>
|
||||
Use pseudo-random data when signing the zone. This is faster,
|
||||
but less secure, than using real random data. This option
|
||||
may be useful when signing large zones or when the entropy
|
||||
source is limited.
|
||||
</p></dd>
|
||||
<dt><span class="term">-r <em class="replaceable"><code>randomdev</code></em></span></dt>
|
||||
<dd><p>
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a <code class="filename">/dev/random</code>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <code class="filename">randomdev</code> specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<code class="filename">keyboard</code> indicates that keyboard
|
||||
input should be used.
|
||||
</p></dd>
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a <code class="filename">/dev/random</code>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <code class="filename">randomdev</code>
|
||||
specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<code class="filename">keyboard</code> indicates that keyboard
|
||||
input should be used.
|
||||
</p></dd>
|
||||
<dt><span class="term">-t</span></dt>
|
||||
<dd><p>
|
||||
Print statistics at completion.
|
||||
</p></dd>
|
||||
Print statistics at completion.
|
||||
</p></dd>
|
||||
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
|
||||
<dd><p>
|
||||
Sets the debugging level.
|
||||
</p></dd>
|
||||
Sets the debugging level.
|
||||
</p></dd>
|
||||
<dt><span class="term">-z</span></dt>
|
||||
<dd><p>
|
||||
Ignore KSK flag on key when determining what to sign.
|
||||
</p></dd>
|
||||
Ignore KSK flag on key when determining what to sign.
|
||||
</p></dd>
|
||||
<dt><span class="term">zonefile</span></dt>
|
||||
<dd><p>
|
||||
The file containing the zone to be signed.
|
||||
</p></dd>
|
||||
The file containing the zone to be signed.
|
||||
</p></dd>
|
||||
<dt><span class="term">key</span></dt>
|
||||
<dd><p>
|
||||
The keys used to sign the zone. If no keys are specified, the
|
||||
default all zone keys that have private key files in the
|
||||
current directory.
|
||||
</p></dd>
|
||||
The keys used to sign the zone. If no keys are specified, the
|
||||
default all zone keys that have private key files in the
|
||||
current directory.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550068"></a><h2>EXAMPLE</h2>
|
||||
<a name="id2544327"></a><h2>EXAMPLE</h2>
|
||||
<p>
|
||||
The following command signs the <strong class="userinput"><code>example.com</code></strong>
|
||||
zone with the DSA key generated in the <span><strong class="command">dnssec-keygen</strong></span>
|
||||
man page. The zone's keys must be in the zone. If there are
|
||||
<code class="filename">keyset</code> files associated with child zones,
|
||||
they must be in the current directory.
|
||||
<strong class="userinput"><code>example.com</code></strong>, the following command would be
|
||||
issued:
|
||||
The following command signs the <strong class="userinput"><code>example.com</code></strong>
|
||||
zone with the DSA key generated in the <span><strong class="command">dnssec-keygen</strong></span>
|
||||
man page. The zone's keys must be in the zone. If there are
|
||||
<code class="filename">keyset</code> files associated with child
|
||||
zones,
|
||||
they must be in the current directory.
|
||||
<strong class="userinput"><code>example.com</code></strong>, the following command would be
|
||||
issued:
|
||||
</p>
|
||||
<p><strong class="userinput"><code>dnssec-signzone -o example.com db.example.com
|
||||
Kexample.com.+003+26160</code></strong>
|
||||
</p>
|
||||
<p>
|
||||
<strong class="userinput"><code>dnssec-signzone -o example.com db.example.com Kexample.com.+003+26160</code></strong>
|
||||
The command would print a string of the form:
|
||||
</p>
|
||||
<p>
|
||||
The command would print a string of the form:
|
||||
</p>
|
||||
<p>
|
||||
In this example, <span><strong class="command">dnssec-signzone</strong></span> creates
|
||||
the file <code class="filename">db.example.com.signed</code>. This file
|
||||
should be referenced in a zone statement in a
|
||||
<code class="filename">named.conf</code> file.
|
||||
In this example, <span><strong class="command">dnssec-signzone</strong></span> creates
|
||||
the file <code class="filename">db.example.com.signed</code>. This
|
||||
file
|
||||
should be referenced in a zone statement in a
|
||||
<code class="filename">named.conf</code> file.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550118"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
|
||||
<a name="id2544375"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
|
||||
<em class="citetitle">RFC 2535</em>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550145"></a><h2>AUTHOR</h2>
|
||||
<p>
|
||||
<span class="corpauthor">Internet Systems Consortium</span>
|
||||
<a name="id2544400"></a><h2>AUTHOR</h2>
|
||||
<p><span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
|
@ -15,7 +15,13 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssectool.c,v 1.31.2.3.2.6 2005/07/02 02:42:43 marka Exp $ */
|
||||
/* $Id: dnssectool.c,v 1.40.18.3 2005/07/01 03:55:28 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
/*%
|
||||
* DNSSEC Support Routines.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssectool.h,v 1.15.12.3 2004/03/08 04:04:18 marka Exp $ */
|
||||
/* $Id: dnssectool.h,v 1.18 2004/03/05 04:57:41 marka Exp $ */
|
||||
|
||||
#ifndef DNSSECTOOL_H
|
||||
#define DNSSECTOOL_H 1
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 1998-2002 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
@ -13,7 +13,7 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: Makefile.in,v 1.74.12.11 2004/09/06 21:47:25 marka Exp $
|
||||
# $Id: Makefile.in,v 1.80.18.7 2005/09/05 00:18:10 marka Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
@ -31,12 +31,20 @@ DBDRIVER_SRCS =
|
||||
DBDRIVER_INCLUDES =
|
||||
DBDRIVER_LIBS =
|
||||
|
||||
DLZ_DRIVER_DIR = ${top_srcdir}/contrib/dlz/drivers
|
||||
|
||||
DLZDRIVER_OBJS = @DLZ_DRIVER_OBJS@
|
||||
DLZDRIVER_SRCS = @DLZ_DRIVER_SRCS@
|
||||
DLZDRIVER_INCLUDES = @DLZ_DRIVER_INCLUDES@
|
||||
DLZDRIVER_LIBS = @DLZ_DRIVER_LIBS@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include \
|
||||
${LWRES_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES} \
|
||||
${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} ${ISC_INCLUDES} \
|
||||
${DBDRIVER_INCLUDES}
|
||||
${DLZDRIVER_INCLUDES} ${DBDRIVER_INCLUDES}
|
||||
|
||||
CDEFINES = @USE_DLZ@
|
||||
|
||||
CDEFINES =
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
@ -57,13 +65,14 @@ DEPLIBS = ${LWRESDEPLIBS} ${DNSDEPLIBS} ${BIND9DEPLIBS} \
|
||||
${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${ISCDEPLIBS}
|
||||
|
||||
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \
|
||||
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} ${DBDRIVER_LIBS} @LIBS@
|
||||
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} \
|
||||
${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBS@
|
||||
|
||||
SUBDIRS = unix
|
||||
|
||||
TARGETS = named@EXEEXT@ lwresd@EXEEXT@
|
||||
|
||||
OBJS = aclconf.@O@ builtin.@O@ client.@O@ config.@O@ control.@O@ \
|
||||
OBJS = builtin.@O@ client.@O@ config.@O@ control.@O@ \
|
||||
controlconf.@O@ interfacemgr.@O@ \
|
||||
listenlist.@O@ log.@O@ logconf.@O@ main.@O@ notify.@O@ \
|
||||
query.@O@ server.@O@ sortlist.@O@ \
|
||||
@ -71,11 +80,11 @@ OBJS = aclconf.@O@ builtin.@O@ client.@O@ config.@O@ control.@O@ \
|
||||
zoneconf.@O@ \
|
||||
lwaddr.@O@ lwresd.@O@ lwdclient.@O@ lwderror.@O@ lwdgabn.@O@ \
|
||||
lwdgnba.@O@ lwdgrbn.@O@ lwdnoop.@O@ lwsearch.@O@ \
|
||||
$(DBDRIVER_OBJS)
|
||||
${DLZDRIVER_OBJS} ${DBDRIVER_OBJS}
|
||||
|
||||
UOBJS = unix/os.@O@
|
||||
|
||||
SRCS = aclconf.c builtin.c client.c config.c control.c \
|
||||
SRCS = builtin.c client.c config.c control.c \
|
||||
controlconf.c interfacemgr.c \
|
||||
listenlist.c log.c logconf.c main.c notify.c \
|
||||
query.c server.c sortlist.c \
|
||||
@ -83,7 +92,7 @@ SRCS = aclconf.c builtin.c client.c config.c control.c \
|
||||
zoneconf.c \
|
||||
lwaddr.c lwresd.c lwdclient.c lwderror.c lwdgabn.c \
|
||||
lwdgnba.c lwdgrbn.c lwdnoop.c lwsearch.c \
|
||||
$(DBDRIVER_SRCS)
|
||||
${DLZDRIVER_SRCS} ${DBDRIVER_SRCS}
|
||||
|
||||
MANPAGES = named.8 lwresd.8 named.conf.5
|
||||
|
||||
@ -133,3 +142,4 @@ install:: named@EXEEXT@ lwresd@EXEEXT@ installdirs
|
||||
${INSTALL_DATA} ${srcdir}/lwresd.8 ${DESTDIR}${mandir}/man8
|
||||
${INSTALL_DATA} ${srcdir}/named.conf.5 ${DESTDIR}${mandir}/man5
|
||||
|
||||
@DLZ_DRIVER_RULES@
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2001-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,10 +15,11 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: builtin.c,v 1.4.106.4 2004/03/08 04:04:18 marka Exp $ */
|
||||
/* $Id: builtin.c,v 1.5.18.5 2005/08/23 04:12:38 marka Exp $ */
|
||||
|
||||
/*
|
||||
* The built-in "version", "hostname", "id" and "authors" databases.
|
||||
/*! \file
|
||||
* \brief
|
||||
* The built-in "version", "hostname", "id", "authors" and "empty" databases.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
@ -26,12 +27,13 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/sdb.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/sdb.h>
|
||||
|
||||
#include <named/builtin.h>
|
||||
#include <named/globals.h>
|
||||
@ -44,6 +46,7 @@ static isc_result_t do_version_lookup(dns_sdblookup_t *lookup);
|
||||
static isc_result_t do_hostname_lookup(dns_sdblookup_t *lookup);
|
||||
static isc_result_t do_authors_lookup(dns_sdblookup_t *lookup);
|
||||
static isc_result_t do_id_lookup(dns_sdblookup_t *lookup);
|
||||
static isc_result_t do_empty_lookup(dns_sdblookup_t *lookup);
|
||||
|
||||
/*
|
||||
* We can't use function pointers as the db_data directly
|
||||
@ -53,12 +56,15 @@ static isc_result_t do_id_lookup(dns_sdblookup_t *lookup);
|
||||
|
||||
struct builtin {
|
||||
isc_result_t (*do_lookup)(dns_sdblookup_t *lookup);
|
||||
char *server;
|
||||
char *contact;
|
||||
};
|
||||
|
||||
static builtin_t version_builtin = { do_version_lookup };
|
||||
static builtin_t hostname_builtin = { do_hostname_lookup };
|
||||
static builtin_t authors_builtin = { do_authors_lookup };
|
||||
static builtin_t id_builtin = { do_id_lookup };
|
||||
static builtin_t version_builtin = { do_version_lookup, NULL, NULL };
|
||||
static builtin_t hostname_builtin = { do_hostname_lookup, NULL, NULL };
|
||||
static builtin_t authors_builtin = { do_authors_lookup, NULL, NULL };
|
||||
static builtin_t id_builtin = { do_id_lookup, NULL, NULL };
|
||||
static builtin_t empty_builtin = { do_empty_lookup, NULL, NULL };
|
||||
|
||||
static dns_sdbimplementation_t *builtin_impl;
|
||||
|
||||
@ -166,17 +172,38 @@ do_id_lookup(dns_sdblookup_t *lookup) {
|
||||
return (put_txt(lookup, ns_g_server->server_id));
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
do_empty_lookup(dns_sdblookup_t *lookup) {
|
||||
|
||||
UNUSED(lookup);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
builtin_authority(const char *zone, void *dbdata, dns_sdblookup_t *lookup) {
|
||||
isc_result_t result;
|
||||
const char *contact = "hostmaster";
|
||||
const char *server = "@";
|
||||
builtin_t *b = (builtin_t *) dbdata;
|
||||
|
||||
UNUSED(zone);
|
||||
UNUSED(dbdata);
|
||||
|
||||
result = dns_sdb_putsoa(lookup, "@", "hostmaster", 0);
|
||||
if (b == &empty_builtin) {
|
||||
server = ".";
|
||||
contact = ".";
|
||||
} else {
|
||||
if (b->server != NULL)
|
||||
server = b->server;
|
||||
if (b->contact != NULL)
|
||||
contact = b->contact;
|
||||
}
|
||||
|
||||
result = dns_sdb_putsoa(lookup, server, contact, 0);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (ISC_R_FAILURE);
|
||||
result = dns_sdb_putrr(lookup, "ns", 0, "@");
|
||||
|
||||
result = dns_sdb_putrr(lookup, "ns", 0, server);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
@ -187,10 +214,17 @@ static isc_result_t
|
||||
builtin_create(const char *zone, int argc, char **argv,
|
||||
void *driverdata, void **dbdata)
|
||||
{
|
||||
REQUIRE(argc >= 1);
|
||||
|
||||
UNUSED(zone);
|
||||
UNUSED(driverdata);
|
||||
if (argc != 1)
|
||||
|
||||
if (strcmp(argv[0], "empty") == 0) {
|
||||
if (argc != 3)
|
||||
return (DNS_R_SYNTAX);
|
||||
} else if (argc != 1)
|
||||
return (DNS_R_SYNTAX);
|
||||
|
||||
if (strcmp(argv[0], "version") == 0)
|
||||
*dbdata = &version_builtin;
|
||||
else if (strcmp(argv[0], "hostname") == 0)
|
||||
@ -199,17 +233,62 @@ builtin_create(const char *zone, int argc, char **argv,
|
||||
*dbdata = &authors_builtin;
|
||||
else if (strcmp(argv[0], "id") == 0)
|
||||
*dbdata = &id_builtin;
|
||||
else
|
||||
else if (strcmp(argv[0], "empty") == 0) {
|
||||
builtin_t *empty;
|
||||
char *server;
|
||||
char *contact;
|
||||
/*
|
||||
* We don't want built-in zones to fail. Fallback to
|
||||
* the static configuration if memory allocation fails.
|
||||
*/
|
||||
empty = isc_mem_get(ns_g_mctx, sizeof(*empty));
|
||||
server = isc_mem_strdup(ns_g_mctx, argv[1]);
|
||||
contact = isc_mem_strdup(ns_g_mctx, argv[2]);
|
||||
if (empty == NULL || server == NULL || contact == NULL) {
|
||||
*dbdata = &empty_builtin;
|
||||
if (server != NULL)
|
||||
isc_mem_free(ns_g_mctx, server);
|
||||
if (contact != NULL)
|
||||
isc_mem_free(ns_g_mctx, contact);
|
||||
if (empty != NULL)
|
||||
isc_mem_put(ns_g_mctx, empty, sizeof (*empty));
|
||||
} else {
|
||||
memcpy(empty, &empty_builtin, sizeof (empty_builtin));
|
||||
empty->server = server;
|
||||
empty->contact = contact;
|
||||
*dbdata = empty;
|
||||
}
|
||||
} else
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
builtin_destroy(const char *zone, void *driverdata, void **dbdata) {
|
||||
builtin_t *b = (builtin_t *) *dbdata;
|
||||
|
||||
UNUSED(zone);
|
||||
UNUSED(driverdata);
|
||||
|
||||
/*
|
||||
* Don't free the static versions.
|
||||
*/
|
||||
if (*dbdata == &version_builtin || *dbdata == &hostname_builtin ||
|
||||
*dbdata == &authors_builtin || *dbdata == &id_builtin ||
|
||||
*dbdata == &empty_builtin)
|
||||
return;
|
||||
|
||||
isc_mem_free(ns_g_mctx, b->server);
|
||||
isc_mem_free(ns_g_mctx, b->contact);
|
||||
isc_mem_put(ns_g_mctx, b, sizeof (*b));
|
||||
}
|
||||
|
||||
static dns_sdbmethods_t builtin_methods = {
|
||||
builtin_lookup,
|
||||
builtin_authority,
|
||||
NULL, /* allnodes */
|
||||
builtin_create,
|
||||
NULL /* destroy */
|
||||
builtin_destroy
|
||||
};
|
||||
|
||||
isc_result_t
|
||||
|
@ -15,13 +15,14 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: client.c,v 1.176.2.13.4.31 2006/07/22 01:09:38 marka Exp $ */
|
||||
/* $Id: client.c,v 1.219.18.20 2006/07/22 01:02:36 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <isc/formatcheck.h>
|
||||
#include <isc/mutex.h>
|
||||
#include <isc/once.h>
|
||||
#include <isc/platform.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/string.h>
|
||||
@ -33,12 +34,13 @@
|
||||
#include <dns/dispatch.h>
|
||||
#include <dns/events.h>
|
||||
#include <dns/message.h>
|
||||
#include <dns/peer.h>
|
||||
#include <dns/rcode.h>
|
||||
#include <dns/resolver.h>
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdatalist.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/resolver.h>
|
||||
#include <dns/tsig.h>
|
||||
#include <dns/view.h>
|
||||
#include <dns/zone.h>
|
||||
@ -53,7 +55,9 @@
|
||||
*** Client
|
||||
***/
|
||||
|
||||
/*
|
||||
/*! \file
|
||||
* Client Routines
|
||||
*
|
||||
* Important note!
|
||||
*
|
||||
* All client state changes, other than that from idle to listening, occur
|
||||
@ -87,6 +91,25 @@
|
||||
#define SEND_BUFFER_SIZE 4096
|
||||
#define RECV_BUFFER_SIZE 4096
|
||||
|
||||
#ifdef ISC_PLATFORM_USETHREADS
|
||||
#define NMCTXS 100
|
||||
/*%<
|
||||
* Number of 'mctx pools' for clients. (Should this be configurable?)
|
||||
* When enabling threads, we use a pool of memory contexts shared by
|
||||
* client objects, since concurrent access to a shared context would cause
|
||||
* heavy contentions. The above constant is expected to be enough for
|
||||
* completely avoiding contentions among threads for an authoritative-only
|
||||
* server.
|
||||
*/
|
||||
#else
|
||||
#define NMCTXS 0
|
||||
/*%<
|
||||
* If named with built without thread, simply share manager's context. Using
|
||||
* a separate context in this case would simply waste memory.
|
||||
*/
|
||||
#endif
|
||||
|
||||
/*% nameserver client manager structure */
|
||||
struct ns_clientmgr {
|
||||
/* Unlocked. */
|
||||
unsigned int magic;
|
||||
@ -96,15 +119,20 @@ struct ns_clientmgr {
|
||||
isc_mutex_t lock;
|
||||
/* Locked by lock. */
|
||||
isc_boolean_t exiting;
|
||||
client_list_t active; /* Active clients */
|
||||
client_list_t recursing; /* Recursing clients */
|
||||
client_list_t inactive; /* To be recycled */
|
||||
client_list_t active; /*%< Active clients */
|
||||
client_list_t recursing; /*%< Recursing clients */
|
||||
client_list_t inactive; /*%< To be recycled */
|
||||
#if NMCTXS > 0
|
||||
/*%< mctx pool for clients. */
|
||||
unsigned int nextmctx;
|
||||
isc_mem_t * mctxpool[NMCTXS];
|
||||
#endif
|
||||
};
|
||||
|
||||
#define MANAGER_MAGIC ISC_MAGIC('N', 'S', 'C', 'm')
|
||||
#define VALID_MANAGER(m) ISC_MAGIC_VALID(m, MANAGER_MAGIC)
|
||||
|
||||
/*
|
||||
/*!
|
||||
* Client object states. Ordering is significant: higher-numbered
|
||||
* states are generally "more active", meaning that the client can
|
||||
* have more dynamically allocated data, outstanding events, etc.
|
||||
@ -117,12 +145,12 @@ struct ns_clientmgr {
|
||||
*/
|
||||
|
||||
#define NS_CLIENTSTATE_FREED 0
|
||||
/*
|
||||
/*%<
|
||||
* The client object no longer exists.
|
||||
*/
|
||||
|
||||
#define NS_CLIENTSTATE_INACTIVE 1
|
||||
/*
|
||||
/*%<
|
||||
* The client object exists and has a task and timer.
|
||||
* Its "query" struct and sendbuf are initialized.
|
||||
* It is on the client manager's list of inactive clients.
|
||||
@ -130,7 +158,7 @@ struct ns_clientmgr {
|
||||
*/
|
||||
|
||||
#define NS_CLIENTSTATE_READY 2
|
||||
/*
|
||||
/*%<
|
||||
* The client object is either a TCP or a UDP one, and
|
||||
* it is associated with a network interface. It is on the
|
||||
* client manager's list of active clients.
|
||||
@ -143,7 +171,7 @@ struct ns_clientmgr {
|
||||
*/
|
||||
|
||||
#define NS_CLIENTSTATE_READING 3
|
||||
/*
|
||||
/*%<
|
||||
* The client object is a TCP client object that has received
|
||||
* a connection. It has a tcpsocket, tcpmsg, TCP quota, and an
|
||||
* outstanding TCP read request. This state is not used for
|
||||
@ -151,14 +179,14 @@ struct ns_clientmgr {
|
||||
*/
|
||||
|
||||
#define NS_CLIENTSTATE_WORKING 4
|
||||
/*
|
||||
/*%<
|
||||
* The client object has received a request and is working
|
||||
* on it. It has a view, and it may have any of a non-reset OPT,
|
||||
* recursion quota, and an outstanding write request.
|
||||
*/
|
||||
|
||||
#define NS_CLIENTSTATE_MAX 9
|
||||
/*
|
||||
/*%<
|
||||
* Sentinel value used to indicate "no state". When client->newstate
|
||||
* has this value, we are not attempting to exit the current state.
|
||||
* Must be greater than any valid state.
|
||||
@ -171,6 +199,8 @@ struct ns_clientmgr {
|
||||
#define NS_CLIENT_DROPPORT 1
|
||||
#endif
|
||||
|
||||
unsigned int ns_client_requests;
|
||||
|
||||
static void client_read(ns_client_t *client);
|
||||
static void client_accept(ns_client_t *client);
|
||||
static void client_udprecv(ns_client_t *client);
|
||||
@ -227,7 +257,7 @@ ns_client_settimeout(ns_client_t *client, unsigned int seconds) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Check for a deactivation or shutdown request and take appropriate
|
||||
* action. Returns ISC_TRUE if either is in progress; in this case
|
||||
* the caller must no longer use the client object as it may have been
|
||||
@ -489,7 +519,7 @@ exit_check(ns_client_t *client) {
|
||||
|
||||
CTRACE("free");
|
||||
client->magic = 0;
|
||||
isc_mem_put(client->mctx, client, sizeof(*client));
|
||||
isc_mem_putanddetach(&client->mctx, client, sizeof(*client));
|
||||
|
||||
goto unlock;
|
||||
}
|
||||
@ -510,7 +540,7 @@ exit_check(ns_client_t *client) {
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* The client's task has received the client's control event
|
||||
* as part of the startup process.
|
||||
*/
|
||||
@ -536,7 +566,7 @@ client_start(isc_task_t *task, isc_event_t *event) {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/*%
|
||||
* The client's task has received a shutdown event.
|
||||
*/
|
||||
static void
|
||||
@ -591,6 +621,7 @@ ns_client_endrequest(ns_client_t *client) {
|
||||
|
||||
client->udpsize = 512;
|
||||
client->extflags = 0;
|
||||
client->ednsversion = -1;
|
||||
dns_message_reset(client->message, DNS_MESSAGE_INTENTPARSE);
|
||||
|
||||
if (client->recursionquota != NULL)
|
||||
@ -705,7 +736,7 @@ client_senddone(isc_task_t *task, isc_event_t *event) {
|
||||
ns_client_next(client, ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* We only want to fail with ISC_R_NOSPACE when called from
|
||||
* ns_client_sendraw() and not when called from ns_client_send(),
|
||||
* tcpbuffer is NULL when called from ns_client_sendraw() and
|
||||
@ -1181,6 +1212,64 @@ allowed(isc_netaddr_t *addr, dns_name_t *signer, dns_acl_t *acl) {
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback to see if a non-recursive query coming from 'srcaddr' to
|
||||
* 'destaddr', with optional key 'mykey' for class 'rdclass' would be
|
||||
* delivered to 'myview'.
|
||||
*
|
||||
* We run this unlocked as both the view list and the interface list
|
||||
* are updated when the approprite task has exclusivity.
|
||||
*/
|
||||
isc_boolean_t
|
||||
ns_client_isself(dns_view_t *myview, dns_tsigkey_t *mykey,
|
||||
isc_sockaddr_t *srcaddr, isc_sockaddr_t *dstaddr,
|
||||
dns_rdataclass_t rdclass, void *arg)
|
||||
{
|
||||
dns_view_t *view;
|
||||
dns_tsigkey_t *key;
|
||||
isc_netaddr_t netsrc;
|
||||
isc_netaddr_t netdst;
|
||||
|
||||
UNUSED(arg);
|
||||
|
||||
if (!ns_interfacemgr_listeningon(ns_g_server->interfacemgr, dstaddr))
|
||||
return (ISC_FALSE);
|
||||
|
||||
isc_netaddr_fromsockaddr(&netsrc, srcaddr);
|
||||
isc_netaddr_fromsockaddr(&netdst, dstaddr);
|
||||
|
||||
for (view = ISC_LIST_HEAD(ns_g_server->viewlist);
|
||||
view != NULL;
|
||||
view = ISC_LIST_NEXT(view, link)) {
|
||||
dns_name_t *tsig = NULL;
|
||||
|
||||
if (view->matchrecursiveonly)
|
||||
continue;
|
||||
|
||||
if (rdclass != view->rdclass)
|
||||
continue;
|
||||
|
||||
if (mykey != NULL) {
|
||||
isc_boolean_t match;
|
||||
isc_result_t result;
|
||||
|
||||
tsig = &mykey->name;
|
||||
result = dns_view_gettsig(view, tsig, &key);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
continue;
|
||||
match = dst_key_compare(mykey->key, key->key);
|
||||
dns_tsigkey_detach(&key);
|
||||
if (!match)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (allowed(&netsrc, tsig, view->matchclients) &&
|
||||
allowed(&netdst, tsig, view->matchdestinations))
|
||||
break;
|
||||
}
|
||||
return (ISC_TF(view == myview));
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle an incoming request event from the socket (UDP case)
|
||||
* or tcpmsg (TCP case).
|
||||
@ -1215,6 +1304,8 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
NS_CLIENTSTATE_READING :
|
||||
NS_CLIENTSTATE_READY);
|
||||
|
||||
ns_client_requests++;
|
||||
|
||||
if (event->ev_type == ISC_SOCKEVENT_RECVDONE) {
|
||||
INSIST(!TCP_CLIENT(client));
|
||||
sevent = (isc_socketevent_t *)event;
|
||||
@ -1384,8 +1475,6 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
*/
|
||||
opt = dns_message_getopt(client->message);
|
||||
if (opt != NULL) {
|
||||
unsigned int version;
|
||||
|
||||
/*
|
||||
* Set the client's UDP buffer size.
|
||||
*/
|
||||
@ -1403,6 +1492,19 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
*/
|
||||
client->extflags = (isc_uint16_t)(opt->ttl & 0xFFFF);
|
||||
|
||||
/*
|
||||
* Do we understand this version of EDNS?
|
||||
*
|
||||
* XXXRTH need library support for this!
|
||||
*/
|
||||
client->ednsversion = (opt->ttl & 0x00FF0000) >> 16;
|
||||
if (client->ednsversion > 0) {
|
||||
result = client_addopt(client);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
result = DNS_R_BADVERS;
|
||||
ns_client_error(client, result);
|
||||
goto cleanup;
|
||||
}
|
||||
/*
|
||||
* Create an OPT for our reply.
|
||||
*/
|
||||
@ -1411,17 +1513,6 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
ns_client_error(client, result);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/*
|
||||
* Do we understand this version of ENDS?
|
||||
*
|
||||
* XXXRTH need library support for this!
|
||||
*/
|
||||
version = (opt->ttl & 0x00FF0000) >> 16;
|
||||
if (version != 0) {
|
||||
ns_client_error(client, DNS_R_BADVERS);
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
if (client->message->rdclass == 0) {
|
||||
@ -1628,6 +1719,19 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
ISC_LOG_DEBUG(3), ra ? "recursion available" :
|
||||
"recursion not available");
|
||||
|
||||
/*
|
||||
* Adjust maximum UDP response size for this client.
|
||||
*/
|
||||
if (client->udpsize > 512) {
|
||||
dns_peer_t *peer = NULL;
|
||||
isc_uint16_t udpsize = view->maxudp;
|
||||
(void) dns_peerlist_peerbyaddr(view->peers, &netaddr, &peer);
|
||||
if (peer != NULL)
|
||||
dns_peer_getmaxudp(peer, &udpsize);
|
||||
if (client->udpsize > udpsize)
|
||||
client->udpsize = udpsize;
|
||||
}
|
||||
|
||||
/*
|
||||
* Dispatch the request.
|
||||
*/
|
||||
@ -1688,10 +1792,43 @@ client_timeout(isc_task_t *task, isc_event_t *event) {
|
||||
(void)exit_check(client);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
get_clientmctx(ns_clientmgr_t *manager, isc_mem_t **mctxp) {
|
||||
isc_mem_t *clientmctx;
|
||||
#if NMCTXS > 0
|
||||
isc_result_t result;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Caller must be holding the manager lock.
|
||||
*/
|
||||
#if NMCTXS > 0
|
||||
INSIST(manager->nextmctx < NMCTXS);
|
||||
clientmctx = manager->mctxpool[manager->nextmctx];
|
||||
if (clientmctx == NULL) {
|
||||
result = isc_mem_create(0, 0, &clientmctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
manager->mctxpool[manager->nextmctx] = clientmctx;
|
||||
manager->nextmctx++;
|
||||
if (manager->nextmctx == NMCTXS)
|
||||
manager->nextmctx = 0;
|
||||
}
|
||||
#else
|
||||
clientmctx = manager->mctx;
|
||||
#endif
|
||||
|
||||
isc_mem_attach(clientmctx, mctxp);
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
|
||||
ns_client_t *client;
|
||||
isc_result_t result;
|
||||
isc_mem_t *mctx = NULL;
|
||||
|
||||
/*
|
||||
* Caller must be holding the manager lock.
|
||||
@ -1703,9 +1840,16 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
|
||||
|
||||
REQUIRE(clientp != NULL && *clientp == NULL);
|
||||
|
||||
client = isc_mem_get(manager->mctx, sizeof(*client));
|
||||
if (client == NULL)
|
||||
result = get_clientmctx(manager, &mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
client = isc_mem_get(mctx, sizeof(*client));
|
||||
if (client == NULL) {
|
||||
isc_mem_detach(&mctx);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
client->mctx = mctx;
|
||||
|
||||
client->task = NULL;
|
||||
result = isc_task_create(manager->taskmgr, 0, &client->task);
|
||||
@ -1722,7 +1866,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
|
||||
client->timerset = ISC_FALSE;
|
||||
|
||||
client->message = NULL;
|
||||
result = dns_message_create(manager->mctx, DNS_MESSAGE_INTENTPARSE,
|
||||
result = dns_message_create(client->mctx, DNS_MESSAGE_INTENTPARSE,
|
||||
&client->message);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_timer;
|
||||
@ -1730,7 +1874,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
|
||||
/* XXXRTH Hardwired constants */
|
||||
|
||||
client->sendevent = (isc_socketevent_t *)
|
||||
isc_event_allocate(manager->mctx, client,
|
||||
isc_event_allocate(client->mctx, client,
|
||||
ISC_SOCKEVENT_SENDDONE,
|
||||
client_senddone, client,
|
||||
sizeof(isc_socketevent_t));
|
||||
@ -1739,14 +1883,14 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
|
||||
goto cleanup_message;
|
||||
}
|
||||
|
||||
client->recvbuf = isc_mem_get(manager->mctx, RECV_BUFFER_SIZE);
|
||||
client->recvbuf = isc_mem_get(client->mctx, RECV_BUFFER_SIZE);
|
||||
if (client->recvbuf == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup_sendevent;
|
||||
}
|
||||
|
||||
client->recvevent = (isc_socketevent_t *)
|
||||
isc_event_allocate(manager->mctx, client,
|
||||
isc_event_allocate(client->mctx, client,
|
||||
ISC_SOCKEVENT_RECVDONE,
|
||||
client_request, client,
|
||||
sizeof(isc_socketevent_t));
|
||||
@ -1756,7 +1900,6 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
|
||||
}
|
||||
|
||||
client->magic = NS_CLIENT_MAGIC;
|
||||
client->mctx = manager->mctx;
|
||||
client->manager = NULL;
|
||||
client->state = NS_CLIENTSTATE_INACTIVE;
|
||||
client->newstate = NS_CLIENTSTATE_MAX;
|
||||
@ -1778,6 +1921,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
|
||||
client->opt = NULL;
|
||||
client->udpsize = 512;
|
||||
client->extflags = 0;
|
||||
client->ednsversion = -1;
|
||||
client->next = NULL;
|
||||
client->shutdown = NULL;
|
||||
client->shutdown_arg = NULL;
|
||||
@ -1826,7 +1970,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
|
||||
isc_event_free((isc_event_t **)&client->recvevent);
|
||||
|
||||
cleanup_recvbuf:
|
||||
isc_mem_put(manager->mctx, client->recvbuf, RECV_BUFFER_SIZE);
|
||||
isc_mem_put(client->mctx, client->recvbuf, RECV_BUFFER_SIZE);
|
||||
|
||||
cleanup_sendevent:
|
||||
isc_event_free((isc_event_t **)&client->sendevent);
|
||||
@ -1843,7 +1987,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
|
||||
isc_task_detach(&client->task);
|
||||
|
||||
cleanup_client:
|
||||
isc_mem_put(manager->mctx, client, sizeof(*client));
|
||||
isc_mem_putanddetach(&client->mctx, client, sizeof(*client));
|
||||
|
||||
return (result);
|
||||
}
|
||||
@ -2096,12 +2240,23 @@ ns_client_replace(ns_client_t *client) {
|
||||
|
||||
static void
|
||||
clientmgr_destroy(ns_clientmgr_t *manager) {
|
||||
#if NMCTXS > 0
|
||||
int i;
|
||||
#endif
|
||||
|
||||
REQUIRE(ISC_LIST_EMPTY(manager->active));
|
||||
REQUIRE(ISC_LIST_EMPTY(manager->inactive));
|
||||
REQUIRE(ISC_LIST_EMPTY(manager->recursing));
|
||||
|
||||
MTRACE("clientmgr_destroy");
|
||||
|
||||
#if NMCTXS > 0
|
||||
for (i = 0; i < NMCTXS; i++) {
|
||||
if (manager->mctxpool[i] != NULL)
|
||||
isc_mem_detach(&manager->mctxpool[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
DESTROYLOCK(&manager->lock);
|
||||
manager->magic = 0;
|
||||
isc_mem_put(manager->mctx, manager, sizeof(*manager));
|
||||
@ -2113,6 +2268,9 @@ ns_clientmgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
|
||||
{
|
||||
ns_clientmgr_t *manager;
|
||||
isc_result_t result;
|
||||
#if NMCTXS > 0
|
||||
int i;
|
||||
#endif
|
||||
|
||||
manager = isc_mem_get(mctx, sizeof(*manager));
|
||||
if (manager == NULL)
|
||||
@ -2129,6 +2287,11 @@ ns_clientmgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
|
||||
ISC_LIST_INIT(manager->active);
|
||||
ISC_LIST_INIT(manager->inactive);
|
||||
ISC_LIST_INIT(manager->recursing);
|
||||
#if NMCTXS > 0
|
||||
manager->nextmctx = 0;
|
||||
for (i = 0; i < NMCTXS; i++)
|
||||
manager->mctxpool[i] = NULL; /* will be created on-demand */
|
||||
#endif
|
||||
manager->magic = MANAGER_MAGIC;
|
||||
|
||||
MTRACE("create");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2001-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: config.c,v 1.11.2.4.8.32 2006/02/28 06:32:53 marka Exp $ */
|
||||
/* $Id: config.c,v 1.47.18.28 2006/05/03 01:46:40 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -25,6 +27,7 @@
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
@ -42,6 +45,7 @@
|
||||
#include <named/config.h>
|
||||
#include <named/globals.h>
|
||||
|
||||
/*% default configuration */
|
||||
static char defaultconf[] = "\
|
||||
options {\n\
|
||||
# blackhole {none;};\n"
|
||||
@ -76,7 +80,7 @@ options {\n\
|
||||
#endif
|
||||
"\
|
||||
recursive-clients 1000;\n\
|
||||
rrset-order {order cyclic;};\n\
|
||||
rrset-order {type NS order random; order cyclic; };\n\
|
||||
serial-queries 20;\n\
|
||||
serial-query-rate 20;\n\
|
||||
server-id none;\n\
|
||||
@ -94,11 +98,13 @@ options {\n\
|
||||
use-id-pool true;\n\
|
||||
use-ixfr true;\n\
|
||||
edns-udp-size 4096;\n\
|
||||
max-udp-size 4096;\n\
|
||||
\n\
|
||||
/* view */\n\
|
||||
allow-notify {none;};\n\
|
||||
allow-update-forwarding {none;};\n\
|
||||
allow-recursion {any;};\n\
|
||||
allow-query-cache { localnets; localhost; };\n\
|
||||
allow-recursion { localnets; localhost; };\n\
|
||||
# allow-v6-synthesis <obsolete>;\n\
|
||||
# sortlist <none>\n\
|
||||
# topology <none>\n\
|
||||
@ -125,7 +131,16 @@ options {\n\
|
||||
check-names master fail;\n\
|
||||
check-names slave warn;\n\
|
||||
check-names response ignore;\n\
|
||||
dnssec-enable no; /* Make yes for 9.4. */ \n\
|
||||
check-mx warn;\n\
|
||||
acache-enable no;\n\
|
||||
acache-cleaning-interval 60;\n\
|
||||
max-acache-size 0;\n\
|
||||
dnssec-enable yes;\n\
|
||||
dnssec-validation no; /* Make yes for 9.5. */ \n\
|
||||
dnssec-accept-expired no;\n\
|
||||
clients-per-query 10;\n\
|
||||
max-clients-per-query 100;\n\
|
||||
zero-no-soa-ttl-cache no;\n\
|
||||
"
|
||||
|
||||
" /* zone */\n\
|
||||
@ -133,6 +148,7 @@ options {\n\
|
||||
allow-transfer {any;};\n\
|
||||
notify yes;\n\
|
||||
# also-notify <none>\n\
|
||||
notify-delay 5;\n\
|
||||
dialup no;\n\
|
||||
# forward <none>\n\
|
||||
# forwarders <none>\n\
|
||||
@ -155,6 +171,13 @@ options {\n\
|
||||
zone-statistics false;\n\
|
||||
max-journal-size unlimited;\n\
|
||||
ixfr-from-differences false;\n\
|
||||
check-wildcard yes;\n\
|
||||
check-sibling yes;\n\
|
||||
check-integrity yes;\n\
|
||||
check-mx-cname warn;\n\
|
||||
check-srv-cname warn;\n\
|
||||
zero-no-soa-ttl yes;\n\
|
||||
update-check-ksk yes;\n\
|
||||
};\n\
|
||||
"
|
||||
|
||||
@ -258,7 +281,6 @@ ns_config_listcount(const cfg_obj_t *list) {
|
||||
isc_result_t
|
||||
ns_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
|
||||
dns_rdataclass_t *classp) {
|
||||
const char *str;
|
||||
isc_textregion_t r;
|
||||
isc_result_t result;
|
||||
|
||||
@ -266,20 +288,18 @@ ns_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
|
||||
*classp = defclass;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
str = cfg_obj_asstring(classobj);
|
||||
DE_CONST(str, r.base);
|
||||
r.length = strlen(str);
|
||||
DE_CONST(cfg_obj_asstring(classobj), r.base);
|
||||
r.length = strlen(r.base);
|
||||
result = dns_rdataclass_fromtext(classp, &r);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
cfg_obj_log(classobj, ns_g_lctx, ISC_LOG_ERROR,
|
||||
"unknown class '%s'", str);
|
||||
"unknown class '%s'", r.base);
|
||||
return (result);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
ns_config_gettype(const cfg_obj_t *typeobj, dns_rdatatype_t deftype,
|
||||
dns_rdatatype_t *typep) {
|
||||
const char *str;
|
||||
isc_textregion_t r;
|
||||
isc_result_t result;
|
||||
|
||||
@ -287,13 +307,12 @@ ns_config_gettype(const cfg_obj_t *typeobj, dns_rdatatype_t deftype,
|
||||
*typep = deftype;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
str = cfg_obj_asstring(typeobj);
|
||||
DE_CONST(str, r.base);
|
||||
r.length = strlen(str);
|
||||
DE_CONST(cfg_obj_asstring(typeobj), r.base);
|
||||
r.length = strlen(r.base);
|
||||
result = dns_rdatatype_fromtext(typep, &r);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
cfg_obj_log(typeobj, ns_g_lctx, ISC_LOG_ERROR,
|
||||
"unknown type '%s'", str);
|
||||
"unknown type '%s'", r.base);
|
||||
return (result);
|
||||
}
|
||||
|
||||
@ -383,7 +402,7 @@ ns_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
|
||||
|
||||
static isc_result_t
|
||||
get_masters_def(const cfg_obj_t *cctx, const char *name,
|
||||
const cfg_obj_t **ret)
|
||||
const cfg_obj_t **ret)
|
||||
{
|
||||
isc_result_t result;
|
||||
const cfg_obj_t *masters = NULL;
|
||||
@ -425,7 +444,7 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
|
||||
dns_fixedname_t fname;
|
||||
isc_sockaddr_t *addrs = NULL;
|
||||
dns_name_t **keys = NULL;
|
||||
const char **lists = NULL;
|
||||
struct { const char *name; } *lists = NULL;
|
||||
struct {
|
||||
const cfg_listelt_t *element;
|
||||
in_port_t port;
|
||||
@ -494,7 +513,7 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
|
||||
}
|
||||
/* Seen? */
|
||||
for (j = 0; j < l; j++)
|
||||
if (strcasecmp(lists[j], listname) == 0)
|
||||
if (strcasecmp(lists[j].name, listname) == 0)
|
||||
break;
|
||||
if (j < l)
|
||||
continue;
|
||||
@ -508,7 +527,7 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
|
||||
}
|
||||
if (tresult != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
lists[l++] = listname;
|
||||
lists[l++].name = listname;
|
||||
/* Grow stack? */
|
||||
if (stackcount == pushed) {
|
||||
void * new;
|
||||
@ -713,16 +732,65 @@ ns_config_getport(const cfg_obj_t *config, in_port_t *portp) {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
struct keyalgorithms {
|
||||
const char *str;
|
||||
enum { hmacnone, hmacmd5, hmacsha1, hmacsha224,
|
||||
hmacsha256, hmacsha384, hmacsha512 } hmac;
|
||||
isc_uint16_t size;
|
||||
} algorithms[] = {
|
||||
{ "hmac-md5", hmacmd5, 128 },
|
||||
{ "hmac-md5.sig-alg.reg.int", hmacmd5, 0 },
|
||||
{ "hmac-md5.sig-alg.reg.int.", hmacmd5, 0 },
|
||||
{ "hmac-sha1", hmacsha1, 160 },
|
||||
{ "hmac-sha224", hmacsha224, 224 },
|
||||
{ "hmac-sha256", hmacsha256, 256 },
|
||||
{ "hmac-sha384", hmacsha384, 384 },
|
||||
{ "hmac-sha512", hmacsha512, 512 },
|
||||
{ NULL, hmacnone, 0 }
|
||||
};
|
||||
|
||||
isc_result_t
|
||||
ns_config_getkeyalgorithm(const char *str, dns_name_t **name)
|
||||
ns_config_getkeyalgorithm(const char *str, dns_name_t **name,
|
||||
isc_uint16_t *digestbits)
|
||||
{
|
||||
if (strcasecmp(str, "hmac-md5") == 0 ||
|
||||
strcasecmp(str, "hmac-md5.sig-alg.reg.int") == 0 ||
|
||||
strcasecmp(str, "hmac-md5.sig-alg.reg.int.") == 0)
|
||||
{
|
||||
if (name != NULL)
|
||||
*name = dns_tsig_hmacmd5_name;
|
||||
return (ISC_R_SUCCESS);
|
||||
int i;
|
||||
size_t len = 0;
|
||||
isc_uint16_t bits;
|
||||
isc_result_t result;
|
||||
|
||||
for (i = 0; algorithms[i].str != NULL; i++) {
|
||||
len = strlen(algorithms[i].str);
|
||||
if (strncasecmp(algorithms[i].str, str, len) == 0 &&
|
||||
(str[len] == '\0' ||
|
||||
(algorithms[i].size != 0 && str[len] == '-')))
|
||||
break;
|
||||
}
|
||||
return (ISC_R_NOTFOUND);
|
||||
if (algorithms[i].str == NULL)
|
||||
return (ISC_R_NOTFOUND);
|
||||
if (str[len] == '-') {
|
||||
result = isc_parse_uint16(&bits, str + len + 1, 10);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
if (bits > algorithms[i].size)
|
||||
return (ISC_R_RANGE);
|
||||
} else if (algorithms[i].size == 0)
|
||||
bits = 128;
|
||||
else
|
||||
bits = algorithms[i].size;
|
||||
|
||||
if (name != NULL) {
|
||||
switch (algorithms[i].hmac) {
|
||||
case hmacmd5: *name = dns_tsig_hmacmd5_name; break;
|
||||
case hmacsha1: *name = dns_tsig_hmacsha1_name; break;
|
||||
case hmacsha224: *name = dns_tsig_hmacsha224_name; break;
|
||||
case hmacsha256: *name = dns_tsig_hmacsha256_name; break;
|
||||
case hmacsha384: *name = dns_tsig_hmacsha384_name; break;
|
||||
case hmacsha512: *name = dns_tsig_hmacsha512_name; break;
|
||||
default:
|
||||
INSIST(0);
|
||||
}
|
||||
}
|
||||
if (digestbits != NULL)
|
||||
*digestbits = bits;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2001-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: control.c,v 1.7.2.2.2.14 2005/04/29 01:04:47 marka Exp $ */
|
||||
/* $Id: control.c,v 1.20.10.8 2006/03/10 00:23:20 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -52,7 +54,7 @@ command_compare(const char *text, const char *command) {
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* This function is called to process the incoming command
|
||||
* when a control channel message is received.
|
||||
*/
|
||||
@ -163,8 +165,15 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
|
||||
result = ns_server_freeze(ns_g_server, ISC_FALSE, command);
|
||||
} else if (command_compare(command, NS_COMMAND_RECURSING)) {
|
||||
result = ns_server_dumprecursing(ns_g_server);
|
||||
} else if (command_compare(command, NS_COMMAND_TIMERPOKE)) {
|
||||
result = ISC_R_SUCCESS;
|
||||
isc_timermgr_poke(ns_g_timermgr);
|
||||
} else if (command_compare(command, NS_COMMAND_NULL)) {
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (command_compare(command, NS_COMMAND_NOTIFY)) {
|
||||
result = ns_server_notifycommand(ns_g_server, command, text);
|
||||
} else if (command_compare(command, NS_COMMAND_VALIDATION)) {
|
||||
result = ns_server_validation(ns_g_server, command);
|
||||
} else {
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_CONTROL, ISC_LOG_WARNING,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2001-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: controlconf.c,v 1.28.2.9.2.10 2006/02/28 06:32:53 marka Exp $ */
|
||||
/* $Id: controlconf.c,v 1.40.18.10 2006/12/07 04:53:02 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -96,6 +98,10 @@ struct controllistener {
|
||||
isc_boolean_t exiting;
|
||||
controlkeylist_t keys;
|
||||
controlconnectionlist_t connections;
|
||||
isc_sockettype_t type;
|
||||
isc_uint32_t perm;
|
||||
isc_uint32_t owner;
|
||||
isc_uint32_t group;
|
||||
ISC_LINK(controllistener_t) link;
|
||||
};
|
||||
|
||||
@ -191,6 +197,8 @@ shutdown_listener(controllistener_t *listener) {
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_CONTROL, ISC_LOG_NOTICE,
|
||||
"stopping command channel on %s", socktext);
|
||||
if (listener->type == isc_sockettype_unix)
|
||||
isc_socket_cleanunix(&listener->address, ISC_TRUE);
|
||||
listener->exiting = ISC_TRUE;
|
||||
}
|
||||
|
||||
@ -596,7 +604,8 @@ control_newconn(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
sock = nevent->newsocket;
|
||||
(void)isc_socket_getpeername(sock, &peeraddr);
|
||||
if (!address_ok(&peeraddr, listener->acl)) {
|
||||
if (listener->type == isc_sockettype_tcp &&
|
||||
!address_ok(&peeraddr, listener->acl)) {
|
||||
char socktext[ISC_SOCKADDR_FORMATSIZE];
|
||||
isc_sockaddr_format(&peeraddr, socktext, sizeof(socktext));
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
@ -681,7 +690,7 @@ controlkeylist_fromcfg(const cfg_obj_t *keylist, isc_mem_t *mctx,
|
||||
char *newstr = NULL;
|
||||
const char *str;
|
||||
const cfg_obj_t *obj;
|
||||
controlkey_t *key = NULL;
|
||||
controlkey_t *key;
|
||||
|
||||
for (element = cfg_list_first(keylist);
|
||||
element != NULL;
|
||||
@ -700,7 +709,6 @@ controlkeylist_fromcfg(const cfg_obj_t *keylist, isc_mem_t *mctx,
|
||||
key->secret.length = 0;
|
||||
ISC_LINK_INIT(key, link);
|
||||
ISC_LIST_APPEND(*keyids, key, link);
|
||||
key = NULL;
|
||||
newstr = NULL;
|
||||
}
|
||||
return (ISC_R_SUCCESS);
|
||||
@ -708,8 +716,6 @@ controlkeylist_fromcfg(const cfg_obj_t *keylist, isc_mem_t *mctx,
|
||||
cleanup:
|
||||
if (newstr != NULL)
|
||||
isc_mem_free(mctx, newstr);
|
||||
if (key != NULL)
|
||||
isc_mem_put(mctx, key, sizeof(*key));
|
||||
free_controlkeylist(keyids, mctx);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
@ -751,7 +757,7 @@ register_keys(const cfg_obj_t *control, const cfg_obj_t *keylist,
|
||||
algstr = cfg_obj_asstring(algobj);
|
||||
secretstr = cfg_obj_asstring(secretobj);
|
||||
|
||||
if (ns_config_getkeyalgorithm(algstr, NULL) !=
|
||||
if (ns_config_getkeyalgorithm(algstr, NULL, NULL) !=
|
||||
ISC_R_SUCCESS)
|
||||
{
|
||||
cfg_obj_log(control, ns_g_lctx,
|
||||
@ -841,7 +847,7 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
|
||||
algstr = cfg_obj_asstring(algobj);
|
||||
secretstr = cfg_obj_asstring(secretobj);
|
||||
|
||||
if (ns_config_getkeyalgorithm(algstr, NULL) != ISC_R_SUCCESS) {
|
||||
if (ns_config_getkeyalgorithm(algstr, NULL, NULL) != ISC_R_SUCCESS) {
|
||||
cfg_obj_log(key, ns_g_lctx,
|
||||
ISC_LOG_WARNING,
|
||||
"unsupported algorithm '%s' in "
|
||||
@ -918,8 +924,8 @@ get_key_info(const cfg_obj_t *config, const cfg_obj_t *control,
|
||||
static void
|
||||
update_listener(ns_controls_t *cp, controllistener_t **listenerp,
|
||||
const cfg_obj_t *control, const cfg_obj_t *config,
|
||||
isc_sockaddr_t *addr, ns_aclconfctx_t *aclconfctx,
|
||||
const char *socktext)
|
||||
isc_sockaddr_t *addr, cfg_aclconfctx_t *aclconfctx,
|
||||
const char *socktext, isc_sockettype_t type)
|
||||
{
|
||||
controllistener_t *listener;
|
||||
const cfg_obj_t *allow;
|
||||
@ -1004,10 +1010,11 @@ update_listener(ns_controls_t *cp, controllistener_t **listenerp,
|
||||
/*
|
||||
* Now, keep the old access list unless a new one can be made.
|
||||
*/
|
||||
if (control != NULL) {
|
||||
if (control != NULL && type == isc_sockettype_tcp) {
|
||||
allow = cfg_tuple_get(control, "allow");
|
||||
result = ns_acl_fromconfig(allow, config, aclconfctx,
|
||||
listener->mctx, &new_acl);
|
||||
result = cfg_acl_fromconfig(allow, config, ns_g_lctx,
|
||||
aclconfctx, listener->mctx,
|
||||
&new_acl);
|
||||
} else {
|
||||
result = dns_acl_any(listener->mctx, &new_acl);
|
||||
}
|
||||
@ -1029,14 +1036,34 @@ update_listener(ns_controls_t *cp, controllistener_t **listenerp,
|
||||
"command channel %s: %s",
|
||||
socktext, isc_result_totext(result));
|
||||
|
||||
if (result == ISC_R_SUCCESS && type == isc_sockettype_unix) {
|
||||
isc_uint32_t perm, owner, group;
|
||||
perm = cfg_obj_asuint32(cfg_tuple_get(control, "perm"));
|
||||
owner = cfg_obj_asuint32(cfg_tuple_get(control, "owner"));
|
||||
group = cfg_obj_asuint32(cfg_tuple_get(control, "group"));
|
||||
result = ISC_R_SUCCESS;
|
||||
if (listener->perm != perm || listener->owner != owner ||
|
||||
listener->group != group)
|
||||
result = isc_socket_permunix(&listener->address, perm,
|
||||
owner, group);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
listener->perm = perm;
|
||||
listener->owner = owner;
|
||||
listener->group = group;
|
||||
} else if (control != NULL)
|
||||
cfg_obj_log(control, ns_g_lctx, ISC_LOG_WARNING,
|
||||
"couldn't update ownership/permission for "
|
||||
"command channel %s", socktext);
|
||||
}
|
||||
|
||||
*listenerp = listener;
|
||||
}
|
||||
|
||||
static void
|
||||
add_listener(ns_controls_t *cp, controllistener_t **listenerp,
|
||||
const cfg_obj_t *control, const cfg_obj_t *config,
|
||||
isc_sockaddr_t *addr, ns_aclconfctx_t *aclconfctx,
|
||||
const char *socktext)
|
||||
isc_sockaddr_t *addr, cfg_aclconfctx_t *aclconfctx,
|
||||
const char *socktext, isc_sockettype_t type)
|
||||
{
|
||||
isc_mem_t *mctx = cp->server->mctx;
|
||||
controllistener_t *listener;
|
||||
@ -1059,6 +1086,10 @@ add_listener(ns_controls_t *cp, controllistener_t **listenerp,
|
||||
listener->listening = ISC_FALSE;
|
||||
listener->exiting = ISC_FALSE;
|
||||
listener->acl = NULL;
|
||||
listener->type = type;
|
||||
listener->perm = 0;
|
||||
listener->owner = 0;
|
||||
listener->group = 0;
|
||||
ISC_LINK_INIT(listener, link);
|
||||
ISC_LIST_INIT(listener->keys);
|
||||
ISC_LIST_INIT(listener->connections);
|
||||
@ -1066,10 +1097,10 @@ add_listener(ns_controls_t *cp, controllistener_t **listenerp,
|
||||
/*
|
||||
* Make the acl.
|
||||
*/
|
||||
if (control != NULL) {
|
||||
if (control != NULL && type == isc_sockettype_tcp) {
|
||||
allow = cfg_tuple_get(control, "allow");
|
||||
result = ns_acl_fromconfig(allow, config, aclconfctx,
|
||||
mctx, &new_acl);
|
||||
result = cfg_acl_fromconfig(allow, config, ns_g_lctx,
|
||||
aclconfctx, mctx, &new_acl);
|
||||
} else {
|
||||
result = dns_acl_any(mctx, &new_acl);
|
||||
}
|
||||
@ -1104,20 +1135,35 @@ add_listener(ns_controls_t *cp, controllistener_t **listenerp,
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
int pf = isc_sockaddr_pf(&listener->address);
|
||||
if ((pf == AF_INET && isc_net_probeipv4() != ISC_R_SUCCESS) ||
|
||||
#ifdef ISC_PLATFORM_HAVESYSUNH
|
||||
(pf == AF_UNIX && isc_net_probeunix() != ISC_R_SUCCESS) ||
|
||||
#endif
|
||||
(pf == AF_INET6 && isc_net_probeipv6() != ISC_R_SUCCESS))
|
||||
result = ISC_R_FAMILYNOSUPPORT;
|
||||
}
|
||||
|
||||
if (result == ISC_R_SUCCESS && type == isc_sockettype_unix)
|
||||
isc_socket_cleanunix(&listener->address, ISC_FALSE);
|
||||
|
||||
if (result == ISC_R_SUCCESS)
|
||||
result = isc_socket_create(ns_g_socketmgr,
|
||||
isc_sockaddr_pf(&listener->address),
|
||||
isc_sockettype_tcp,
|
||||
&listener->sock);
|
||||
type, &listener->sock);
|
||||
|
||||
if (result == ISC_R_SUCCESS)
|
||||
result = isc_socket_bind(listener->sock,
|
||||
&listener->address);
|
||||
|
||||
if (result == ISC_R_SUCCESS && type == isc_sockettype_unix) {
|
||||
listener->perm = cfg_obj_asuint32(cfg_tuple_get(control,
|
||||
"perm"));
|
||||
listener->owner = cfg_obj_asuint32(cfg_tuple_get(control,
|
||||
"owner"));
|
||||
listener->group = cfg_obj_asuint32(cfg_tuple_get(control,
|
||||
"group"));
|
||||
result = isc_socket_permunix(&listener->address, listener->perm,
|
||||
listener->owner, listener->group);
|
||||
}
|
||||
if (result == ISC_R_SUCCESS)
|
||||
result = control_listen(listener);
|
||||
|
||||
@ -1154,7 +1200,7 @@ add_listener(ns_controls_t *cp, controllistener_t **listenerp,
|
||||
|
||||
isc_result_t
|
||||
ns_controls_configure(ns_controls_t *cp, const cfg_obj_t *config,
|
||||
ns_aclconfctx_t *aclconfctx)
|
||||
cfg_aclconfctx_t *aclconfctx)
|
||||
{
|
||||
controllistener_t *listener;
|
||||
controllistenerlist_t new_listeners;
|
||||
@ -1200,9 +1246,6 @@ ns_controls_configure(ns_controls_t *cp, const cfg_obj_t *config,
|
||||
* The parser handles BIND 8 configuration file
|
||||
* syntax, so it allows unix phrases as well
|
||||
* inet phrases with no keys{} clause.
|
||||
*
|
||||
* "unix" phrases have been reported as
|
||||
* unsupported by the parser.
|
||||
*/
|
||||
control = cfg_listelt_value(element2);
|
||||
|
||||
@ -1223,7 +1266,8 @@ ns_controls_configure(ns_controls_t *cp, const cfg_obj_t *config,
|
||||
socktext);
|
||||
|
||||
update_listener(cp, &listener, control, config,
|
||||
&addr, aclconfctx, socktext);
|
||||
&addr, aclconfctx, socktext,
|
||||
isc_sockettype_tcp);
|
||||
|
||||
if (listener != NULL)
|
||||
/*
|
||||
@ -1238,7 +1282,81 @@ ns_controls_configure(ns_controls_t *cp, const cfg_obj_t *config,
|
||||
*/
|
||||
add_listener(cp, &listener, control,
|
||||
config, &addr, aclconfctx,
|
||||
socktext);
|
||||
socktext,
|
||||
isc_sockettype_tcp);
|
||||
|
||||
if (listener != NULL)
|
||||
ISC_LIST_APPEND(new_listeners,
|
||||
listener, link);
|
||||
}
|
||||
}
|
||||
for (element = cfg_list_first(controlslist);
|
||||
element != NULL;
|
||||
element = cfg_list_next(element)) {
|
||||
const cfg_obj_t *controls;
|
||||
const cfg_obj_t *unixcontrols = NULL;
|
||||
|
||||
controls = cfg_listelt_value(element);
|
||||
(void)cfg_map_get(controls, "unix", &unixcontrols);
|
||||
if (unixcontrols == NULL)
|
||||
continue;
|
||||
|
||||
for (element2 = cfg_list_first(unixcontrols);
|
||||
element2 != NULL;
|
||||
element2 = cfg_list_next(element2)) {
|
||||
const cfg_obj_t *control;
|
||||
const cfg_obj_t *path;
|
||||
isc_sockaddr_t addr;
|
||||
isc_result_t result;
|
||||
|
||||
/*
|
||||
* The parser handles BIND 8 configuration file
|
||||
* syntax, so it allows unix phrases as well
|
||||
* inet phrases with no keys{} clause.
|
||||
*/
|
||||
control = cfg_listelt_value(element2);
|
||||
|
||||
path = cfg_tuple_get(control, "path");
|
||||
result = isc_sockaddr_frompath(&addr,
|
||||
cfg_obj_asstring(path));
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(ns_g_lctx,
|
||||
NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_CONTROL,
|
||||
ISC_LOG_DEBUG(9),
|
||||
"control channel '%s': %s",
|
||||
cfg_obj_asstring(path),
|
||||
isc_result_totext(result));
|
||||
continue;
|
||||
}
|
||||
|
||||
isc_log_write(ns_g_lctx,
|
||||
NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_CONTROL,
|
||||
ISC_LOG_DEBUG(9),
|
||||
"processing control channel '%s'",
|
||||
cfg_obj_asstring(path));
|
||||
|
||||
update_listener(cp, &listener, control, config,
|
||||
&addr, aclconfctx,
|
||||
cfg_obj_asstring(path),
|
||||
isc_sockettype_unix);
|
||||
|
||||
if (listener != NULL)
|
||||
/*
|
||||
* Remove the listener from the old
|
||||
* list, so it won't be shut down.
|
||||
*/
|
||||
ISC_LIST_UNLINK(cp->listeners,
|
||||
listener, link);
|
||||
else
|
||||
/*
|
||||
* This is a new listener.
|
||||
*/
|
||||
add_listener(cp, &listener, control,
|
||||
config, &addr, aclconfctx,
|
||||
cfg_obj_asstring(path),
|
||||
isc_sockettype_unix);
|
||||
|
||||
if (listener != NULL)
|
||||
ISC_LIST_APPEND(new_listeners,
|
||||
@ -1269,7 +1387,8 @@ ns_controls_configure(ns_controls_t *cp, const cfg_obj_t *config,
|
||||
isc_sockaddr_format(&addr, socktext, sizeof(socktext));
|
||||
|
||||
update_listener(cp, &listener, NULL, NULL,
|
||||
&addr, NULL, socktext);
|
||||
&addr, NULL, socktext,
|
||||
isc_sockettype_tcp);
|
||||
|
||||
if (listener != NULL)
|
||||
/*
|
||||
@ -1283,7 +1402,8 @@ ns_controls_configure(ns_controls_t *cp, const cfg_obj_t *config,
|
||||
* This is a new listener.
|
||||
*/
|
||||
add_listener(cp, &listener, NULL, NULL,
|
||||
&addr, NULL, socktext);
|
||||
&addr, NULL, socktext,
|
||||
isc_sockettype_tcp);
|
||||
|
||||
if (listener != NULL)
|
||||
ISC_LIST_APPEND(new_listeners,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,11 +15,13 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: builtin.h,v 1.1.204.3 2004/03/08 04:04:20 marka Exp $ */
|
||||
/* $Id: builtin.h,v 1.2.18.2 2005/04/29 00:15:34 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_BUILTIN_H
|
||||
#define NAMED_BUILTIN_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/types.h>
|
||||
|
||||
isc_result_t ns_builtin_init(void);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: client.h,v 1.60.2.2.10.12 2006/06/06 00:11:40 marka Exp $ */
|
||||
/* $Id: client.h,v 1.69.18.9 2006/06/06 00:11:41 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_CLIENT_H
|
||||
#define NAMED_CLIENT_H 1
|
||||
@ -24,9 +24,8 @@
|
||||
***** Module Info
|
||||
*****/
|
||||
|
||||
/*
|
||||
* Client
|
||||
*
|
||||
/*! \file
|
||||
* \brief
|
||||
* This module defines two objects, ns_client_t and ns_clientmgr_t.
|
||||
*
|
||||
* An ns_client_t object handles incoming DNS requests from clients
|
||||
@ -44,12 +43,12 @@
|
||||
* fully handled (which can be much later), the ns_client_t must be
|
||||
* notified of this by calling one of the following functions
|
||||
* exactly once in the context of its task:
|
||||
*
|
||||
* \code
|
||||
* ns_client_send() (sending a non-error response)
|
||||
* ns_client_sendraw() (sending a raw response)
|
||||
* ns_client_error() (sending an error response)
|
||||
* ns_client_next() (sending no response)
|
||||
*
|
||||
*\endcode
|
||||
* This will release any resources used by the request and
|
||||
* and allow the ns_client_t to listen for the next request.
|
||||
*
|
||||
@ -84,6 +83,7 @@
|
||||
|
||||
typedef ISC_LIST(ns_client_t) client_list_t;
|
||||
|
||||
/*% nameserver client structure */
|
||||
struct ns_client {
|
||||
unsigned int magic;
|
||||
isc_mem_t * mctx;
|
||||
@ -116,15 +116,16 @@ struct ns_client {
|
||||
dns_rdataset_t * opt;
|
||||
isc_uint16_t udpsize;
|
||||
isc_uint16_t extflags;
|
||||
isc_int16_t ednsversion; /* -1 noedns */
|
||||
void (*next)(ns_client_t *);
|
||||
void (*shutdown)(void *arg, isc_result_t result);
|
||||
void *shutdown_arg;
|
||||
ns_query_t query;
|
||||
isc_stdtime_t requesttime;
|
||||
isc_stdtime_t now;
|
||||
dns_name_t signername; /* [T]SIG key name */
|
||||
dns_name_t * signer; /* NULL if not valid sig */
|
||||
isc_boolean_t mortal; /* Die after handling request */
|
||||
dns_name_t signername; /*%< [T]SIG key name */
|
||||
dns_name_t * signer; /*%< NULL if not valid sig */
|
||||
isc_boolean_t mortal; /*%< Die after handling request */
|
||||
isc_quota_t *tcpquota;
|
||||
isc_quota_t *recursionquota;
|
||||
ns_interface_t *interface;
|
||||
@ -132,7 +133,7 @@ struct ns_client {
|
||||
isc_boolean_t peeraddr_valid;
|
||||
struct in6_pktinfo pktinfo;
|
||||
isc_event_t ctlevent;
|
||||
/*
|
||||
/*%
|
||||
* Information about recent FORMERR response(s), for
|
||||
* FORMERR loop avoidance. This is separate for each
|
||||
* client object rather than global only to avoid
|
||||
@ -144,7 +145,7 @@ struct ns_client {
|
||||
dns_messageid_t id;
|
||||
} formerrcache;
|
||||
ISC_LINK(ns_client_t) link;
|
||||
/*
|
||||
/*%
|
||||
* The list 'link' is part of, or NULL if not on any list.
|
||||
*/
|
||||
client_list_t *list;
|
||||
@ -154,38 +155,42 @@ struct ns_client {
|
||||
#define NS_CLIENT_VALID(c) ISC_MAGIC_VALID(c, NS_CLIENT_MAGIC)
|
||||
|
||||
#define NS_CLIENTATTR_TCP 0x01
|
||||
#define NS_CLIENTATTR_RA 0x02 /* Client gets recusive service */
|
||||
#define NS_CLIENTATTR_PKTINFO 0x04 /* pktinfo is valid */
|
||||
#define NS_CLIENTATTR_MULTICAST 0x08 /* recv'd from multicast */
|
||||
#define NS_CLIENTATTR_WANTDNSSEC 0x10 /* include dnssec records */
|
||||
#define NS_CLIENTATTR_RA 0x02 /*%< Client gets recusive service */
|
||||
#define NS_CLIENTATTR_PKTINFO 0x04 /*%< pktinfo is valid */
|
||||
#define NS_CLIENTATTR_MULTICAST 0x08 /*%< recv'd from multicast */
|
||||
#define NS_CLIENTATTR_WANTDNSSEC 0x10 /*%< include dnssec records */
|
||||
|
||||
extern unsigned int ns_client_requests;
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Note! These ns_client_ routines MUST be called ONLY from the client's
|
||||
* task in order to ensure synchronization.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_send(ns_client_t *client);
|
||||
/*
|
||||
/*%
|
||||
* Finish processing the current client request and
|
||||
* send client->message as a response.
|
||||
* \brief
|
||||
* Note! These ns_client_ routines MUST be called ONLY from the client's
|
||||
* task in order to ensure synchronization.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_sendraw(ns_client_t *client, dns_message_t *msg);
|
||||
/*
|
||||
/*%
|
||||
* Finish processing the current client request and
|
||||
* send msg as a response using client->message->id for the id.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_error(ns_client_t *client, isc_result_t result);
|
||||
/*
|
||||
/*%
|
||||
* Finish processing the current client request and return
|
||||
* an error response to the client. The error response
|
||||
* will have an RCODE determined by 'result'.
|
||||
@ -193,38 +198,32 @@ ns_client_error(ns_client_t *client, isc_result_t result);
|
||||
|
||||
void
|
||||
ns_client_next(ns_client_t *client, isc_result_t result);
|
||||
/*
|
||||
/*%
|
||||
* Finish processing the current client request,
|
||||
* return no response to the client.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_qnamereplace(ns_client_t *client, dns_name_t *name);
|
||||
/*%
|
||||
* Replace the qname.
|
||||
*/
|
||||
|
||||
isc_boolean_t
|
||||
ns_client_shuttingdown(ns_client_t *client);
|
||||
/*
|
||||
/*%
|
||||
* Return ISC_TRUE iff the client is currently shutting down.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_attach(ns_client_t *source, ns_client_t **target);
|
||||
/*
|
||||
/*%
|
||||
* Attach '*targetp' to 'source'.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_detach(ns_client_t **clientp);
|
||||
/*
|
||||
/*%
|
||||
* Detach '*clientp' from its client.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_client_replace(ns_client_t *client);
|
||||
/*
|
||||
/*%
|
||||
* Try to replace the current client with a new one, so that the
|
||||
* current one can go off and do some lengthy work without
|
||||
* leaving the dispatch/socket without service.
|
||||
@ -232,20 +231,20 @@ ns_client_replace(ns_client_t *client);
|
||||
|
||||
void
|
||||
ns_client_settimeout(ns_client_t *client, unsigned int seconds);
|
||||
/*
|
||||
/*%
|
||||
* Set a timer in the client to go off in the specified amount of time.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_clientmgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
|
||||
isc_timermgr_t *timermgr, ns_clientmgr_t **managerp);
|
||||
/*
|
||||
/*%
|
||||
* Create a client manager.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_clientmgr_destroy(ns_clientmgr_t **managerp);
|
||||
/*
|
||||
/*%
|
||||
* Destroy a client manager and all ns_client_t objects
|
||||
* managed by it.
|
||||
*/
|
||||
@ -253,7 +252,7 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp);
|
||||
isc_result_t
|
||||
ns_clientmgr_createclients(ns_clientmgr_t *manager, unsigned int n,
|
||||
ns_interface_t *ifp, isc_boolean_t tcp);
|
||||
/*
|
||||
/*%
|
||||
* Create up to 'n' clients listening on interface 'ifp'.
|
||||
* If 'tcp' is ISC_TRUE, the clients will listen for TCP connections,
|
||||
* otherwise for UDP requests.
|
||||
@ -261,7 +260,7 @@ ns_clientmgr_createclients(ns_clientmgr_t *manager, unsigned int n,
|
||||
|
||||
isc_sockaddr_t *
|
||||
ns_client_getsockaddr(ns_client_t *client);
|
||||
/*
|
||||
/*%
|
||||
* Get the socket address of the client whose request is
|
||||
* currently being processed.
|
||||
*/
|
||||
@ -270,27 +269,27 @@ isc_result_t
|
||||
ns_client_checkaclsilent(ns_client_t *client,dns_acl_t *acl,
|
||||
isc_boolean_t default_allow);
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Convenience function for client request ACL checking.
|
||||
*
|
||||
* Check the current client request against 'acl'. If 'acl'
|
||||
* is NULL, allow the request iff 'default_allow' is ISC_TRUE.
|
||||
*
|
||||
* Notes:
|
||||
* This is appropriate for checking allow-update,
|
||||
*\li This is appropriate for checking allow-update,
|
||||
* allow-query, allow-transfer, etc. It is not appropriate
|
||||
* for checking the blackhole list because we treat positive
|
||||
* matches as "allow" and negative matches as "deny"; in
|
||||
* the case of the blackhole list this would be backwards.
|
||||
*
|
||||
* Requires:
|
||||
* 'client' points to a valid client.
|
||||
* 'acl' points to a valid ACL, or is NULL.
|
||||
*\li 'client' points to a valid client.
|
||||
*\li 'acl' points to a valid ACL, or is NULL.
|
||||
*
|
||||
* Returns:
|
||||
* ISC_R_SUCCESS if the request should be allowed
|
||||
* ISC_R_REFUSED if the request should be denied
|
||||
* No other return values are possible.
|
||||
*\li ISC_R_SUCCESS if the request should be allowed
|
||||
* \li ISC_R_REFUSED if the request should be denied
|
||||
*\li No other return values are possible.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
@ -298,16 +297,16 @@ ns_client_checkacl(ns_client_t *client,
|
||||
const char *opname, dns_acl_t *acl,
|
||||
isc_boolean_t default_allow,
|
||||
int log_level);
|
||||
/*
|
||||
/*%
|
||||
* Like ns_client_checkacl, but also logs the outcome of the
|
||||
* check at log level 'log_level' if denied, and at debug 3
|
||||
* if approved. Log messages will refer to the request as
|
||||
* an 'opname' request.
|
||||
*
|
||||
* Requires:
|
||||
* Those of ns_client_checkaclsilent(), and:
|
||||
*\li Those of ns_client_checkaclsilent(), and:
|
||||
*
|
||||
* 'opname' points to a null-terminated string.
|
||||
*\li 'opname' points to a null-terminated string.
|
||||
*/
|
||||
|
||||
void
|
||||
@ -330,8 +329,7 @@ ns_client_aclmsg(const char *msg, dns_name_t *name, dns_rdatatype_t type,
|
||||
void
|
||||
ns_client_recursing(ns_client_t *client);
|
||||
/*%
|
||||
* Add client to end of recursing list. If 'killoldest' is true
|
||||
* kill the oldest recursive client (list head).
|
||||
* Add client to end of th recursing list.
|
||||
*/
|
||||
|
||||
void
|
||||
@ -342,8 +340,22 @@ ns_client_killoldestquery(ns_client_t *client);
|
||||
|
||||
void
|
||||
ns_client_dumprecursing(FILE *f, ns_clientmgr_t *manager);
|
||||
/*
|
||||
/*%
|
||||
* Dump the outstanding recursive queries to 'f'.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_qnamereplace(ns_client_t *client, dns_name_t *name);
|
||||
/*%
|
||||
* Replace the qname.
|
||||
*/
|
||||
|
||||
isc_boolean_t
|
||||
ns_client_isself(dns_view_t *myview, dns_tsigkey_t *mykey,
|
||||
isc_sockaddr_t *srcaddr, isc_sockaddr_t *destaddr,
|
||||
dns_rdataclass_t rdclass, void *arg);
|
||||
/*%
|
||||
* Isself callback.
|
||||
*/
|
||||
|
||||
#endif /* NAMED_CLIENT_H */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2001, 2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,11 +15,13 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: config.h,v 1.4.12.6 2006/03/02 00:37:20 marka Exp $ */
|
||||
/* $Id: config.h,v 1.6.18.6 2006/02/28 03:10:47 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_CONFIG_H
|
||||
#define NAMED_CONFIG_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isccfg/cfg.h>
|
||||
|
||||
#include <dns/types.h>
|
||||
@ -71,6 +73,7 @@ isc_result_t
|
||||
ns_config_getport(const cfg_obj_t *config, in_port_t *portp);
|
||||
|
||||
isc_result_t
|
||||
ns_config_getkeyalgorithm(const char *str, dns_name_t **name);
|
||||
ns_config_getkeyalgorithm(const char *str, dns_name_t **name,
|
||||
isc_uint16_t *digestbits);
|
||||
|
||||
#endif /* NAMED_CONFIG_H */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2001-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,18 +15,20 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: control.h,v 1.6.2.2.2.9 2006/03/02 00:37:20 marka Exp $ */
|
||||
/* $Id: control.h,v 1.14.18.8 2006/03/09 23:46:20 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_CONTROL_H
|
||||
#define NAMED_CONTROL_H 1
|
||||
|
||||
/*
|
||||
/*! \file
|
||||
* \brief
|
||||
* The name server command channel.
|
||||
*/
|
||||
|
||||
#include <isccc/types.h>
|
||||
|
||||
#include <named/aclconf.h>
|
||||
#include <isccfg/aclconf.h>
|
||||
|
||||
#include <named/types.h>
|
||||
|
||||
#define NS_CONTROL_PORT 953
|
||||
@ -48,18 +50,21 @@
|
||||
#define NS_COMMAND_FREEZE "freeze"
|
||||
#define NS_COMMAND_UNFREEZE "unfreeze"
|
||||
#define NS_COMMAND_THAW "thaw"
|
||||
#define NS_COMMAND_TIMERPOKE "timerpoke"
|
||||
#define NS_COMMAND_RECURSING "recursing"
|
||||
#define NS_COMMAND_NULL "null"
|
||||
#define NS_COMMAND_NOTIFY "notify"
|
||||
#define NS_COMMAND_VALIDATION "validation"
|
||||
|
||||
isc_result_t
|
||||
ns_controls_create(ns_server_t *server, ns_controls_t **ctrlsp);
|
||||
/*
|
||||
/*%<
|
||||
* Create an initial, empty set of command channels for 'server'.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_controls_destroy(ns_controls_t **ctrlsp);
|
||||
/*
|
||||
/*%<
|
||||
* Destroy a set of command channels.
|
||||
*
|
||||
* Requires:
|
||||
@ -68,8 +73,8 @@ ns_controls_destroy(ns_controls_t **ctrlsp);
|
||||
|
||||
isc_result_t
|
||||
ns_controls_configure(ns_controls_t *controls, const cfg_obj_t *config,
|
||||
ns_aclconfctx_t *aclconfctx);
|
||||
/*
|
||||
cfg_aclconfctx_t *aclconfctx);
|
||||
/*%<
|
||||
* Configure zero or more command channels into 'controls'
|
||||
* as defined in the configuration parse tree 'config'.
|
||||
* The channels will evaluate ACLs in the context of
|
||||
@ -78,7 +83,7 @@ ns_controls_configure(ns_controls_t *controls, const cfg_obj_t *config,
|
||||
|
||||
void
|
||||
ns_controls_shutdown(ns_controls_t *controls);
|
||||
/*
|
||||
/*%<
|
||||
* Initiate shutdown of all the command channels in 'controls'.
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,11 +15,13 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: globals.h,v 1.59.68.7 2006/03/02 00:37:20 marka Exp $ */
|
||||
/* $Id: globals.h,v 1.64.18.4 2006/03/02 00:37:21 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_GLOBALS_H
|
||||
#define NAMED_GLOBALS_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/rwlock.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/net.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: interfacemgr.h,v 1.23.24.7 2004/04/29 01:31:22 marka Exp $ */
|
||||
/* $Id: interfacemgr.h,v 1.26.18.4 2005/04/27 05:00:35 sra Exp $ */
|
||||
|
||||
#ifndef NAMED_INTERFACEMGR_H
|
||||
#define NAMED_INTERFACEMGR_H 1
|
||||
@ -24,24 +24,23 @@
|
||||
***** Module Info
|
||||
*****/
|
||||
|
||||
/*
|
||||
* Interface manager
|
||||
*
|
||||
/*! \file
|
||||
* \brief
|
||||
* The interface manager monitors the operating system's list
|
||||
* of network interfaces, creating and destroying listeners
|
||||
* as needed.
|
||||
*
|
||||
* Reliability:
|
||||
* No impact expected.
|
||||
*\li No impact expected.
|
||||
*
|
||||
* Resources:
|
||||
*
|
||||
* Security:
|
||||
* The server will only be able to bind to the DNS port on
|
||||
* \li The server will only be able to bind to the DNS port on
|
||||
* newly discovered interfaces if it is running as root.
|
||||
*
|
||||
* Standards:
|
||||
* The API for scanning varies greatly among operating systems.
|
||||
*\li The API for scanning varies greatly among operating systems.
|
||||
* This module attempts to hide the differences.
|
||||
*/
|
||||
|
||||
@ -65,23 +64,24 @@
|
||||
#define IFACE_MAGIC ISC_MAGIC('I',':','-',')')
|
||||
#define NS_INTERFACE_VALID(t) ISC_MAGIC_VALID(t, IFACE_MAGIC)
|
||||
|
||||
#define NS_INTERFACEFLAG_ANYADDR 0x01U /* bound to "any" address */
|
||||
#define NS_INTERFACEFLAG_ANYADDR 0x01U /*%< bound to "any" address */
|
||||
|
||||
/*% The nameserver interface structure */
|
||||
struct ns_interface {
|
||||
unsigned int magic; /* Magic number. */
|
||||
ns_interfacemgr_t * mgr; /* Interface manager. */
|
||||
unsigned int magic; /*%< Magic number. */
|
||||
ns_interfacemgr_t * mgr; /*%< Interface manager. */
|
||||
isc_mutex_t lock;
|
||||
int references; /* Locked */
|
||||
unsigned int generation; /* Generation number. */
|
||||
isc_sockaddr_t addr; /* Address and port. */
|
||||
unsigned int flags; /* Interface characteristics */
|
||||
char name[32]; /* Null terminated. */
|
||||
dns_dispatch_t * udpdispatch; /* UDP dispatcher. */
|
||||
isc_socket_t * tcpsocket; /* TCP socket. */
|
||||
int ntcptarget; /* Desired number of concurrent
|
||||
TCP accepts */
|
||||
int ntcpcurrent; /* Current ditto, locked */
|
||||
ns_clientmgr_t * clientmgr; /* Client manager. */
|
||||
int references; /*%< Locked */
|
||||
unsigned int generation; /*%< Generation number. */
|
||||
isc_sockaddr_t addr; /*%< Address and port. */
|
||||
unsigned int flags; /*%< Interface characteristics */
|
||||
char name[32]; /*%< Null terminated. */
|
||||
dns_dispatch_t * udpdispatch; /*%< UDP dispatcher. */
|
||||
isc_socket_t * tcpsocket; /*%< TCP socket. */
|
||||
int ntcptarget; /*%< Desired number of concurrent
|
||||
TCP accepts */
|
||||
int ntcpcurrent; /*%< Current ditto, locked */
|
||||
ns_clientmgr_t * clientmgr; /*%< Client manager. */
|
||||
ISC_LINK(ns_interface_t) link;
|
||||
};
|
||||
|
||||
@ -94,7 +94,7 @@ ns_interfacemgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
|
||||
isc_socketmgr_t *socketmgr,
|
||||
dns_dispatchmgr_t *dispatchmgr,
|
||||
ns_interfacemgr_t **mgrp);
|
||||
/*
|
||||
/*%
|
||||
* Create a new interface manager.
|
||||
*
|
||||
* Initially, the new manager will not listen on any interfaces.
|
||||
@ -113,7 +113,7 @@ ns_interfacemgr_shutdown(ns_interfacemgr_t *mgr);
|
||||
|
||||
void
|
||||
ns_interfacemgr_scan(ns_interfacemgr_t *mgr, isc_boolean_t verbose);
|
||||
/*
|
||||
/*%
|
||||
* Scan the operatings system's list of network interfaces
|
||||
* and create listeners when new interfaces are discovered.
|
||||
* Shut down the sockets for interfaces that go away.
|
||||
@ -126,7 +126,7 @@ ns_interfacemgr_scan(ns_interfacemgr_t *mgr, isc_boolean_t verbose);
|
||||
void
|
||||
ns_interfacemgr_adjust(ns_interfacemgr_t *mgr, ns_listenlist_t *list,
|
||||
isc_boolean_t verbose);
|
||||
/*
|
||||
/*%
|
||||
* Similar to ns_interfacemgr_scan(), but this function also tries to see the
|
||||
* need for an explicit listen-on when a list element in 'list' is going to
|
||||
* override an already-listening a wildcard interface.
|
||||
@ -139,14 +139,14 @@ ns_interfacemgr_adjust(ns_interfacemgr_t *mgr, ns_listenlist_t *list,
|
||||
|
||||
void
|
||||
ns_interfacemgr_setlistenon4(ns_interfacemgr_t *mgr, ns_listenlist_t *value);
|
||||
/*
|
||||
/*%
|
||||
* Set the IPv4 "listen-on" list of 'mgr' to 'value'.
|
||||
* The previous IPv4 listen-on list is freed.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_interfacemgr_setlistenon6(ns_interfacemgr_t *mgr, ns_listenlist_t *value);
|
||||
/*
|
||||
/*%
|
||||
* Set the IPv6 "listen-on" list of 'mgr' to 'value'.
|
||||
* The previous IPv6 listen-on list is freed.
|
||||
*/
|
||||
@ -162,7 +162,7 @@ ns_interface_detach(ns_interface_t **targetp);
|
||||
|
||||
void
|
||||
ns_interface_shutdown(ns_interface_t *ifp);
|
||||
/*
|
||||
/*%
|
||||
* Stop listening for queries on interface 'ifp'.
|
||||
* May safely be called multiple times.
|
||||
*/
|
||||
@ -170,4 +170,7 @@ ns_interface_shutdown(ns_interface_t *ifp);
|
||||
void
|
||||
ns_interfacemgr_dumprecursing(FILE *f, ns_interfacemgr_t *mgr);
|
||||
|
||||
isc_boolean_t
|
||||
ns_interfacemgr_listeningon(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr);
|
||||
|
||||
#endif /* NAMED_INTERFACEMGR_H */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: listenlist.h,v 1.10.208.1 2004/03/06 10:21:24 marka Exp $ */
|
||||
/* $Id: listenlist.h,v 1.11.18.2 2005/04/29 00:15:34 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_LISTENLIST_H
|
||||
#define NAMED_LISTENLIST_H 1
|
||||
@ -24,7 +24,8 @@
|
||||
***** Module Info
|
||||
*****/
|
||||
|
||||
/*
|
||||
/*! \file
|
||||
* \brief
|
||||
* "Listen lists", as in the "listen-on" configuration statement.
|
||||
*/
|
||||
|
||||
@ -62,38 +63,38 @@ struct ns_listenlist {
|
||||
isc_result_t
|
||||
ns_listenelt_create(isc_mem_t *mctx, in_port_t port,
|
||||
dns_acl_t *acl, ns_listenelt_t **target);
|
||||
/*
|
||||
/*%
|
||||
* Create a listen-on list element.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_listenelt_destroy(ns_listenelt_t *elt);
|
||||
/*
|
||||
/*%
|
||||
* Destroy a listen-on list element.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_listenlist_create(isc_mem_t *mctx, ns_listenlist_t **target);
|
||||
/*
|
||||
/*%
|
||||
* Create a new, empty listen-on list.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_listenlist_attach(ns_listenlist_t *source, ns_listenlist_t **target);
|
||||
/*
|
||||
/*%
|
||||
* Attach '*target' to '*source'.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_listenlist_detach(ns_listenlist_t **listp);
|
||||
/*
|
||||
/*%
|
||||
* Detach 'listp'.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_listenlist_default(isc_mem_t *mctx, in_port_t port,
|
||||
isc_boolean_t enabled, ns_listenlist_t **target);
|
||||
/*
|
||||
/*%
|
||||
* Create a listen-on list with default contents, matching
|
||||
* all addresses with port 'port' (if 'enabled' is ISC_TRUE),
|
||||
* or no addresses (if 'enabled' is ISC_FALSE).
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,11 +15,13 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: log.h,v 1.19.12.3 2004/03/08 04:04:21 marka Exp $ */
|
||||
/* $Id: log.h,v 1.21.18.2 2005/04/29 00:15:35 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_LOG_H
|
||||
#define NAMED_LOG_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/log.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
@ -54,7 +56,7 @@
|
||||
|
||||
isc_result_t
|
||||
ns_log_init(isc_boolean_t safe);
|
||||
/*
|
||||
/*%
|
||||
* Initialize the logging system and set up an initial default
|
||||
* logging default configuration that will be used until the
|
||||
* config file has been read.
|
||||
@ -66,7 +68,7 @@ ns_log_init(isc_boolean_t safe);
|
||||
|
||||
isc_result_t
|
||||
ns_log_setdefaultchannels(isc_logconfig_t *lcfg);
|
||||
/*
|
||||
/*%
|
||||
* Set up logging channels according to the named defaults, which
|
||||
* may differ from the logging library defaults. Currently,
|
||||
* this just means setting up default_debug.
|
||||
@ -74,19 +76,19 @@ ns_log_setdefaultchannels(isc_logconfig_t *lcfg);
|
||||
|
||||
isc_result_t
|
||||
ns_log_setsafechannels(isc_logconfig_t *lcfg);
|
||||
/*
|
||||
/*%
|
||||
* Like ns_log_setdefaultchannels(), but omits any logging to files.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_log_setdefaultcategory(isc_logconfig_t *lcfg);
|
||||
/*
|
||||
/*%
|
||||
* Set up "category default" to go to the right places.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_log_setunmatchedcategory(isc_logconfig_t *lcfg);
|
||||
/*
|
||||
/*%
|
||||
* Set up "category unmatched" to go to the right places.
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,16 +15,18 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: logconf.h,v 1.10.208.3 2006/03/02 00:37:20 marka Exp $ */
|
||||
/* $Id: logconf.h,v 1.11.18.4 2006/03/02 00:37:21 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_LOGCONF_H
|
||||
#define NAMED_LOGCONF_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/log.h>
|
||||
|
||||
isc_result_t
|
||||
ns_log_configure(isc_logconfig_t *logconf, const cfg_obj_t *logstmt);
|
||||
/*
|
||||
/*%<
|
||||
* Set up the logging configuration in '*logconf' according to
|
||||
* the named.conf data in 'logstmt'.
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwaddr.h,v 1.3.208.1 2004/03/06 10:21:24 marka Exp $ */
|
||||
/* $Id: lwaddr.h,v 1.4.18.2 2005/04/29 00:15:35 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <lwres/lwres.h>
|
||||
#include <lwres/net.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,11 +15,13 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwdclient.h,v 1.13.208.1 2004/03/06 10:21:24 marka Exp $ */
|
||||
/* $Id: lwdclient.h,v 1.14.18.2 2005/04/29 00:15:36 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_LWDCLIENT_H
|
||||
#define NAMED_LWDCLIENT_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/event.h>
|
||||
#include <isc/eventclass.h>
|
||||
#include <isc/netaddr.h>
|
||||
@ -37,23 +39,24 @@
|
||||
|
||||
#define LWRD_SHUTDOWN (LWRD_EVENTCLASS + 0x0001)
|
||||
|
||||
/*% Lighweight Resolver Daemon Client */
|
||||
struct ns_lwdclient {
|
||||
isc_sockaddr_t address; /* where to reply */
|
||||
isc_sockaddr_t address; /*%< where to reply */
|
||||
struct in6_pktinfo pktinfo;
|
||||
isc_boolean_t pktinfo_valid;
|
||||
ns_lwdclientmgr_t *clientmgr; /* our parent */
|
||||
ns_lwdclientmgr_t *clientmgr; /*%< our parent */
|
||||
ISC_LINK(ns_lwdclient_t) link;
|
||||
unsigned int state;
|
||||
void *arg; /* packet processing state */
|
||||
void *arg; /*%< packet processing state */
|
||||
|
||||
/*
|
||||
* Received data info.
|
||||
*/
|
||||
unsigned char buffer[LWRES_RECVLENGTH]; /* receive buffer */
|
||||
isc_uint32_t recvlength; /* length recv'd */
|
||||
unsigned char buffer[LWRES_RECVLENGTH]; /*%< receive buffer */
|
||||
isc_uint32_t recvlength; /*%< length recv'd */
|
||||
lwres_lwpacket_t pkt;
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Send data state. If sendbuf != buffer (that is, the send buffer
|
||||
* isn't our receive buffer) it will be freed to the lwres_context_t.
|
||||
*/
|
||||
@ -61,19 +64,19 @@ struct ns_lwdclient {
|
||||
isc_uint32_t sendlength;
|
||||
isc_buffer_t recv_buffer;
|
||||
|
||||
/*
|
||||
/*%
|
||||
* gabn (get address by name) state info.
|
||||
*/
|
||||
dns_adbfind_t *find;
|
||||
dns_adbfind_t *v4find;
|
||||
dns_adbfind_t *v6find;
|
||||
unsigned int find_wanted; /* Addresses we want */
|
||||
unsigned int find_wanted; /*%< Addresses we want */
|
||||
dns_fixedname_t query_name;
|
||||
dns_fixedname_t target_name;
|
||||
ns_lwsearchctx_t searchctx;
|
||||
lwres_gabnresponse_t gabn;
|
||||
|
||||
/*
|
||||
/*%
|
||||
* gnba (get name by address) state info.
|
||||
*/
|
||||
lwres_gnbaresponse_t gnba;
|
||||
@ -81,7 +84,7 @@ struct ns_lwdclient {
|
||||
unsigned int options;
|
||||
isc_netaddr_t na;
|
||||
|
||||
/*
|
||||
/*%
|
||||
* grbn (get rrset by name) state info.
|
||||
*
|
||||
* Note: this also uses target_name and searchctx.
|
||||
@ -90,7 +93,7 @@ struct ns_lwdclient {
|
||||
dns_lookup_t *lookup;
|
||||
dns_rdatatype_t rdtype;
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Alias and address info. This is copied up to the gabn/gnba
|
||||
* structures eventually.
|
||||
*
|
||||
@ -103,7 +106,7 @@ struct ns_lwdclient {
|
||||
lwres_addr_t addrs[LWRES_MAX_ADDRS];
|
||||
};
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Client states.
|
||||
*
|
||||
* _IDLE The client is not doing anything at all.
|
||||
@ -156,7 +159,7 @@ struct ns_lwdclient {
|
||||
#define NS_LWDCLIENT_ISSEND(c) \
|
||||
((c)->state == NS_LWDCLIENT_STATESEND)
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Overall magic test that means we're not idle.
|
||||
*/
|
||||
#define NS_LWDCLIENT_ISRUNNING(c) (!NS_LWDCLIENT_ISIDLE(c))
|
||||
@ -174,17 +177,18 @@ struct ns_lwdclient {
|
||||
#define NS_LWDCLIENT_SETSENDDONE(c) \
|
||||
((c)->state = NS_LWDCLIENT_STATESENDDONE)
|
||||
|
||||
/*% lightweight daemon client manager */
|
||||
struct ns_lwdclientmgr {
|
||||
ns_lwreslistener_t *listener;
|
||||
isc_mem_t *mctx;
|
||||
isc_socket_t *sock; /* socket to use */
|
||||
isc_socket_t *sock; /*%< socket to use */
|
||||
dns_view_t *view;
|
||||
lwres_context_t *lwctx; /* lightweight proto context */
|
||||
isc_task_t *task; /* owning task */
|
||||
lwres_context_t *lwctx; /*%< lightweight proto context */
|
||||
isc_task_t *task; /*%< owning task */
|
||||
unsigned int flags;
|
||||
ISC_LINK(ns_lwdclientmgr_t) link;
|
||||
ISC_LIST(ns_lwdclient_t) idle; /* idle client slots */
|
||||
ISC_LIST(ns_lwdclient_t) running; /* running clients */
|
||||
ISC_LIST(ns_lwdclient_t) idle; /*%< idle client slots */
|
||||
ISC_LIST(ns_lwdclient_t) running; /*%< running clients */
|
||||
};
|
||||
|
||||
#define NS_LWDCLIENTMGR_FLAGRECVPENDING 0x00000001
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,11 +15,13 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwresd.h,v 1.12.208.3 2006/03/02 00:37:20 marka Exp $ */
|
||||
/* $Id: lwresd.h,v 1.13.18.4 2006/03/02 00:37:21 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_LWRESD_H
|
||||
#define NAMED_LWRESD_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/types.h>
|
||||
#include <isc/sockaddr.h>
|
||||
|
||||
@ -52,7 +54,7 @@ struct ns_lwreslistener {
|
||||
ISC_LINK(ns_lwreslistener_t) link;
|
||||
};
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Configure lwresd.
|
||||
*/
|
||||
isc_result_t
|
||||
@ -62,7 +64,7 @@ isc_result_t
|
||||
ns_lwresd_parseeresolvconf(isc_mem_t *mctx, cfg_parser_t *pctx,
|
||||
cfg_obj_t **configp);
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Trigger shutdown.
|
||||
*/
|
||||
void
|
||||
@ -71,29 +73,36 @@ ns_lwresd_shutdown(void);
|
||||
/*
|
||||
* Manager functions
|
||||
*/
|
||||
/*% create manager */
|
||||
isc_result_t
|
||||
ns_lwdmanager_create(isc_mem_t *mctx, const cfg_obj_t *lwres,
|
||||
ns_lwresd_t **lwresdp);
|
||||
|
||||
/*% attach to manager */
|
||||
void
|
||||
ns_lwdmanager_attach(ns_lwresd_t *source, ns_lwresd_t **targetp);
|
||||
|
||||
/*% detach from manager */
|
||||
void
|
||||
ns_lwdmanager_detach(ns_lwresd_t **lwresdp);
|
||||
|
||||
/*
|
||||
* Listener functions
|
||||
*/
|
||||
/*% attach to listener */
|
||||
void
|
||||
ns_lwreslistener_attach(ns_lwreslistener_t *source,
|
||||
ns_lwreslistener_t **targetp);
|
||||
|
||||
/*% detach from lister */
|
||||
void
|
||||
ns_lwreslistener_detach(ns_lwreslistener_t **listenerp);
|
||||
|
||||
/*% link client manager */
|
||||
void
|
||||
ns_lwreslistener_unlinkcm(ns_lwreslistener_t *listener, ns_lwdclientmgr_t *cm);
|
||||
|
||||
/*% unlink client manager */
|
||||
void
|
||||
ns_lwreslistener_linkcm(ns_lwreslistener_t *listener, ns_lwdclientmgr_t *cm);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwsearch.h,v 1.4.208.1 2004/03/06 10:21:25 marka Exp $ */
|
||||
/* $Id: lwsearch.h,v 1.5.18.2 2005/04/29 00:15:36 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_LWSEARCH_H
|
||||
#define NAMED_LWSEARCH_H 1
|
||||
@ -28,7 +28,8 @@
|
||||
|
||||
#include <named/types.h>
|
||||
|
||||
/*
|
||||
/*! \file
|
||||
* \brief
|
||||
* Lightweight resolver search list types and routines.
|
||||
*
|
||||
* An ns_lwsearchlist_t holds a list of search path elements.
|
||||
@ -37,6 +38,7 @@
|
||||
* operation.
|
||||
*/
|
||||
|
||||
/*% An ns_lwsearchlist_t holds a list of search path elements. */
|
||||
struct ns_lwsearchlist {
|
||||
unsigned int magic;
|
||||
|
||||
@ -45,7 +47,7 @@ struct ns_lwsearchlist {
|
||||
unsigned int refs;
|
||||
dns_namelist_t names;
|
||||
};
|
||||
|
||||
/*% An ns_lwsearchctx stores the state of search list during a lookup operation. */
|
||||
struct ns_lwsearchctx {
|
||||
dns_name_t *relname;
|
||||
dns_name_t *searchname;
|
||||
@ -57,51 +59,51 @@ struct ns_lwsearchctx {
|
||||
|
||||
isc_result_t
|
||||
ns_lwsearchlist_create(isc_mem_t *mctx, ns_lwsearchlist_t **listp);
|
||||
/*
|
||||
/*%<
|
||||
* Create an empty search list object.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_lwsearchlist_attach(ns_lwsearchlist_t *source, ns_lwsearchlist_t **target);
|
||||
/*
|
||||
/*%<
|
||||
* Attach to a search list object.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_lwsearchlist_detach(ns_lwsearchlist_t **listp);
|
||||
/*
|
||||
/*%<
|
||||
* Detach from a search list object.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_lwsearchlist_append(ns_lwsearchlist_t *list, dns_name_t *name);
|
||||
/*
|
||||
/*%<
|
||||
* Append an element to a search list. This creates a copy of the name.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_lwsearchctx_init(ns_lwsearchctx_t *sctx, ns_lwsearchlist_t *list,
|
||||
dns_name_t *name, unsigned int ndots);
|
||||
/*
|
||||
/*%<
|
||||
* Creates a search list context structure.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_lwsearchctx_first(ns_lwsearchctx_t *sctx);
|
||||
/*
|
||||
/*%<
|
||||
* Moves the search list context iterator to the first element, which
|
||||
* is usually the exact name.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_lwsearchctx_next(ns_lwsearchctx_t *sctx);
|
||||
/*
|
||||
/*%<
|
||||
* Moves the search list context iterator to the next element.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_lwsearchctx_current(ns_lwsearchctx_t *sctx, dns_name_t *absname);
|
||||
/*
|
||||
/*%<
|
||||
* Obtains the current name to be looked up. This involves either
|
||||
* concatenating the name with a search path element, making an
|
||||
* exact name absolute, or doing nothing.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,11 +15,13 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: main.h,v 1.8.2.2.8.4 2004/03/08 04:04:21 marka Exp $ */
|
||||
/* $Id: main.h,v 1.11.18.2 2005/04/29 00:15:37 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_MAIN_H
|
||||
#define NAMED_MAIN_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
void
|
||||
ns_main_earlyfatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: notify.h,v 1.9.208.1 2004/03/06 10:21:25 marka Exp $ */
|
||||
/* $Id: notify.h,v 1.10.18.2 2005/04/29 00:15:37 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_NOTIFY_H
|
||||
#define NAMED_NOTIFY_H 1
|
||||
@ -27,8 +27,9 @@
|
||||
*** Module Info
|
||||
***/
|
||||
|
||||
/*
|
||||
* RFC 1996
|
||||
/*! \file
|
||||
* \brief
|
||||
* RFC1996
|
||||
* A Mechanism for Prompt Notification of Zone Changes (DNS NOTIFY)
|
||||
*/
|
||||
|
||||
@ -39,7 +40,7 @@
|
||||
void
|
||||
ns_notify_start(ns_client_t *client);
|
||||
|
||||
/*
|
||||
/*%<
|
||||
* Examines the incoming message to determine apporiate zone.
|
||||
* Returns FORMERR if there is not exactly one question.
|
||||
* Returns REFUSED if we do not serve the listed zone.
|
||||
@ -47,7 +48,7 @@ ns_notify_start(ns_client_t *client);
|
||||
* and returns the return status.
|
||||
*
|
||||
* Requires
|
||||
* client to be valid.
|
||||
*\li client to be valid.
|
||||
*/
|
||||
|
||||
#endif /* NAMED_NOTIFY_H */
|
||||
|
@ -14,7 +14,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: ns_smf_globals.h,v 1.2.4.4 2005/05/13 01:22:33 marka Exp $ */
|
||||
/* $Id: ns_smf_globals.h,v 1.2.2.4 2005/05/13 01:32:46 marka Exp $ */
|
||||
|
||||
#ifndef NS_SMF_GLOBALS_H
|
||||
#define NS_SMF_GLOBALS_H 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,11 +15,13 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: query.h,v 1.28.2.3.8.6 2004/03/08 04:04:21 marka Exp $ */
|
||||
/* $Id: query.h,v 1.36.18.2 2005/04/29 00:15:37 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_QUERY_H
|
||||
#define NAMED_QUERY_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/types.h>
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/netaddr.h>
|
||||
@ -28,6 +30,7 @@
|
||||
|
||||
#include <named/types.h>
|
||||
|
||||
/*% nameserver database version structure */
|
||||
typedef struct ns_dbversion {
|
||||
dns_db_t *db;
|
||||
dns_dbversion_t *version;
|
||||
@ -35,6 +38,7 @@ typedef struct ns_dbversion {
|
||||
ISC_LINK(struct ns_dbversion) link;
|
||||
} ns_dbversion_t;
|
||||
|
||||
/*% nameserver query structure */
|
||||
struct ns_query {
|
||||
unsigned int attributes;
|
||||
unsigned int restarts;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,11 +15,13 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: server.h,v 1.58.2.1.10.13 2006/03/02 00:37:20 marka Exp $ */
|
||||
/* $Id: server.h,v 1.73.18.8 2006/03/09 23:46:20 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_SERVER_H
|
||||
#define NAMED_SERVER_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/log.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/magic.h>
|
||||
@ -35,7 +37,7 @@
|
||||
#define NS_EVENT_RELOAD (NS_EVENTCLASS + 0)
|
||||
#define NS_EVENT_CLIENTCONTROL (NS_EVENTCLASS + 1)
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Name server state. Better here than in lots of separate global variables.
|
||||
*/
|
||||
struct ns_server {
|
||||
@ -49,18 +51,18 @@ struct ns_server {
|
||||
isc_quota_t tcpquota;
|
||||
isc_quota_t recursionquota;
|
||||
dns_acl_t *blackholeacl;
|
||||
char * statsfile; /* Statistics file name */
|
||||
char * dumpfile; /* Dump file name */
|
||||
char * recfile; /* Recursive file name */
|
||||
isc_boolean_t version_set; /* User has set version */
|
||||
char * version; /* User-specified version */
|
||||
isc_boolean_t hostname_set; /* User has set hostname */
|
||||
char * hostname; /* User-specified hostname */
|
||||
/* Use hostname for server id */
|
||||
char * statsfile; /*%< Statistics file name */
|
||||
char * dumpfile; /*%< Dump file name */
|
||||
char * recfile; /*%< Recursive file name */
|
||||
isc_boolean_t version_set; /*%< User has set version */
|
||||
char * version; /*%< User-specified version */
|
||||
isc_boolean_t hostname_set; /*%< User has set hostname */
|
||||
char * hostname; /*%< User-specified hostname */
|
||||
/*% Use hostname for server id */
|
||||
isc_boolean_t server_usehostname;
|
||||
char * server_id; /* User-specified server id */
|
||||
char * server_id; /*%< User-specified server id */
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Current ACL environment. This defines the
|
||||
* current values of the localhost and localnets
|
||||
* ACLs.
|
||||
@ -77,6 +79,8 @@ struct ns_server {
|
||||
|
||||
isc_timer_t * interface_timer;
|
||||
isc_timer_t * heartbeat_timer;
|
||||
isc_timer_t * pps_timer;
|
||||
|
||||
isc_uint32_t interface_interval;
|
||||
isc_uint32_t heartbeat_interval;
|
||||
|
||||
@ -84,14 +88,15 @@ struct ns_server {
|
||||
isc_event_t * reload_event;
|
||||
|
||||
isc_boolean_t flushonshutdown;
|
||||
isc_boolean_t log_queries; /* For BIND 8 compatibility */
|
||||
isc_boolean_t log_queries; /*%< For BIND 8 compatibility */
|
||||
|
||||
isc_uint64_t * querystats; /* Query statistics counters */
|
||||
isc_uint64_t * querystats; /*%< Query statistics counters */
|
||||
|
||||
ns_controls_t * controls; /* Control channels */
|
||||
ns_controls_t * controls; /*%< Control channels */
|
||||
unsigned int dispatchgen;
|
||||
ns_dispatchlist_t dispatches;
|
||||
|
||||
|
||||
dns_acache_t *acache;
|
||||
};
|
||||
|
||||
#define NS_SERVER_MAGIC ISC_MAGIC('S','V','E','R')
|
||||
@ -99,7 +104,7 @@ struct ns_server {
|
||||
|
||||
void
|
||||
ns_server_create(isc_mem_t *mctx, ns_server_t **serverp);
|
||||
/*
|
||||
/*%<
|
||||
* Create a server object with default settings.
|
||||
* This function either succeeds or causes the program to exit
|
||||
* with a fatal error.
|
||||
@ -107,13 +112,13 @@ ns_server_create(isc_mem_t *mctx, ns_server_t **serverp);
|
||||
|
||||
void
|
||||
ns_server_destroy(ns_server_t **serverp);
|
||||
/*
|
||||
/*%<
|
||||
* Destroy a server object, freeing its memory.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_server_reloadwanted(ns_server_t *server);
|
||||
/*
|
||||
/*%<
|
||||
* Inform a server that a reload is wanted. This function
|
||||
* may be called asynchronously, from outside the server's task.
|
||||
* If a reload is already scheduled or in progress, the call
|
||||
@ -122,92 +127,104 @@ ns_server_reloadwanted(ns_server_t *server);
|
||||
|
||||
void
|
||||
ns_server_flushonshutdown(ns_server_t *server, isc_boolean_t flush);
|
||||
/*
|
||||
/*%<
|
||||
* Inform the server that the zones should be flushed to disk on shutdown.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_server_reloadcommand(ns_server_t *server, char *args, isc_buffer_t *text);
|
||||
/*
|
||||
/*%<
|
||||
* Act on a "reload" command from the command channel.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_server_reconfigcommand(ns_server_t *server, char *args);
|
||||
/*
|
||||
/*%<
|
||||
* Act on a "reconfig" command from the command channel.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_server_notifycommand(ns_server_t *server, char *args, isc_buffer_t *text);
|
||||
/*%<
|
||||
* Act on a "notify" command from the command channel.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_server_refreshcommand(ns_server_t *server, char *args, isc_buffer_t *text);
|
||||
/*
|
||||
/*%<
|
||||
* Act on a "refresh" command from the command channel.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_server_retransfercommand(ns_server_t *server, char *args);
|
||||
/*
|
||||
/*%<
|
||||
* Act on a "retransfer" command from the command channel.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_server_togglequerylog(ns_server_t *server);
|
||||
/*
|
||||
/*%<
|
||||
* Toggle logging of queries, as in BIND 8.
|
||||
*/
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Dump the current statistics to the statistics file.
|
||||
*/
|
||||
isc_result_t
|
||||
ns_server_dumpstats(ns_server_t *server);
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Dump the current cache to the dump file.
|
||||
*/
|
||||
isc_result_t
|
||||
ns_server_dumpdb(ns_server_t *server, char *args);
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Change or increment the server debug level.
|
||||
*/
|
||||
isc_result_t
|
||||
ns_server_setdebuglevel(ns_server_t *server, char *args);
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Flush the server's cache(s)
|
||||
*/
|
||||
isc_result_t
|
||||
ns_server_flushcache(ns_server_t *server, char *args);
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Flush a particular name from the server's cache(s)
|
||||
*/
|
||||
isc_result_t
|
||||
ns_server_flushname(ns_server_t *server, char *args);
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Report the server's status.
|
||||
*/
|
||||
isc_result_t
|
||||
ns_server_status(ns_server_t *server, isc_buffer_t *text);
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Enable or disable updates for a zone.
|
||||
*/
|
||||
isc_result_t
|
||||
ns_server_freeze(ns_server_t *server, isc_boolean_t freeze, char *args);
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Dump the current recursive queries.
|
||||
*/
|
||||
isc_result_t
|
||||
ns_server_dumprecursing(ns_server_t *server);
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Maintain a list of dispatches that require reserved ports.
|
||||
*/
|
||||
void
|
||||
ns_add_reserved_dispatch(ns_server_t *server, const isc_sockaddr_t *addr);
|
||||
|
||||
/*%
|
||||
* Enable or disable dnssec validation.
|
||||
*/
|
||||
isc_result_t
|
||||
ns_server_validation(ns_server_t *server, char *args);
|
||||
|
||||
#endif /* NAMED_SERVER_H */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,22 +15,24 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: sortlist.h,v 1.4.208.3 2006/03/02 00:37:20 marka Exp $ */
|
||||
/* $Id: sortlist.h,v 1.5.18.4 2006/03/02 00:37:21 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_SORTLIST_H
|
||||
#define NAMED_SORTLIST_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <dns/types.h>
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Type for callback functions that rank addresses.
|
||||
*/
|
||||
typedef int
|
||||
(*dns_addressorderfunc_t)(const isc_netaddr_t *address, const void *arg);
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Return value type for setup_sortlist.
|
||||
*/
|
||||
typedef enum {
|
||||
@ -42,7 +44,7 @@ typedef enum {
|
||||
ns_sortlisttype_t
|
||||
ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr,
|
||||
const void **argp);
|
||||
/*
|
||||
/*%<
|
||||
* Find the sortlist statement in 'acl' that applies to 'clientaddr', if any.
|
||||
*
|
||||
* If a 1-element sortlist item applies, return NS_SORTLISTTYPE_1ELEMENT and
|
||||
@ -57,14 +59,14 @@ ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr,
|
||||
|
||||
int
|
||||
ns_sortlist_addrorder1(const isc_netaddr_t *addr, const void *arg);
|
||||
/*
|
||||
/*%<
|
||||
* Find the sort order of 'addr' in 'arg', the matching element
|
||||
* of a 1-element top-level sortlist statement.
|
||||
*/
|
||||
|
||||
int
|
||||
ns_sortlist_addrorder2(const isc_netaddr_t *addr, const void *arg);
|
||||
/*
|
||||
/*%<
|
||||
* Find the sort order of 'addr' in 'arg', a topology-like
|
||||
* ACL forming the second element in a 2-element top-level
|
||||
* sortlist statement.
|
||||
@ -74,7 +76,7 @@ void
|
||||
ns_sortlist_byaddrsetup(dns_acl_t *sortlist_acl, isc_netaddr_t *client_addr,
|
||||
dns_addressorderfunc_t *orderp,
|
||||
const void **argp);
|
||||
/*
|
||||
/*%<
|
||||
* Find the sortlist statement in 'acl' that applies to 'clientaddr', if any.
|
||||
* If a sortlist statement applies, return in '*orderp' a pointer to a function
|
||||
* for ranking network addresses based on that sortlist statement, and in
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,11 +15,13 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: tkeyconf.h,v 1.9.208.3 2006/03/02 00:37:20 marka Exp $ */
|
||||
/* $Id: tkeyconf.h,v 1.10.18.4 2006/03/02 00:37:21 marka Exp $ */
|
||||
|
||||
#ifndef NS_TKEYCONF_H
|
||||
#define NS_TKEYCONF_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/types.h>
|
||||
#include <isc/lang.h>
|
||||
|
||||
@ -30,20 +32,20 @@ ISC_LANG_BEGINDECLS
|
||||
isc_result_t
|
||||
ns_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
|
||||
isc_entropy_t *ectx, dns_tkeyctx_t **tctxp);
|
||||
/*
|
||||
/*%<
|
||||
* Create a TKEY context and configure it, including the default DH key
|
||||
* and default domain, according to 'options'.
|
||||
*
|
||||
* Requires:
|
||||
* 'cfg' is a valid configuration options object.
|
||||
* 'mctx' is not NULL
|
||||
* 'ectx' is not NULL
|
||||
* 'tctx' is not NULL
|
||||
* '*tctx' is NULL
|
||||
*\li 'cfg' is a valid configuration options object.
|
||||
*\li 'mctx' is not NULL
|
||||
*\li 'ectx' is not NULL
|
||||
*\li 'tctx' is not NULL
|
||||
*\li '*tctx' is NULL
|
||||
*
|
||||
* Returns:
|
||||
* ISC_R_SUCCESS
|
||||
* ISC_R_NOMEMORY
|
||||
*\li ISC_R_SUCCESS
|
||||
*\li ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,11 +15,13 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: tsigconf.h,v 1.9.208.3 2006/03/02 00:37:20 marka Exp $ */
|
||||
/* $Id: tsigconf.h,v 1.10.18.4 2006/03/02 00:37:21 marka Exp $ */
|
||||
|
||||
#ifndef NS_TSIGCONF_H
|
||||
#define NS_TSIGCONF_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/types.h>
|
||||
#include <isc/lang.h>
|
||||
|
||||
@ -28,18 +30,18 @@ ISC_LANG_BEGINDECLS
|
||||
isc_result_t
|
||||
ns_tsigkeyring_fromconfig(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
isc_mem_t *mctx, dns_tsig_keyring_t **ringp);
|
||||
/*
|
||||
/*%<
|
||||
* Create a TSIG key ring and configure it according to the 'key'
|
||||
* statements in the global and view configuration objects.
|
||||
*
|
||||
* Requires:
|
||||
* 'config' is not NULL.
|
||||
* 'mctx' is not NULL
|
||||
* 'ring' is not NULL, and '*ring' is NULL
|
||||
* \li 'config' is not NULL.
|
||||
* \li 'mctx' is not NULL
|
||||
* \li 'ring' is not NULL, and '*ring' is NULL
|
||||
*
|
||||
* Returns:
|
||||
* ISC_R_SUCCESS
|
||||
* ISC_R_NOMEMORY
|
||||
* \li ISC_R_SUCCESS
|
||||
* \li ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,11 +15,13 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: types.h,v 1.19.208.2 2004/03/06 10:21:26 marka Exp $ */
|
||||
/* $Id: types.h,v 1.21.18.2 2005/04/29 00:15:38 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_TYPES_H
|
||||
#define NAMED_TYPES_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <dns/types.h>
|
||||
|
||||
typedef struct ns_client ns_client_t;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: update.h,v 1.8.208.1 2004/03/06 10:21:26 marka Exp $ */
|
||||
/* $Id: update.h,v 1.9.18.2 2005/04/29 00:15:39 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_UPDATE_H
|
||||
#define NAMED_UPDATE_H 1
|
||||
@ -24,7 +24,8 @@
|
||||
***** Module Info
|
||||
*****/
|
||||
|
||||
/*
|
||||
/*! \file
|
||||
* \brief
|
||||
* RFC2136 Dynamic Update
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: xfrout.h,v 1.7.208.1 2004/03/06 10:21:27 marka Exp $ */
|
||||
/* $Id: xfrout.h,v 1.8.18.2 2005/04/29 00:15:39 marka Exp $ */
|
||||
|
||||
#ifndef NAMED_XFROUT_H
|
||||
#define NAMED_XFROUT_H 1
|
||||
@ -24,7 +24,8 @@
|
||||
***** Module Info
|
||||
*****/
|
||||
|
||||
/*
|
||||
/*! \file
|
||||
* \brief
|
||||
* Outgoing zone transfers (AXFR + IXFR).
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,25 +15,26 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: zoneconf.h,v 1.16.2.2.8.3 2006/03/02 00:37:20 marka Exp $ */
|
||||
/* $Id: zoneconf.h,v 1.19.18.5 2006/03/02 00:37:21 marka Exp $ */
|
||||
|
||||
#ifndef NS_ZONECONF_H
|
||||
#define NS_ZONECONF_H 1
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <isccfg/aclconf.h>
|
||||
#include <isccfg/cfg.h>
|
||||
|
||||
#include <named/aclconf.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
const cfg_obj_t *zconfig, ns_aclconfctx_t *ac,
|
||||
const cfg_obj_t *zconfig, cfg_aclconfctx_t *ac,
|
||||
dns_zone_t *zone);
|
||||
/*
|
||||
/*%<
|
||||
* Configure or reconfigure a zone according to the named.conf
|
||||
* data in 'cctx' and 'czone'.
|
||||
*
|
||||
@ -41,16 +42,16 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
* at zone creation time.
|
||||
*
|
||||
* Require:
|
||||
* 'lctx' to be initialized or NULL.
|
||||
* 'cctx' to be initialized or NULL.
|
||||
* 'ac' to point to an initialized ns_aclconfctx_t.
|
||||
* 'czone' to be initialized.
|
||||
* 'zone' to be initialized.
|
||||
* \li 'lctx' to be initialized or NULL.
|
||||
* \li 'cctx' to be initialized or NULL.
|
||||
* \li 'ac' to point to an initialized ns_aclconfctx_t.
|
||||
* \li 'czone' to be initialized.
|
||||
* \li 'zone' to be initialized.
|
||||
*/
|
||||
|
||||
isc_boolean_t
|
||||
ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig);
|
||||
/*
|
||||
/*%<
|
||||
* If 'zone' can be safely reconfigured according to the configuration
|
||||
* data in 'zconfig', return ISC_TRUE. If the configuration data is so
|
||||
* different from the current zone state that the zone needs to be destroyed
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: interfacemgr.c,v 1.59.2.5.8.18 2006/07/19 00:16:28 marka Exp $ */
|
||||
/* $Id: interfacemgr.c,v 1.76.18.8 2006/07/20 01:10:30 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -37,24 +39,29 @@
|
||||
#define IFMGR_COMMON_LOGARGS \
|
||||
ns_g_lctx, NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR
|
||||
|
||||
/*% nameserver interface manager structure */
|
||||
struct ns_interfacemgr {
|
||||
unsigned int magic; /* Magic number. */
|
||||
unsigned int magic; /*%< Magic number. */
|
||||
int references;
|
||||
isc_mutex_t lock;
|
||||
isc_mem_t * mctx; /* Memory context. */
|
||||
isc_taskmgr_t * taskmgr; /* Task manager. */
|
||||
isc_socketmgr_t * socketmgr; /* Socket manager. */
|
||||
isc_mem_t * mctx; /*%< Memory context. */
|
||||
isc_taskmgr_t * taskmgr; /*%< Task manager. */
|
||||
isc_socketmgr_t * socketmgr; /*%< Socket manager. */
|
||||
dns_dispatchmgr_t * dispatchmgr;
|
||||
unsigned int generation; /* Current generation no. */
|
||||
unsigned int generation; /*%< Current generation no. */
|
||||
ns_listenlist_t * listenon4;
|
||||
ns_listenlist_t * listenon6;
|
||||
dns_aclenv_t aclenv; /* Localhost/localnets ACLs */
|
||||
ISC_LIST(ns_interface_t) interfaces; /* List of interfaces. */
|
||||
dns_aclenv_t aclenv; /*%< Localhost/localnets ACLs */
|
||||
ISC_LIST(ns_interface_t) interfaces; /*%< List of interfaces. */
|
||||
ISC_LIST(isc_sockaddr_t) listenon;
|
||||
};
|
||||
|
||||
static void
|
||||
purge_old_interfaces(ns_interfacemgr_t *mgr);
|
||||
|
||||
static void
|
||||
clearlistenon(ns_interfacemgr_t *mgr);
|
||||
|
||||
isc_result_t
|
||||
ns_interfacemgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
|
||||
isc_socketmgr_t *socketmgr,
|
||||
@ -85,6 +92,7 @@ ns_interfacemgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
|
||||
mgr->listenon6 = NULL;
|
||||
|
||||
ISC_LIST_INIT(mgr->interfaces);
|
||||
ISC_LIST_INIT(mgr->listenon);
|
||||
|
||||
/*
|
||||
* The listen-on lists are initially empty.
|
||||
@ -117,6 +125,7 @@ ns_interfacemgr_destroy(ns_interfacemgr_t *mgr) {
|
||||
dns_aclenv_destroy(&mgr->aclenv);
|
||||
ns_listenlist_detach(&mgr->listenon4);
|
||||
ns_listenlist_detach(&mgr->listenon6);
|
||||
clearlistenon(mgr);
|
||||
DESTROYLOCK(&mgr->lock);
|
||||
mgr->magic = 0;
|
||||
isc_mem_put(mgr->mctx, mgr, sizeof(*mgr));
|
||||
@ -158,7 +167,7 @@ void
|
||||
ns_interfacemgr_shutdown(ns_interfacemgr_t *mgr) {
|
||||
REQUIRE(NS_INTERFACEMGR_VALID(mgr));
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Shut down and detach all interfaces.
|
||||
* By incrementing the generation count, we make purge_old_interfaces()
|
||||
* consider all interfaces "old".
|
||||
@ -432,7 +441,7 @@ ns_interface_detach(ns_interface_t **targetp) {
|
||||
*targetp = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Search the interface list for an interface whose address and port
|
||||
* both match those of 'addr'. Return a pointer to it, or NULL if not found.
|
||||
*/
|
||||
@ -447,7 +456,7 @@ find_matching_interface(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr) {
|
||||
return (ifp);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Remove any interfaces whose generation number is not the current one.
|
||||
*/
|
||||
static void
|
||||
@ -537,6 +546,43 @@ setup_locals(ns_interfacemgr_t *mgr, isc_interface_t *interface) {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
setup_listenon(ns_interfacemgr_t *mgr, isc_interface_t *interface,
|
||||
in_port_t port)
|
||||
{
|
||||
isc_sockaddr_t *addr;
|
||||
isc_sockaddr_t *old;
|
||||
|
||||
addr = isc_mem_get(mgr->mctx, sizeof(*addr));
|
||||
if (addr == NULL)
|
||||
return;
|
||||
|
||||
isc_sockaddr_fromnetaddr(addr, &interface->address, port);
|
||||
|
||||
for (old = ISC_LIST_HEAD(mgr->listenon);
|
||||
old != NULL;
|
||||
old = ISC_LIST_NEXT(old, link))
|
||||
if (isc_sockaddr_equal(addr, old))
|
||||
break;
|
||||
|
||||
if (old != NULL)
|
||||
isc_mem_put(mgr->mctx, addr, sizeof(*addr));
|
||||
else
|
||||
ISC_LIST_APPEND(mgr->listenon, addr, link);
|
||||
}
|
||||
|
||||
static void
|
||||
clearlistenon(ns_interfacemgr_t *mgr) {
|
||||
isc_sockaddr_t *old;
|
||||
|
||||
old = ISC_LIST_HEAD(mgr->listenon);
|
||||
while (old != NULL) {
|
||||
ISC_LIST_UNLINK(mgr->listenon, old, link);
|
||||
isc_mem_put(mgr->mctx, old, sizeof(*old));
|
||||
old = ISC_LIST_HEAD(mgr->listenon);
|
||||
}
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
|
||||
isc_boolean_t verbose)
|
||||
@ -553,6 +599,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
|
||||
isc_sockaddr_t listen_addr;
|
||||
ns_interface_t *ifp;
|
||||
isc_boolean_t log_explicit = ISC_FALSE;
|
||||
isc_boolean_t dolistenon;
|
||||
|
||||
if (ext_listen != NULL)
|
||||
adjusting = ISC_TRUE;
|
||||
@ -643,6 +690,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
|
||||
result = clearacl(mgr->mctx, &mgr->aclenv.localnets);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_iter;
|
||||
clearlistenon(mgr);
|
||||
}
|
||||
|
||||
for (result = isc_interfaceiter_first(iter);
|
||||
@ -688,6 +736,7 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
|
||||
}
|
||||
|
||||
ll = (family == AF_INET) ? mgr->listenon4 : mgr->listenon6;
|
||||
dolistenon = ISC_TRUE;
|
||||
for (le = ISC_LIST_HEAD(ll->elts);
|
||||
le != NULL;
|
||||
le = ISC_LIST_NEXT(le, link))
|
||||
@ -723,6 +772,11 @@ do_scan(ns_interfacemgr_t *mgr, ns_listenlist_t *ext_listen,
|
||||
if (match <= 0)
|
||||
continue;
|
||||
|
||||
if (adjusting == ISC_FALSE && dolistenon == ISC_TRUE) {
|
||||
setup_listenon(mgr, &interface, le->port);
|
||||
dolistenon = ISC_FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* The case of "any" IPv6 address will require
|
||||
* special considerations later, so remember it.
|
||||
@ -909,3 +963,16 @@ ns_interfacemgr_dumprecursing(FILE *f, ns_interfacemgr_t *mgr) {
|
||||
}
|
||||
UNLOCK(&mgr->lock);
|
||||
}
|
||||
|
||||
isc_boolean_t
|
||||
ns_interfacemgr_listeningon(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr) {
|
||||
isc_sockaddr_t *old;
|
||||
|
||||
old = ISC_LIST_HEAD(mgr->listenon);
|
||||
for (old = ISC_LIST_HEAD(mgr->listenon);
|
||||
old != NULL;
|
||||
old = ISC_LIST_NEXT(old, link))
|
||||
if (isc_sockaddr_equal(old, addr))
|
||||
return (ISC_TRUE);
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: listenlist.c,v 1.9.208.1 2004/03/06 10:21:18 marka Exp $ */
|
||||
/* $Id: listenlist.c,v 1.10.18.2 2005/04/29 00:15:22 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: log.c,v 1.33.2.1.10.6 2005/05/24 23:58:17 marka Exp $ */
|
||||
/* $Id: log.c,v 1.37.18.6 2006/06/09 00:54:08 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -29,9 +31,10 @@
|
||||
#define ISC_FACILITY LOG_DAEMON
|
||||
#endif
|
||||
|
||||
/*
|
||||
/*%
|
||||
* When adding a new category, be sure to add the appropriate
|
||||
* #define to <named/log.h>.
|
||||
* #define to <named/log.h> and to update the list in
|
||||
* bin/check/check-tool.c.
|
||||
*/
|
||||
static isc_logcategory_t categories[] = {
|
||||
{ "", 0 },
|
||||
@ -44,7 +47,7 @@ static isc_logcategory_t categories[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
/*
|
||||
/*%
|
||||
* When adding a new module, be sure to add the appropriate
|
||||
* #define to <dns/log.h>.
|
||||
*/
|
||||
@ -78,6 +81,9 @@ ns_log_init(isc_boolean_t safe) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
/*
|
||||
* named-checktool.c:setup_logging() needs to be kept in sync.
|
||||
*/
|
||||
isc_log_registercategories(ns_g_lctx, ns_g_categories);
|
||||
isc_log_registermodules(ns_g_lctx, ns_g_modules);
|
||||
isc_log_setcontext(ns_g_lctx);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: logconf.c,v 1.30.2.3.10.4 2006/03/02 00:37:20 marka Exp $ */
|
||||
/* $Id: logconf.c,v 1.35.18.5 2006/03/02 00:37:21 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -36,7 +38,7 @@
|
||||
if (result != ISC_R_SUCCESS) goto cleanup; \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Set up a logging category according to the named.conf data
|
||||
* in 'ccat' and add it to 'lctx'.
|
||||
*/
|
||||
@ -84,7 +86,7 @@ category_fromconf(const cfg_obj_t *ccat, isc_logconfig_t *lctx) {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Set up a logging channel according to the named.conf data
|
||||
* in 'cchan' and add it to 'lctx'.
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwaddr.c,v 1.3.208.1 2004/03/06 10:21:18 marka Exp $ */
|
||||
/* $Id: lwaddr.c,v 1.4.18.2 2005/04/29 00:15:23 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -29,7 +31,7 @@
|
||||
|
||||
#include <named/lwaddr.h>
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Convert addresses from lwres to isc format.
|
||||
*/
|
||||
isc_result_t
|
||||
@ -63,7 +65,7 @@ lwaddr_sockaddr_fromlwresaddr(isc_sockaddr_t *sa, lwres_addr_t *la,
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Convert addresses from isc to lwres format.
|
||||
*/
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwdclient.c,v 1.13.12.5 2004/03/08 09:04:15 marka Exp $ */
|
||||
/* $Id: lwdclient.c,v 1.17.18.2 2005/04/29 00:15:23 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwderror.c,v 1.7.208.1 2004/03/06 10:21:18 marka Exp $ */
|
||||
/* $Id: lwderror.c,v 1.8.18.2 2005/04/29 00:15:24 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -25,7 +27,7 @@
|
||||
#include <named/types.h>
|
||||
#include <named/lwdclient.h>
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Generate an error packet for the client, schedule a send, and put us in
|
||||
* the SEND state.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwdgabn.c,v 1.13.12.5 2006/03/02 00:37:20 marka Exp $ */
|
||||
/* $Id: lwdgabn.c,v 1.15.18.5 2006/03/02 00:37:21 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -47,7 +49,7 @@ static isc_result_t start_find(ns_lwdclient_t *);
|
||||
static void restart_find(ns_lwdclient_t *);
|
||||
static void init_gabn(ns_lwdclient_t *);
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Destroy any finds. This can be used to "start over from scratch" and
|
||||
* should only be called when events are _not_ being generated by the finds.
|
||||
*/
|
||||
@ -432,7 +434,7 @@ restart_find(ns_lwdclient_t *client) {
|
||||
client->clientmgr->task,
|
||||
process_gabn_finddone, client,
|
||||
dns_fixedname_name(&client->target_name),
|
||||
dns_rootname, options, 0,
|
||||
dns_rootname, 0, options, 0,
|
||||
dns_fixedname_name(&client->target_name),
|
||||
client->clientmgr->view->dstport,
|
||||
&client->find);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwdgnba.c,v 1.13.2.1.2.5 2004/03/08 04:04:19 marka Exp $ */
|
||||
/* $Id: lwdgnba.c,v 1.16.18.2 2005/04/29 00:15:24 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwdgrbn.c,v 1.11.208.5 2006/01/04 23:50:19 marka Exp $ */
|
||||
/* $Id: lwdgrbn.c,v 1.13.18.5 2006/12/07 23:57:58 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -183,8 +185,6 @@ iterate_node(lwres_grbnresponse_t *grbn, dns_db_t *db, dns_dbnode_t *node,
|
||||
isc_mem_put(mctx, oldlens, oldsize * sizeof(*oldlens));
|
||||
if (newrdatas != NULL)
|
||||
isc_mem_put(mctx, newrdatas, used * sizeof(*oldrdatas));
|
||||
if (newlens != NULL)
|
||||
isc_mem_put(mctx, newlens, used * sizeof(*oldlens));
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwdnoop.c,v 1.6.208.1 2004/03/06 10:21:19 marka Exp $ */
|
||||
/* $Id: lwdnoop.c,v 1.7.18.2 2005/04/29 00:15:25 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
@ -13,13 +13,13 @@
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" $Id: lwresd.8,v 1.13.208.6 2006/06/29 13:02:30 marka Exp $
|
||||
.\" $Id: lwresd.8,v 1.15.18.10 2007/01/30 00:23:44 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: lwresd
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: June 30, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
@ -60,42 +60,57 @@ entries are present, or if forwarding fails,
|
||||
\fBlwresd\fR
|
||||
resolves the queries autonomously starting at the root name servers, using a built\-in list of root server hints.
|
||||
.SH "OPTIONS"
|
||||
.TP 3n
|
||||
.PP
|
||||
\-C \fIconfig\-file\fR
|
||||
.RS 4
|
||||
Use
|
||||
\fIconfig\-file\fR
|
||||
as the configuration file instead of the default,
|
||||
\fI/etc/resolv.conf\fR.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-d \fIdebug\-level\fR
|
||||
.RS 4
|
||||
Set the daemon's debug level to
|
||||
\fIdebug\-level\fR. Debugging traces from
|
||||
\fBlwresd\fR
|
||||
become more verbose as the debug level increases.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-f
|
||||
.RS 4
|
||||
Run the server in the foreground (i.e. do not daemonize).
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-g
|
||||
.RS 4
|
||||
Run the server in the foreground and force all logging to
|
||||
\fIstderr\fR.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-n \fI#cpus\fR
|
||||
.RS 4
|
||||
Create
|
||||
\fI#cpus\fR
|
||||
worker threads to take advantage of multiple CPUs. If not specified,
|
||||
\fBlwresd\fR
|
||||
will try to determine the number of CPUs present and create one thread per CPU. If it is unable to determine the number of CPUs, a single worker thread will be created.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-P \fIport\fR
|
||||
.RS 4
|
||||
Listen for lightweight resolver queries on port
|
||||
\fIport\fR. If not specified, the default is port 921.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-p \fIport\fR
|
||||
.RS 4
|
||||
Send DNS lookups to port
|
||||
\fIport\fR. If not specified, the default is port 53. This provides a way of testing the lightweight resolver daemon with a name server that listens for queries on a non\-standard port number.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-s
|
||||
.RS 4
|
||||
Write memory usage statistics to
|
||||
\fIstdout\fR
|
||||
on exit.
|
||||
@ -103,8 +118,10 @@ on exit.
|
||||
.B "Note:"
|
||||
This option is mainly of interest to BIND 9 developers and may be removed or changed in a future release.
|
||||
.RE
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-t \fIdirectory\fR
|
||||
.RS 4
|
||||
\fBchroot()\fR
|
||||
to
|
||||
\fIdirectory\fR
|
||||
@ -117,22 +134,31 @@ option, as chrooting a process running as root doesn't enhance security on most
|
||||
\fBchroot()\fR
|
||||
is defined allows a process with root privileges to escape a chroot jail.
|
||||
.RE
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-u \fIuser\fR
|
||||
.RS 4
|
||||
\fBsetuid()\fR
|
||||
to
|
||||
\fIuser\fR
|
||||
after completing privileged operations, such as creating sockets that listen on privileged ports.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-v
|
||||
.RS 4
|
||||
Report the version number and exit.
|
||||
.RE
|
||||
.SH "FILES"
|
||||
.TP 3n
|
||||
.PP
|
||||
\fI/etc/resolv.conf\fR
|
||||
.RS 4
|
||||
The default configuration file.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fI/var/run/lwresd.pid\fR
|
||||
.RS 4
|
||||
The default process\-id file.
|
||||
.RE
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBnamed\fR(8),
|
||||
@ -142,4 +168,7 @@ The default process\-id file.
|
||||
.PP
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
Copyright \(co 2000, 2001 Internet Software Consortium.
|
||||
.br
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,9 +15,10 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwresd.c,v 1.37.2.2.2.8 2006/02/28 06:32:53 marka Exp $ */
|
||||
/* $Id: lwresd.c,v 1.46.18.7 2006/03/02 00:37:21 marka Exp $ */
|
||||
|
||||
/*
|
||||
/*! \file
|
||||
* \brief
|
||||
* Main program for the Lightweight Resolver Daemon.
|
||||
*
|
||||
* To paraphrase the old saying about X11, "It's not a lightweight deamon
|
||||
@ -59,11 +60,11 @@
|
||||
#define LWRESLISTENER_MAGIC ISC_MAGIC('L', 'W', 'R', 'L')
|
||||
#define VALID_LWRESLISTENER(l) ISC_MAGIC_VALID(l, LWRESLISTENER_MAGIC)
|
||||
|
||||
/*
|
||||
/*!
|
||||
* The total number of clients we can handle will be NTASKS * NRECVS.
|
||||
*/
|
||||
#define NTASKS 2 /* tasks to create to handle lwres queries */
|
||||
#define NRECVS 2 /* max clients per task */
|
||||
#define NTASKS 2 /*%< tasks to create to handle lwres queries */
|
||||
#define NRECVS 2 /*%< max clients per task */
|
||||
|
||||
typedef ISC_LIST(ns_lwreslistener_t) ns_lwreslistenerlist_t;
|
||||
|
||||
@ -78,7 +79,7 @@ initialize_mutex(void) {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/*%
|
||||
* Wrappers around our memory management stuff, for the lwres functions.
|
||||
*/
|
||||
void *
|
||||
@ -511,13 +512,19 @@ listener_create(isc_mem_t *mctx, ns_lwresd_t *lwresd,
|
||||
ns_lwreslistener_t **listenerp)
|
||||
{
|
||||
ns_lwreslistener_t *listener;
|
||||
isc_result_t result;
|
||||
|
||||
REQUIRE(listenerp != NULL && *listenerp == NULL);
|
||||
|
||||
listener = isc_mem_get(mctx, sizeof(ns_lwreslistener_t));
|
||||
if (listener == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
RUNTIME_CHECK(isc_mutex_init(&listener->lock) == ISC_R_SUCCESS);
|
||||
|
||||
result = isc_mutex_init(&listener->lock);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_mem_put(mctx, listener, sizeof(ns_lwreslistener_t));
|
||||
return (result);
|
||||
}
|
||||
|
||||
listener->magic = LWRESLISTENER_MAGIC;
|
||||
listener->refs = 1;
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@ -18,8 +18,7 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: lwresd.docbook,v 1.6.208.4 2005/05/13 01:22:33 marka Exp $ -->
|
||||
|
||||
<!-- $Id: lwresd.docbook,v 1.7.18.5 2007/01/29 23:57:20 marka Exp $ -->
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
<date>June 30, 2000</date>
|
||||
@ -31,10 +30,16 @@
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>lwresd</application></refname>
|
||||
<refpurpose>lightweight resolver daemon</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<year>2007</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
@ -44,11 +49,6 @@
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>lwresd</application></refname>
|
||||
<refpurpose>lightweight resolver daemon</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>lwresd</command>
|
||||
@ -69,37 +69,39 @@
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<command>lwresd</command> is the daemon providing name lookup
|
||||
services to clients that use the BIND 9 lightweight resolver
|
||||
library. It is essentially a stripped-down, caching-only name
|
||||
server that answers queries using the BIND 9 lightweight
|
||||
resolver protocol rather than the DNS protocol.
|
||||
|
||||
<para><command>lwresd</command>
|
||||
is the daemon providing name lookup
|
||||
services to clients that use the BIND 9 lightweight resolver
|
||||
library. It is essentially a stripped-down, caching-only name
|
||||
server that answers queries using the BIND 9 lightweight
|
||||
resolver protocol rather than the DNS protocol.
|
||||
</para>
|
||||
|
||||
<para><command>lwresd</command>
|
||||
listens for resolver queries on a
|
||||
UDP port on the IPv4 loopback interface, 127.0.0.1. This
|
||||
means that <command>lwresd</command> can only be used by
|
||||
processes running on the local machine. By default UDP port
|
||||
number 921 is used for lightweight resolver requests and
|
||||
responses.
|
||||
</para>
|
||||
<para>
|
||||
<command>lwresd</command> listens for resolver queries on a
|
||||
UDP port on the IPv4 loopback interface, 127.0.0.1. This
|
||||
means that <command>lwresd</command> can only be used by
|
||||
processes running on the local machine. By default UDP port
|
||||
number 921 is used for lightweight resolver requests and
|
||||
responses.
|
||||
Incoming lightweight resolver requests are decoded by the
|
||||
server which then resolves them using the DNS protocol. When
|
||||
the DNS lookup completes, <command>lwresd</command> encodes
|
||||
the answers in the lightweight resolver format and returns
|
||||
them to the client that made the request.
|
||||
</para>
|
||||
<para>
|
||||
Incoming lightweight resolver requests are decoded by the
|
||||
server which then resolves them using the DNS protocol. When
|
||||
the DNS lookup completes, <command>lwresd</command> encodes
|
||||
the answers in the lightweight resolver format and returns
|
||||
them to the client that made the request.
|
||||
</para>
|
||||
<para>
|
||||
If <filename>/etc/resolv.conf</filename> contains any
|
||||
<option>nameserver</option> entries, <command>lwresd</command>
|
||||
sends recursive DNS queries to those servers. This is similar
|
||||
to the use of forwarders in a caching name server. If no
|
||||
<option>nameserver</option> entries are present, or if
|
||||
forwarding fails, <command>lwresd</command> resolves the
|
||||
queries autonomously starting at the root name servers, using
|
||||
a built-in list of root server hints.
|
||||
If <filename>/etc/resolv.conf</filename> contains any
|
||||
<option>nameserver</option> entries, <command>lwresd</command>
|
||||
sends recursive DNS queries to those servers. This is similar
|
||||
to the use of forwarders in a caching name server. If no
|
||||
<option>nameserver</option> entries are present, or if
|
||||
forwarding fails, <command>lwresd</command> resolves the
|
||||
queries autonomously starting at the root name servers, using
|
||||
a built-in list of root server hints.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
@ -108,145 +110,139 @@
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-C <replaceable class="parameter">config-file</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use <replaceable
|
||||
class="parameter">config-file</replaceable> as the
|
||||
configuration file instead of the default,
|
||||
<filename>/etc/resolv.conf</filename>.
|
||||
<term>-C <replaceable class="parameter">config-file</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use <replaceable class="parameter">config-file</replaceable> as the
|
||||
configuration file instead of the default,
|
||||
<filename>/etc/resolv.conf</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-d <replaceable class="parameter">debug-level</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Set the daemon's debug level to <replaceable
|
||||
class="parameter">debug-level</replaceable>.
|
||||
Debugging traces from <command>lwresd</command> become
|
||||
more verbose as the debug level increases.
|
||||
<term>-d <replaceable class="parameter">debug-level</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Set the daemon's debug level to <replaceable class="parameter">debug-level</replaceable>.
|
||||
Debugging traces from <command>lwresd</command> become
|
||||
more verbose as the debug level increases.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-f</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Run the server in the foreground (i.e. do not daemonize).
|
||||
<term>-f</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Run the server in the foreground (i.e. do not daemonize).
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-g</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Run the server in the foreground and force all logging
|
||||
to <filename>stderr</filename>.
|
||||
<term>-g</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Run the server in the foreground and force all logging
|
||||
to <filename>stderr</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-n <replaceable class="parameter">#cpus</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Create <replaceable
|
||||
class="parameter">#cpus</replaceable> worker threads
|
||||
to take advantage of multiple CPUs. If not specified,
|
||||
<command>lwresd</command> will try to determine the
|
||||
number of CPUs present and create one thread per CPU.
|
||||
If it is unable to determine the number of CPUs, a
|
||||
single worker thread will be created.
|
||||
<term>-n <replaceable class="parameter">#cpus</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Create <replaceable class="parameter">#cpus</replaceable> worker threads
|
||||
to take advantage of multiple CPUs. If not specified,
|
||||
<command>lwresd</command> will try to determine the
|
||||
number of CPUs present and create one thread per CPU.
|
||||
If it is unable to determine the number of CPUs, a
|
||||
single worker thread will be created.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-P <replaceable class="parameter">port</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Listen for lightweight resolver queries on port
|
||||
<replaceable class="parameter">port</replaceable>. If
|
||||
not specified, the default is port 921.
|
||||
<term>-P <replaceable class="parameter">port</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Listen for lightweight resolver queries on port
|
||||
<replaceable class="parameter">port</replaceable>. If
|
||||
not specified, the default is port 921.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-p <replaceable class="parameter">port</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Send DNS lookups to port <replaceable
|
||||
class="parameter">port</replaceable>. If not
|
||||
specified, the default is port 53. This provides a
|
||||
way of testing the lightweight resolver daemon with a
|
||||
name server that listens for queries on a non-standard
|
||||
port number.
|
||||
<term>-p <replaceable class="parameter">port</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Send DNS lookups to port <replaceable class="parameter">port</replaceable>. If not
|
||||
specified, the default is port 53. This provides a
|
||||
way of testing the lightweight resolver daemon with a
|
||||
name server that listens for queries on a non-standard
|
||||
port number.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-s</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Write memory usage statistics to <filename>stdout</filename>
|
||||
on exit.
|
||||
<term>-s</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Write memory usage statistics to <filename>stdout</filename>
|
||||
on exit.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
This option is mainly of interest to BIND 9 developers
|
||||
and may be removed or changed in a future release.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
<note>
|
||||
<para>
|
||||
This option is mainly of interest to BIND 9 developers
|
||||
and may be removed or changed in a future release.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-t <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<function>chroot()</function> to <replaceable
|
||||
class="parameter">directory</replaceable> after
|
||||
processing the command line arguments, but before
|
||||
reading the configuration file.
|
||||
<term>-t <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para><function>chroot()</function>
|
||||
to <replaceable class="parameter">directory</replaceable> after
|
||||
processing the command line arguments, but before
|
||||
reading the configuration file.
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
This option should be used in conjunction with the
|
||||
<option>-u</option> option, as chrooting a process
|
||||
running as root doesn't enhance security on most
|
||||
systems; the way <function>chroot()</function> is
|
||||
defined allows a process with root privileges to
|
||||
escape a chroot jail.
|
||||
</para>
|
||||
</warning>
|
||||
</listitem>
|
||||
<warning>
|
||||
<para>
|
||||
This option should be used in conjunction with the
|
||||
<option>-u</option> option, as chrooting a process
|
||||
running as root doesn't enhance security on most
|
||||
systems; the way <function>chroot()</function> is
|
||||
defined allows a process with root privileges to
|
||||
escape a chroot jail.
|
||||
</para>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-u <replaceable class="parameter">user</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<function>setuid()</function> to <replaceable
|
||||
class="parameter">user</replaceable> after completing
|
||||
privileged operations, such as creating sockets that
|
||||
listen on privileged ports.
|
||||
<term>-u <replaceable class="parameter">user</replaceable></term>
|
||||
<listitem>
|
||||
<para><function>setuid()</function>
|
||||
to <replaceable class="parameter">user</replaceable> after completing
|
||||
privileged operations, such as creating sockets that
|
||||
listen on privileged ports.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Report the version number and exit.
|
||||
<term>-v</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Report the version number and exit.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
@ -259,21 +255,21 @@
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><filename>/etc/resolv.conf</filename></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The default configuration file.
|
||||
<term><filename>/etc/resolv.conf</filename></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The default configuration file.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><filename>/var/run/lwresd.pid</filename></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The default process-id file.
|
||||
<term><filename>/var/run/lwresd.pid</filename></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The default process-id file.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
@ -282,33 +278,25 @@
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>named</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>lwres</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>resolver</refentrytitle>
|
||||
<manvolnum>5</manvolnum>
|
||||
</citerefentry>.
|
||||
<para><citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>lwres</refentrytitle><manvolnum>3</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>resolver</refentrytitle><manvolnum>5</manvolnum>
|
||||
</citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
<para>
|
||||
<corpauthor>Internet Systems Consortium</corpauthor>
|
||||
<para><corpauthor>Internet Systems Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
|
||||
<!--
|
||||
</refentry><!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@ -14,15 +14,15 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: lwresd.html,v 1.4.2.1.4.10 2006/06/29 13:02:30 marka Exp $ -->
|
||||
<!-- $Id: lwresd.html,v 1.5.18.16 2007/01/30 00:23:44 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>lwresd</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482688"></a><div class="titlepage"></div>
|
||||
<a name="id2476275"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p><span class="application">lwresd</span> — lightweight resolver daemon</p>
|
||||
@ -32,157 +32,155 @@
|
||||
<div class="cmdsynopsis"><p><code class="command">lwresd</code> [<code class="option">-C <em class="replaceable"><code>config-file</code></em></code>] [<code class="option">-d <em class="replaceable"><code>debug-level</code></em></code>] [<code class="option">-f</code>] [<code class="option">-g</code>] [<code class="option">-i <em class="replaceable"><code>pid-file</code></em></code>] [<code class="option">-n <em class="replaceable"><code>#cpus</code></em></code>] [<code class="option">-P <em class="replaceable"><code>port</code></em></code>] [<code class="option">-p <em class="replaceable"><code>port</code></em></code>] [<code class="option">-s</code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-u <em class="replaceable"><code>user</code></em></code>] [<code class="option">-v</code>]</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549484"></a><h2>DESCRIPTION</h2>
|
||||
<p>
|
||||
<span><strong class="command">lwresd</strong></span> is the daemon providing name lookup
|
||||
services to clients that use the BIND 9 lightweight resolver
|
||||
library. It is essentially a stripped-down, caching-only name
|
||||
server that answers queries using the BIND 9 lightweight
|
||||
resolver protocol rather than the DNS protocol.
|
||||
<a name="id2543435"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">lwresd</strong></span>
|
||||
is the daemon providing name lookup
|
||||
services to clients that use the BIND 9 lightweight resolver
|
||||
library. It is essentially a stripped-down, caching-only name
|
||||
server that answers queries using the BIND 9 lightweight
|
||||
resolver protocol rather than the DNS protocol.
|
||||
</p>
|
||||
<p><span><strong class="command">lwresd</strong></span>
|
||||
listens for resolver queries on a
|
||||
UDP port on the IPv4 loopback interface, 127.0.0.1. This
|
||||
means that <span><strong class="command">lwresd</strong></span> can only be used by
|
||||
processes running on the local machine. By default UDP port
|
||||
number 921 is used for lightweight resolver requests and
|
||||
responses.
|
||||
</p>
|
||||
<p>
|
||||
<span><strong class="command">lwresd</strong></span> listens for resolver queries on a
|
||||
UDP port on the IPv4 loopback interface, 127.0.0.1. This
|
||||
means that <span><strong class="command">lwresd</strong></span> can only be used by
|
||||
processes running on the local machine. By default UDP port
|
||||
number 921 is used for lightweight resolver requests and
|
||||
responses.
|
||||
Incoming lightweight resolver requests are decoded by the
|
||||
server which then resolves them using the DNS protocol. When
|
||||
the DNS lookup completes, <span><strong class="command">lwresd</strong></span> encodes
|
||||
the answers in the lightweight resolver format and returns
|
||||
them to the client that made the request.
|
||||
</p>
|
||||
<p>
|
||||
Incoming lightweight resolver requests are decoded by the
|
||||
server which then resolves them using the DNS protocol. When
|
||||
the DNS lookup completes, <span><strong class="command">lwresd</strong></span> encodes
|
||||
the answers in the lightweight resolver format and returns
|
||||
them to the client that made the request.
|
||||
</p>
|
||||
<p>
|
||||
If <code class="filename">/etc/resolv.conf</code> contains any
|
||||
<code class="option">nameserver</code> entries, <span><strong class="command">lwresd</strong></span>
|
||||
sends recursive DNS queries to those servers. This is similar
|
||||
to the use of forwarders in a caching name server. If no
|
||||
<code class="option">nameserver</code> entries are present, or if
|
||||
forwarding fails, <span><strong class="command">lwresd</strong></span> resolves the
|
||||
queries autonomously starting at the root name servers, using
|
||||
a built-in list of root server hints.
|
||||
If <code class="filename">/etc/resolv.conf</code> contains any
|
||||
<code class="option">nameserver</code> entries, <span><strong class="command">lwresd</strong></span>
|
||||
sends recursive DNS queries to those servers. This is similar
|
||||
to the use of forwarders in a caching name server. If no
|
||||
<code class="option">nameserver</code> entries are present, or if
|
||||
forwarding fails, <span><strong class="command">lwresd</strong></span> resolves the
|
||||
queries autonomously starting at the root name servers, using
|
||||
a built-in list of root server hints.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549533"></a><h2>OPTIONS</h2>
|
||||
<a name="id2543482"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-C <em class="replaceable"><code>config-file</code></em></span></dt>
|
||||
<dd><p>
|
||||
Use <em class="replaceable"><code>config-file</code></em> as the
|
||||
configuration file instead of the default,
|
||||
<code class="filename">/etc/resolv.conf</code>.
|
||||
Use <em class="replaceable"><code>config-file</code></em> as the
|
||||
configuration file instead of the default,
|
||||
<code class="filename">/etc/resolv.conf</code>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-d <em class="replaceable"><code>debug-level</code></em></span></dt>
|
||||
<dd><p>
|
||||
Set the daemon's debug level to <em class="replaceable"><code>debug-level</code></em>.
|
||||
Debugging traces from <span><strong class="command">lwresd</strong></span> become
|
||||
more verbose as the debug level increases.
|
||||
Set the daemon's debug level to <em class="replaceable"><code>debug-level</code></em>.
|
||||
Debugging traces from <span><strong class="command">lwresd</strong></span> become
|
||||
more verbose as the debug level increases.
|
||||
</p></dd>
|
||||
<dt><span class="term">-f</span></dt>
|
||||
<dd><p>
|
||||
Run the server in the foreground (i.e. do not daemonize).
|
||||
Run the server in the foreground (i.e. do not daemonize).
|
||||
</p></dd>
|
||||
<dt><span class="term">-g</span></dt>
|
||||
<dd><p>
|
||||
Run the server in the foreground and force all logging
|
||||
to <code class="filename">stderr</code>.
|
||||
Run the server in the foreground and force all logging
|
||||
to <code class="filename">stderr</code>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-n <em class="replaceable"><code>#cpus</code></em></span></dt>
|
||||
<dd><p>
|
||||
Create <em class="replaceable"><code>#cpus</code></em> worker threads
|
||||
to take advantage of multiple CPUs. If not specified,
|
||||
<span><strong class="command">lwresd</strong></span> will try to determine the
|
||||
number of CPUs present and create one thread per CPU.
|
||||
If it is unable to determine the number of CPUs, a
|
||||
single worker thread will be created.
|
||||
Create <em class="replaceable"><code>#cpus</code></em> worker threads
|
||||
to take advantage of multiple CPUs. If not specified,
|
||||
<span><strong class="command">lwresd</strong></span> will try to determine the
|
||||
number of CPUs present and create one thread per CPU.
|
||||
If it is unable to determine the number of CPUs, a
|
||||
single worker thread will be created.
|
||||
</p></dd>
|
||||
<dt><span class="term">-P <em class="replaceable"><code>port</code></em></span></dt>
|
||||
<dd><p>
|
||||
Listen for lightweight resolver queries on port
|
||||
<em class="replaceable"><code>port</code></em>. If
|
||||
not specified, the default is port 921.
|
||||
Listen for lightweight resolver queries on port
|
||||
<em class="replaceable"><code>port</code></em>. If
|
||||
not specified, the default is port 921.
|
||||
</p></dd>
|
||||
<dt><span class="term">-p <em class="replaceable"><code>port</code></em></span></dt>
|
||||
<dd><p>
|
||||
Send DNS lookups to port <em class="replaceable"><code>port</code></em>. If not
|
||||
specified, the default is port 53. This provides a
|
||||
way of testing the lightweight resolver daemon with a
|
||||
name server that listens for queries on a non-standard
|
||||
port number.
|
||||
Send DNS lookups to port <em class="replaceable"><code>port</code></em>. If not
|
||||
specified, the default is port 53. This provides a
|
||||
way of testing the lightweight resolver daemon with a
|
||||
name server that listens for queries on a non-standard
|
||||
port number.
|
||||
</p></dd>
|
||||
<dt><span class="term">-s</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Write memory usage statistics to <code class="filename">stdout</code>
|
||||
on exit.
|
||||
Write memory usage statistics to <code class="filename">stdout</code>
|
||||
on exit.
|
||||
</p>
|
||||
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
|
||||
<h3 class="title">Note</h3>
|
||||
<p>
|
||||
This option is mainly of interest to BIND 9 developers
|
||||
and may be removed or changed in a future release.
|
||||
</p>
|
||||
This option is mainly of interest to BIND 9 developers
|
||||
and may be removed or changed in a future release.
|
||||
</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
<code class="function">chroot()</code> to <em class="replaceable"><code>directory</code></em> after
|
||||
processing the command line arguments, but before
|
||||
reading the configuration file.
|
||||
<p><code class="function">chroot()</code>
|
||||
to <em class="replaceable"><code>directory</code></em> after
|
||||
processing the command line arguments, but before
|
||||
reading the configuration file.
|
||||
</p>
|
||||
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
|
||||
<h3 class="title">Warning</h3>
|
||||
<p>
|
||||
This option should be used in conjunction with the
|
||||
<code class="option">-u</code> option, as chrooting a process
|
||||
running as root doesn't enhance security on most
|
||||
systems; the way <code class="function">chroot()</code> is
|
||||
defined allows a process with root privileges to
|
||||
escape a chroot jail.
|
||||
</p>
|
||||
This option should be used in conjunction with the
|
||||
<code class="option">-u</code> option, as chrooting a process
|
||||
running as root doesn't enhance security on most
|
||||
systems; the way <code class="function">chroot()</code> is
|
||||
defined allows a process with root privileges to
|
||||
escape a chroot jail.
|
||||
</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt><span class="term">-u <em class="replaceable"><code>user</code></em></span></dt>
|
||||
<dd><p>
|
||||
<code class="function">setuid()</code> to <em class="replaceable"><code>user</code></em> after completing
|
||||
privileged operations, such as creating sockets that
|
||||
listen on privileged ports.
|
||||
<dd><p><code class="function">setuid()</code>
|
||||
to <em class="replaceable"><code>user</code></em> after completing
|
||||
privileged operations, such as creating sockets that
|
||||
listen on privileged ports.
|
||||
</p></dd>
|
||||
<dt><span class="term">-v</span></dt>
|
||||
<dd><p>
|
||||
Report the version number and exit.
|
||||
Report the version number and exit.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549939"></a><h2>FILES</h2>
|
||||
<a name="id2543746"></a><h2>FILES</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term"><code class="filename">/etc/resolv.conf</code></span></dt>
|
||||
<dd><p>
|
||||
The default configuration file.
|
||||
The default configuration file.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="filename">/var/run/lwresd.pid</code></span></dt>
|
||||
<dd><p>
|
||||
The default process-id file.
|
||||
The default process-id file.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549978"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">lwres</span>(3)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">resolver</span>(5)</span>.
|
||||
<a name="id2543785"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">lwres</span>(3)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">resolver</span>(5)</span>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550017"></a><h2>AUTHOR</h2>
|
||||
<p>
|
||||
<span class="corpauthor">Internet Systems Consortium</span>
|
||||
<a name="id2543819"></a><h2>AUTHOR</h2>
|
||||
<p><span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwsearch.c,v 1.7.208.1 2004/03/06 10:21:20 marka Exp $ */
|
||||
/* $Id: lwsearch.c,v 1.8.18.3 2005/07/12 01:22:17 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -38,6 +40,7 @@
|
||||
isc_result_t
|
||||
ns_lwsearchlist_create(isc_mem_t *mctx, ns_lwsearchlist_t **listp) {
|
||||
ns_lwsearchlist_t *list;
|
||||
isc_result_t result;
|
||||
|
||||
REQUIRE(mctx != NULL);
|
||||
REQUIRE(listp != NULL && *listp == NULL);
|
||||
@ -46,7 +49,11 @@ ns_lwsearchlist_create(isc_mem_t *mctx, ns_lwsearchlist_t **listp) {
|
||||
if (list == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
RUNTIME_CHECK(isc_mutex_init(&list->lock) == ISC_R_SUCCESS);
|
||||
result = isc_mutex_init(&list->lock);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_mem_put(mctx, list, sizeof(ns_lwsearchlist_t));
|
||||
return (result);
|
||||
}
|
||||
list->mctx = NULL;
|
||||
isc_mem_attach(mctx, &list->mctx);
|
||||
list->refs = 1;
|
||||
|
@ -15,7 +15,9 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: main.c,v 1.119.2.3.2.25 2006/11/10 18:51:06 marka Exp $ */
|
||||
/* $Id: main.c,v 1.136.18.17 2006/11/10 18:51:14 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -71,6 +73,13 @@
|
||||
*/
|
||||
/* #include "xxdb.h" */
|
||||
|
||||
/*
|
||||
* Include DLZ drivers if appropriate.
|
||||
*/
|
||||
#ifdef DLZ
|
||||
#include <dlz/dlz_drivers.h>
|
||||
#endif
|
||||
|
||||
static isc_boolean_t want_stats = ISC_FALSE;
|
||||
static char program_name[ISC_DIR_NAMEMAX] = "named";
|
||||
static char absolute_conffile[ISC_DIR_PATHMAX];
|
||||
@ -226,7 +235,7 @@ lwresd_usage(void) {
|
||||
" [-f|-g] [-n number_of_cpus] [-p port] "
|
||||
"[-P listen-port] [-s]\n"
|
||||
" [-t chrootdir] [-u username] [-i pidfile]\n"
|
||||
" [-m {usage|trace|record}]\n");
|
||||
" [-m {usage|trace|record|size|mctx}]\n");
|
||||
}
|
||||
|
||||
static void
|
||||
@ -239,7 +248,7 @@ usage(void) {
|
||||
"usage: named [-4|-6] [-c conffile] [-d debuglevel] "
|
||||
"[-f|-g] [-n number_of_cpus]\n"
|
||||
" [-p port] [-s] [-t chrootdir] [-u username]\n"
|
||||
" [-m {usage|trace|record}]\n");
|
||||
" [-m {usage|trace|record|size|mctx}]\n");
|
||||
}
|
||||
|
||||
static void
|
||||
@ -307,6 +316,8 @@ static struct flag_def {
|
||||
{ "trace", ISC_MEM_DEBUGTRACE },
|
||||
{ "record", ISC_MEM_DEBUGRECORD },
|
||||
{ "usage", ISC_MEM_DEBUGUSAGE },
|
||||
{ "size", ISC_MEM_DEBUGSIZE },
|
||||
{ "mctx", ISC_MEM_DEBUGCTX },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
@ -671,6 +682,16 @@ setup(void) {
|
||||
*/
|
||||
/* xxdb_init(); */
|
||||
|
||||
#ifdef DLZ
|
||||
/*
|
||||
* Registyer any DLZ drivers.
|
||||
*/
|
||||
result = dlz_drivers_init();
|
||||
if (result != ISC_R_SUCCESS)
|
||||
ns_main_earlyfatal("dlz_drivers_init() failed: %s",
|
||||
isc_result_totext(result));
|
||||
#endif
|
||||
|
||||
ns_server_create(ns_g_mctx, &ns_g_server);
|
||||
}
|
||||
|
||||
@ -687,6 +708,15 @@ cleanup(void) {
|
||||
*/
|
||||
/* xxdb_clear(); */
|
||||
|
||||
#ifdef DLZ
|
||||
/*
|
||||
* Unregister any DLZ drivers.
|
||||
*/
|
||||
dlz_drivers_clear();
|
||||
#endif
|
||||
|
||||
dns_name_destroy();
|
||||
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
|
||||
ISC_LOG_NOTICE, "exiting");
|
||||
ns_log_shutdown();
|
||||
@ -882,6 +912,7 @@ main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
isc_mem_destroy(&ns_g_mctx);
|
||||
isc_mem_checkdestroyed(stderr);
|
||||
|
||||
ns_main_setmemstats(NULL);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
@ -13,13 +13,13 @@
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" $Id: named.8,v 1.17.208.9 2006/06/29 13:02:30 marka Exp $
|
||||
.\" $Id: named.8,v 1.20.18.12 2007/01/30 00:23:44 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: named
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: June 30, 2000
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
@ -44,22 +44,27 @@ When invoked without arguments,
|
||||
will read the default configuration file
|
||||
\fI/etc/named.conf\fR, read any initial data, and listen for queries.
|
||||
.SH "OPTIONS"
|
||||
.TP 3n
|
||||
.PP
|
||||
\-4
|
||||
.RS 4
|
||||
Use IPv4 only even if the host machine is capable of IPv6.
|
||||
\fB\-4\fR
|
||||
and
|
||||
\fB\-6\fR
|
||||
are mutually exclusive.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-6
|
||||
.RS 4
|
||||
Use IPv6 only even if the host machine is capable of IPv4.
|
||||
\fB\-4\fR
|
||||
and
|
||||
\fB\-6\fR
|
||||
are mutually exclusive.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-c \fIconfig\-file\fR
|
||||
.RS 4
|
||||
Use
|
||||
\fIconfig\-file\fR
|
||||
as the configuration file instead of the default,
|
||||
@ -68,32 +73,44 @@ as the configuration file instead of the default,
|
||||
option in the configuration file,
|
||||
\fIconfig\-file\fR
|
||||
should be an absolute pathname.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-d \fIdebug\-level\fR
|
||||
.RS 4
|
||||
Set the daemon's debug level to
|
||||
\fIdebug\-level\fR. Debugging traces from
|
||||
\fBnamed\fR
|
||||
become more verbose as the debug level increases.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-f
|
||||
.RS 4
|
||||
Run the server in the foreground (i.e. do not daemonize).
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-g
|
||||
.RS 4
|
||||
Run the server in the foreground and force all logging to
|
||||
\fIstderr\fR.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-n \fI#cpus\fR
|
||||
.RS 4
|
||||
Create
|
||||
\fI#cpus\fR
|
||||
worker threads to take advantage of multiple CPUs. If not specified,
|
||||
\fBnamed\fR
|
||||
will try to determine the number of CPUs present and create one thread per CPU. If it is unable to determine the number of CPUs, a single worker thread will be created.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-p \fIport\fR
|
||||
.RS 4
|
||||
Listen for queries on port
|
||||
\fIport\fR. If not specified, the default is port 53.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-s
|
||||
.RS 4
|
||||
Write memory usage statistics to
|
||||
\fIstdout\fR
|
||||
on exit.
|
||||
@ -101,8 +118,10 @@ on exit.
|
||||
.B "Note:"
|
||||
This option is mainly of interest to BIND 9 developers and may be removed or changed in a future release.
|
||||
.RE
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-t \fIdirectory\fR
|
||||
.RS 4
|
||||
\fBchroot()\fR
|
||||
to
|
||||
\fIdirectory\fR
|
||||
@ -115,8 +134,10 @@ option, as chrooting a process running as root doesn't enhance security on most
|
||||
\fBchroot()\fR
|
||||
is defined allows a process with root privileges to escape a chroot jail.
|
||||
.RE
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-u \fIuser\fR
|
||||
.RS 4
|
||||
\fBsetuid()\fR
|
||||
to
|
||||
\fIuser\fR
|
||||
@ -134,11 +155,15 @@ option only works when
|
||||
is run 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
|
||||
\fBsetuid()\fR.
|
||||
.RE
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-v
|
||||
.RS 4
|
||||
Report the version number and exit.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\-x \fIcache\-file\fR
|
||||
.RS 4
|
||||
Load data from
|
||||
\fIcache\-file\fR
|
||||
into the cache of the default view.
|
||||
@ -146,17 +171,22 @@ into the cache of the default view.
|
||||
.B "Warning:"
|
||||
This option must not be used. It is only of interest to BIND 9 developers and may be removed or changed in a future release.
|
||||
.RE
|
||||
.RE
|
||||
.SH "SIGNALS"
|
||||
.PP
|
||||
In routine operation, signals should not be used to control the nameserver;
|
||||
\fBrndc\fR
|
||||
should be used instead.
|
||||
.TP 3n
|
||||
.PP
|
||||
SIGHUP
|
||||
.RS 4
|
||||
Force a reload of the server.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
SIGINT, SIGTERM
|
||||
.RS 4
|
||||
Shut down the server.
|
||||
.RE
|
||||
.PP
|
||||
The result of sending any other signals to the server is undefined.
|
||||
.SH "CONFIGURATION"
|
||||
@ -166,12 +196,16 @@ The
|
||||
configuration file is too complex to describe in detail here. A complete description is provided in the
|
||||
BIND 9 Administrator Reference Manual.
|
||||
.SH "FILES"
|
||||
.TP 3n
|
||||
.PP
|
||||
\fI/etc/named.conf\fR
|
||||
.RS 4
|
||||
The default configuration file.
|
||||
.TP 3n
|
||||
.RE
|
||||
.PP
|
||||
\fI/var/run/named.pid\fR
|
||||
.RS 4
|
||||
The default process\-id file.
|
||||
.RE
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
RFC 1033,
|
||||
@ -185,4 +219,7 @@ BIND 9 Administrator Reference Manual.
|
||||
.PP
|
||||
Internet Systems Consortium
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004\-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2004\-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
Copyright \(co 2000, 2001, 2003 Internet Software Consortium.
|
||||
.br
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
@ -12,13 +12,13 @@
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" $Id: named.conf.5,v 1.1.4.10 2006/09/13 02:56:20 marka Exp $
|
||||
.\" $Id: named.conf.5,v 1.1.2.23 2007/01/30 00:23:44 marka Exp $
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
.\" Title: \fInamed.conf\fR
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
|
||||
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
|
||||
.\" Date: Aug 13, 2004
|
||||
.\" Manual: BIND9
|
||||
.\" Source: BIND9
|
||||
@ -46,14 +46,14 @@ C++ style: // to end of line
|
||||
Unix style: # to end of line
|
||||
.SH "ACL"
|
||||
.sp
|
||||
.RS 3n
|
||||
.RS 4
|
||||
.nf
|
||||
acl \fIstring\fR { \fIaddress_match_element\fR; ... };
|
||||
.fi
|
||||
.RE
|
||||
.SH "KEY"
|
||||
.sp
|
||||
.RS 3n
|
||||
.RS 4
|
||||
.nf
|
||||
key \fIdomain_name\fR {
|
||||
algorithm \fIstring\fR;
|
||||
@ -63,7 +63,7 @@ key \fIdomain_name\fR {
|
||||
.RE
|
||||
.SH "MASTERS"
|
||||
.sp
|
||||
.RS 3n
|
||||
.RS 4
|
||||
.nf
|
||||
masters \fIstring\fR [ port \fIinteger\fR ] {
|
||||
( \fImasters\fR | \fIipv4_address\fR [port \fIinteger\fR] |
|
||||
@ -73,11 +73,13 @@ masters \fIstring\fR [ port \fIinteger\fR ] {
|
||||
.RE
|
||||
.SH "SERVER"
|
||||
.sp
|
||||
.RS 3n
|
||||
.RS 4
|
||||
.nf
|
||||
server ( \fIipv4_address\fR | \fIipv6_address\fR ) {
|
||||
server ( \fIipv4_address\fR\fI[/prefixlen]\fR | \fIipv6_address\fR\fI[/prefixlen]\fR ) {
|
||||
bogus \fIboolean\fR;
|
||||
edns \fIboolean\fR;
|
||||
edns\-udp\-size \fIinteger\fR;
|
||||
max\-udp\-size \fIinteger\fR;
|
||||
provide\-ixfr \fIboolean\fR;
|
||||
request\-ixfr \fIboolean\fR;
|
||||
keys \fIserver_key\fR;
|
||||
@ -93,7 +95,7 @@ server ( \fIipv4_address\fR | \fIipv6_address\fR ) {
|
||||
.RE
|
||||
.SH "TRUSTED\-KEYS"
|
||||
.sp
|
||||
.RS 3n
|
||||
.RS 4
|
||||
.nf
|
||||
trusted\-keys {
|
||||
\fIdomain_name\fR \fIflags\fR \fIprotocol\fR \fIalgorithm\fR \fIkey\fR; ...
|
||||
@ -102,7 +104,7 @@ trusted\-keys {
|
||||
.RE
|
||||
.SH "CONTROLS"
|
||||
.sp
|
||||
.RS 3n
|
||||
.RS 4
|
||||
.nf
|
||||
controls {
|
||||
inet ( \fIipv4_address\fR | \fIipv6_address\fR | * )
|
||||
@ -115,7 +117,7 @@ controls {
|
||||
.RE
|
||||
.SH "LOGGING"
|
||||
.sp
|
||||
.RS 3n
|
||||
.RS 4
|
||||
.nf
|
||||
logging {
|
||||
channel \fIstring\fR {
|
||||
@ -134,7 +136,7 @@ logging {
|
||||
.RE
|
||||
.SH "LWRES"
|
||||
.sp
|
||||
.RS 3n
|
||||
.RS 4
|
||||
.nf
|
||||
lwres {
|
||||
listen\-on [ port \fIinteger\fR ] {
|
||||
@ -148,7 +150,7 @@ lwres {
|
||||
.RE
|
||||
.SH "OPTIONS"
|
||||
.sp
|
||||
.RS 3n
|
||||
.RS 4
|
||||
.nf
|
||||
options {
|
||||
avoid\-v4\-udp\-ports { \fIport\fR; ... };
|
||||
@ -157,7 +159,6 @@ options {
|
||||
coresize \fIsize\fR;
|
||||
datasize \fIsize\fR;
|
||||
directory \fIquoted_string\fR;
|
||||
cache\-file \fIquoted_string\fR; // test option
|
||||
dump\-file \fIquoted_string\fR;
|
||||
files \fIsize\fR;
|
||||
heartbeat\-interval \fIinteger\fR;
|
||||
@ -205,8 +206,8 @@ options {
|
||||
rfc2308\-type1 \fIboolean\fR; // not yet implemented
|
||||
additional\-from\-auth \fIboolean\fR;
|
||||
additional\-from\-cache \fIboolean\fR;
|
||||
query\-source [ address ( \fIipv4_address\fR | * ) ] [ port ( \fIinteger\fR | * ) ];
|
||||
query\-source\-v6 [ address ( \fIipv6_address\fR | * ) ] [ port ( \fIinteger\fR | * ) ];
|
||||
query\-source ( ( \fIipv4_address\fR | * ) | [ address ( \fIipv4_address\fR | * ) ] ) [ port ( \fIinteger\fR | * ) ];
|
||||
query\-source\-v6 ( ( \fIipv6_address\fR | * ) | [ address ( \fIipv6_address\fR | * ) ] ) [ port ( \fIinteger\fR | * ) ];
|
||||
cleaning\-interval \fIinteger\fR;
|
||||
min\-roots \fIinteger\fR; // not implemented
|
||||
lame\-ttl \fIinteger\fR;
|
||||
@ -214,30 +215,48 @@ options {
|
||||
max\-cache\-ttl \fIinteger\fR;
|
||||
transfer\-format ( many\-answers | one\-answer );
|
||||
max\-cache\-size \fIsize_no_default\fR;
|
||||
max\-acache\-size \fIsize_no_default\fR;
|
||||
clients\-per\-query \fInumber\fR;
|
||||
max\-clients\-per\-query \fInumber\fR;
|
||||
check\-names ( master | slave | response )
|
||||
( fail | warn | ignore );
|
||||
cache\-file \fIquoted_string\fR;
|
||||
check\-mx ( fail | warn | ignore );
|
||||
check\-integrity \fIboolean\fR;
|
||||
check\-mx\-cname ( fail | warn | ignore );
|
||||
check\-srv\-cname ( fail | warn | ignore );
|
||||
cache\-file \fIquoted_string\fR; // test option
|
||||
suppress\-initial\-notify \fIboolean\fR; // not yet implemented
|
||||
preferred\-glue \fIstring\fR;
|
||||
dual\-stack\-servers [ port \fIinteger\fR ] {
|
||||
( \fIquoted_string\fR [port \fIinteger\fR] |
|
||||
\fIipv4_address\fR [port \fIinteger\fR] |
|
||||
\fIipv6_address\fR [port \fIinteger\fR] ); ...
|
||||
}
|
||||
};
|
||||
edns\-udp\-size \fIinteger\fR;
|
||||
max\-udp\-size \fIinteger\fR;
|
||||
root\-delegation\-only [ exclude { \fIquoted_string\fR; ... } ];
|
||||
disable\-algorithms \fIstring\fR { \fIstring\fR; ... };
|
||||
dnssec\-enable \fIboolean\fR;
|
||||
dnssec\-validation \fIboolean\fR;
|
||||
dnssec\-lookaside \fIstring\fR trust\-anchor \fIstring\fR;
|
||||
dnssec\-must\-be\-secure \fIstring\fR \fIboolean\fR;
|
||||
dnssec\-accept\-expired \fIboolean\fR;
|
||||
empty\-server \fIstring\fR;
|
||||
empty\-contact \fIstring\fR;
|
||||
empty\-zones\-enable \fIboolean\fR;
|
||||
disable\-empty\-zone \fIstring\fR;
|
||||
dialup \fIdialuptype\fR;
|
||||
ixfr\-from\-differences \fIixfrdiff\fR;
|
||||
allow\-query { \fIaddress_match_element\fR; ... };
|
||||
allow\-query\-cache { \fIaddress_match_element\fR; ... };
|
||||
allow\-transfer { \fIaddress_match_element\fR; ... };
|
||||
allow\-update { \fIaddress_match_element\fR; ... };
|
||||
allow\-update\-forwarding { \fIaddress_match_element\fR; ... };
|
||||
update\-check\-ksk \fIboolean\fR;
|
||||
notify \fInotifytype\fR;
|
||||
notify\-source ( \fIipv4_address\fR | * ) [ port ( \fIinteger\fR | * ) ];
|
||||
notify\-source\-v6 ( \fIipv6_address\fR | * ) [ port ( \fIinteger\fR | * ) ];
|
||||
notify\-delay \fIseconds\fR;
|
||||
also\-notify [ port \fIinteger\fR ] { ( \fIipv4_address\fR | \fIipv6_address\fR )
|
||||
[ port \fIinteger\fR ]; ... };
|
||||
allow\-notify { \fIaddress_match_element\fR; ... };
|
||||
@ -267,6 +286,8 @@ options {
|
||||
use\-alt\-transfer\-source \fIboolean\fR;
|
||||
zone\-statistics \fIboolean\fR;
|
||||
key\-directory \fIquoted_string\fR;
|
||||
zero\-no\-soa\-ttl \fIboolean\fR;
|
||||
zero\-no\-soa\-ttl\-cache \fIboolean\fR;
|
||||
allow\-v6\-synthesis { \fIaddress_match_element\fR; ... }; // obsolete
|
||||
deallocate\-on\-exit \fIboolean\fR; // obsolete
|
||||
fake\-iquery \fIboolean\fR; // obsolete
|
||||
@ -284,7 +305,7 @@ options {
|
||||
.RE
|
||||
.SH "VIEW"
|
||||
.sp
|
||||
.RS 3n
|
||||
.RS 4
|
||||
.nf
|
||||
view \fIstring\fR \fIoptional_class\fR {
|
||||
match\-clients { \fIaddress_match_element\fR; ... };
|
||||
@ -297,7 +318,7 @@ view \fIstring\fR \fIoptional_class\fR {
|
||||
zone \fIstring\fR \fIoptional_class\fR {
|
||||
...
|
||||
};
|
||||
server ( \fIipv4_address\fR | \fIipv6_address\fR ) {
|
||||
server ( \fIipv4_address\fR\fI[/prefixlen]\fR | \fIipv6_address\fR\fI[/prefixlen]\fR ) {
|
||||
...
|
||||
};
|
||||
trusted\-keys {
|
||||
@ -318,8 +339,8 @@ view \fIstring\fR \fIoptional_class\fR {
|
||||
rfc2308\-type1 \fIboolean\fR; // not yet implemented
|
||||
additional\-from\-auth \fIboolean\fR;
|
||||
additional\-from\-cache \fIboolean\fR;
|
||||
query\-source [ address ( \fIipv4_address\fR | * ) ] [ port ( \fIinteger\fR | * ) ];
|
||||
query\-source\-v6 [ address ( \fIipv6_address\fR | * ) ] [ port ( \fIinteger\fR | * ) ];
|
||||
query\-source ( ( \fIipv4_address\fR | * ) | [ address ( \fIipv4_address\fR | * ) ] ) [ port ( \fIinteger\fR | * ) ];
|
||||
query\-source\-v6 ( ( \fIipv6_address\fR | * ) | [ address ( \fIipv6_address\fR | * ) ] ) [ port ( \fIinteger\fR | * ) ];
|
||||
cleaning\-interval \fIinteger\fR;
|
||||
min\-roots \fIinteger\fR; // not implemented
|
||||
lame\-ttl \fIinteger\fR;
|
||||
@ -327,9 +348,16 @@ view \fIstring\fR \fIoptional_class\fR {
|
||||
max\-cache\-ttl \fIinteger\fR;
|
||||
transfer\-format ( many\-answers | one\-answer );
|
||||
max\-cache\-size \fIsize_no_default\fR;
|
||||
max\-acache\-size \fIsize_no_default\fR;
|
||||
clients\-per\-query \fInumber\fR;
|
||||
max\-clients\-per\-query \fInumber\fR;
|
||||
check\-names ( master | slave | response )
|
||||
( fail | warn | ignore );
|
||||
cache\-file \fIquoted_string\fR;
|
||||
check\-mx ( fail | warn | ignore );
|
||||
check\-integrity \fIboolean\fR;
|
||||
check\-mx\-cname ( fail | warn | ignore );
|
||||
check\-srv\-cname ( fail | warn | ignore );
|
||||
cache\-file \fIquoted_string\fR; // test option
|
||||
suppress\-initial\-notify \fIboolean\fR; // not yet implemented
|
||||
preferred\-glue \fIstring\fR;
|
||||
dual\-stack\-servers [ port \fIinteger\fR ] {
|
||||
@ -338,19 +366,30 @@ view \fIstring\fR \fIoptional_class\fR {
|
||||
\fIipv6_address\fR [port \fIinteger\fR] ); ...
|
||||
};
|
||||
edns\-udp\-size \fIinteger\fR;
|
||||
max\-udp\-size \fIinteger\fR;
|
||||
root\-delegation\-only [ exclude { \fIquoted_string\fR; ... } ];
|
||||
disable\-algorithms \fIstring\fR { \fIstring\fR; ... };
|
||||
dnssec\-enable \fIboolean\fR;
|
||||
dnssec\-validation \fIboolean\fR;
|
||||
dnssec\-lookaside \fIstring\fR trust\-anchor \fIstring\fR;
|
||||
dnssec\-must\-be\-secure \fIstring\fR \fIboolean\fR;
|
||||
dnssec\-accept\-expired \fIboolean\fR;
|
||||
empty\-server \fIstring\fR;
|
||||
empty\-contact \fIstring\fR;
|
||||
empty\-zones\-enable \fIboolean\fR;
|
||||
disable\-empty\-zone \fIstring\fR;
|
||||
dialup \fIdialuptype\fR;
|
||||
ixfr\-from\-differences \fIixfrdiff\fR;
|
||||
allow\-query { \fIaddress_match_element\fR; ... };
|
||||
allow\-query\-cache { \fIaddress_match_element\fR; ... };
|
||||
allow\-transfer { \fIaddress_match_element\fR; ... };
|
||||
allow\-update { \fIaddress_match_element\fR; ... };
|
||||
allow\-update\-forwarding { \fIaddress_match_element\fR; ... };
|
||||
update\-check\-ksk \fIboolean\fR;
|
||||
notify \fInotifytype\fR;
|
||||
notify\-source ( \fIipv4_address\fR | * ) [ port ( \fIinteger\fR | * ) ];
|
||||
notify\-source\-v6 ( \fIipv6_address\fR | * ) [ port ( \fIinteger\fR | * ) ];
|
||||
notify\-delay \fIseconds\fR;
|
||||
also\-notify [ port \fIinteger\fR ] { ( \fIipv4_address\fR | \fIipv6_address\fR )
|
||||
[ port \fIinteger\fR ]; ... };
|
||||
allow\-notify { \fIaddress_match_element\fR; ... };
|
||||
@ -380,6 +419,8 @@ view \fIstring\fR \fIoptional_class\fR {
|
||||
use\-alt\-transfer\-source \fIboolean\fR;
|
||||
zone\-statistics \fIboolean\fR;
|
||||
key\-directory \fIquoted_string\fR;
|
||||
zero\-no\-soa\-ttl \fIboolean\fR;
|
||||
zero\-no\-soa\-ttl\-cache \fIboolean\fR;
|
||||
allow\-v6\-synthesis { \fIaddress_match_element\fR; ... }; // obsolete
|
||||
fetch\-glue \fIboolean\fR; // obsolete
|
||||
maintain\-ixfr\-base \fIboolean\fR; // obsolete
|
||||
@ -389,7 +430,7 @@ view \fIstring\fR \fIoptional_class\fR {
|
||||
.RE
|
||||
.SH "ZONE"
|
||||
.sp
|
||||
.RS 3n
|
||||
.RS 4
|
||||
.nf
|
||||
zone \fIstring\fR \fIoptional_class\fR {
|
||||
type ( master | slave | stub | hint |
|
||||
@ -403,8 +444,14 @@ zone \fIstring\fR \fIoptional_class\fR {
|
||||
database \fIstring\fR;
|
||||
delegation\-only \fIboolean\fR;
|
||||
check\-names ( fail | warn | ignore );
|
||||
check\-mx ( fail | warn | ignore );
|
||||
check\-integrity \fIboolean\fR;
|
||||
check\-mx\-cname ( fail | warn | ignore );
|
||||
check\-srv\-cname ( fail | warn | ignore );
|
||||
dialup \fIdialuptype\fR;
|
||||
ixfr\-from\-differences \fIboolean\fR;
|
||||
journal \fIquoted_string\fR;
|
||||
zero\-no\-soa\-ttl \fIboolean\fR;
|
||||
allow\-query { \fIaddress_match_element\fR; ... };
|
||||
allow\-transfer { \fIaddress_match_element\fR; ... };
|
||||
allow\-update { \fIaddress_match_element\fR; ... };
|
||||
@ -414,9 +461,11 @@ zone \fIstring\fR \fIoptional_class\fR {
|
||||
( name | subdomain | wildcard | self ) \fIstring\fR
|
||||
\fIrrtypelist\fR; ...
|
||||
};
|
||||
update\-check\-ksk \fIboolean\fR;
|
||||
notify \fInotifytype\fR;
|
||||
notify\-source ( \fIipv4_address\fR | * ) [ port ( \fIinteger\fR | * ) ];
|
||||
notify\-source\-v6 ( \fIipv6_address\fR | * ) [ port ( \fIinteger\fR | * ) ];
|
||||
notify\-delay \fIseconds\fR;
|
||||
also\-notify [ port \fIinteger\fR ] { ( \fIipv4_address\fR | \fIipv6_address\fR )
|
||||
[ port \fIinteger\fR ]; ... };
|
||||
allow\-notify { \fIaddress_match_element\fR; ... };
|
||||
@ -463,4 +512,5 @@ zone \fIstring\fR \fIoptional_class\fR {
|
||||
\fBrndc\fR(8),
|
||||
\fBBIND 9 Administrator Reference Manual\fR().
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 2004\-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2004\-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!--
|
||||
- Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
- purpose with or without fee is hereby granted, provided that the above
|
||||
@ -17,8 +17,7 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: named.conf.docbook,v 1.1.4.8 2006/09/13 00:26:41 marka Exp $ -->
|
||||
|
||||
<!-- $Id: named.conf.docbook,v 1.1.2.25 2007/01/29 23:57:20 marka Exp $ -->
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
<date>Aug 13, 2004</date>
|
||||
@ -30,20 +29,21 @@
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><filename>named.conf</filename></refname>
|
||||
<refpurpose>configuration file for named</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<year>2006</year>
|
||||
<year>2007</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname><filename>named.conf</filename></refname>
|
||||
<refpurpose>configuration file for named</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>named.conf</command>
|
||||
@ -52,58 +52,60 @@
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<filename>named.conf</filename> is the configuration file for
|
||||
<command>named</command>. Statements are enclosed
|
||||
in braces and terminated with a semi-colon. Clauses in
|
||||
the statements are also semi-colon terminated. The usual
|
||||
comment styles are supported:
|
||||
<para><filename>named.conf</filename> is the configuration file
|
||||
for
|
||||
<command>named</command>. Statements are enclosed
|
||||
in braces and terminated with a semi-colon. Clauses in
|
||||
the statements are also semi-colon terminated. The usual
|
||||
comment styles are supported:
|
||||
</para>
|
||||
<para>
|
||||
C style: /* */
|
||||
C style: /* */
|
||||
</para>
|
||||
<para>
|
||||
C++ style: // to end of line
|
||||
C++ style: // to end of line
|
||||
</para>
|
||||
<para>
|
||||
Unix style: # to end of line
|
||||
Unix style: # to end of line
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>ACL</title>
|
||||
<literallayout>
|
||||
<refsect1>
|
||||
<title>ACL</title>
|
||||
<literallayout>
|
||||
acl <replaceable>string</replaceable> { <replaceable>address_match_element</replaceable>; ... };
|
||||
|
||||
</literallayout>
|
||||
</refsect1>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>KEY</title>
|
||||
<literallayout>
|
||||
<refsect1>
|
||||
<title>KEY</title>
|
||||
<literallayout>
|
||||
key <replaceable>domain_name</replaceable> {
|
||||
algorithm <replaceable>string</replaceable>;
|
||||
secret <replaceable>string</replaceable>;
|
||||
};
|
||||
</literallayout>
|
||||
</refsect1>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>MASTERS</title>
|
||||
<literallayout>
|
||||
<refsect1>
|
||||
<title>MASTERS</title>
|
||||
<literallayout>
|
||||
masters <replaceable>string</replaceable> <optional> port <replaceable>integer</replaceable> </optional> {
|
||||
( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> <optional>port <replaceable>integer</replaceable></optional> |
|
||||
<replaceable>ipv6_address</replaceable> <optional>port <replaceable>integer</replaceable></optional> ) <optional> key <replaceable>string</replaceable> </optional>; ...
|
||||
};
|
||||
</literallayout>
|
||||
</refsect1>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SERVER</title>
|
||||
<literallayout>
|
||||
server ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ) {
|
||||
<refsect1>
|
||||
<title>SERVER</title>
|
||||
<literallayout>
|
||||
server ( <replaceable>ipv4_address<optional>/prefixlen</optional></replaceable> | <replaceable>ipv6_address<optional>/prefixlen</optional></replaceable> ) {
|
||||
bogus <replaceable>boolean</replaceable>;
|
||||
edns <replaceable>boolean</replaceable>;
|
||||
edns-udp-size <replaceable>integer</replaceable>;
|
||||
max-udp-size <replaceable>integer</replaceable>;
|
||||
provide-ixfr <replaceable>boolean</replaceable>;
|
||||
request-ixfr <replaceable>boolean</replaceable>;
|
||||
keys <replaceable>server_key</replaceable>;
|
||||
@ -117,20 +119,20 @@ server ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</re
|
||||
support-ixfr <replaceable>boolean</replaceable>; // obsolete
|
||||
};
|
||||
</literallayout>
|
||||
</refsect1>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>TRUSTED-KEYS</title>
|
||||
<literallayout>
|
||||
<refsect1>
|
||||
<title>TRUSTED-KEYS</title>
|
||||
<literallayout>
|
||||
trusted-keys {
|
||||
<replaceable>domain_name</replaceable> <replaceable>flags</replaceable> <replaceable>protocol</replaceable> <replaceable>algorithm</replaceable> <replaceable>key</replaceable>; ...
|
||||
};
|
||||
</literallayout>
|
||||
</refsect1>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>CONTROLS</title>
|
||||
<literallayout>
|
||||
<refsect1>
|
||||
<title>CONTROLS</title>
|
||||
<literallayout>
|
||||
controls {
|
||||
inet ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> | * )
|
||||
<optional> port ( <replaceable>integer</replaceable> | * ) </optional>
|
||||
@ -139,11 +141,11 @@ controls {
|
||||
unix <replaceable>unsupported</replaceable>; // not implemented
|
||||
};
|
||||
</literallayout>
|
||||
</refsect1>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>LOGGING</title>
|
||||
<literallayout>
|
||||
<refsect1>
|
||||
<title>LOGGING</title>
|
||||
<literallayout>
|
||||
logging {
|
||||
channel <replaceable>string</replaceable> {
|
||||
file <replaceable>log_file</replaceable>;
|
||||
@ -158,11 +160,11 @@ logging {
|
||||
category <replaceable>string</replaceable> { <replaceable>string</replaceable>; ... };
|
||||
};
|
||||
</literallayout>
|
||||
</refsect1>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>LWRES</title>
|
||||
<literallayout>
|
||||
<refsect1>
|
||||
<title>LWRES</title>
|
||||
<literallayout>
|
||||
lwres {
|
||||
listen-on <optional> port <replaceable>integer</replaceable> </optional> {
|
||||
( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ) <optional> port <replaceable>integer</replaceable> </optional>; ...
|
||||
@ -172,11 +174,11 @@ lwres {
|
||||
ndots <replaceable>integer</replaceable>;
|
||||
};
|
||||
</literallayout>
|
||||
</refsect1>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
<literallayout>
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
<literallayout>
|
||||
options {
|
||||
avoid-v4-udp-ports { <replaceable>port</replaceable>; ... };
|
||||
avoid-v6-udp-ports { <replaceable>port</replaceable>; ... };
|
||||
@ -184,7 +186,6 @@ options {
|
||||
coresize <replaceable>size</replaceable>;
|
||||
datasize <replaceable>size</replaceable>;
|
||||
directory <replaceable>quoted_string</replaceable>;
|
||||
cache-file <replaceable>quoted_string</replaceable>; // test option
|
||||
dump-file <replaceable>quoted_string</replaceable>;
|
||||
files <replaceable>size</replaceable>;
|
||||
heartbeat-interval <replaceable>integer</replaceable>;
|
||||
@ -232,8 +233,8 @@ options {
|
||||
rfc2308-type1 <replaceable>boolean</replaceable>; // not yet implemented
|
||||
additional-from-auth <replaceable>boolean</replaceable>;
|
||||
additional-from-cache <replaceable>boolean</replaceable>;
|
||||
query-source <optional> address ( <replaceable>ipv4_address</replaceable> | * ) </optional> <optional> port ( <replaceable>integer</replaceable> | * ) </optional>;
|
||||
query-source-v6 <optional> address ( <replaceable>ipv6_address</replaceable> | * ) </optional> <optional> port ( <replaceable>integer</replaceable> | * ) </optional>;
|
||||
query-source ( ( <replaceable>ipv4_address</replaceable> | * ) | <optional> address ( <replaceable>ipv4_address</replaceable> | * ) </optional> ) <optional> port ( <replaceable>integer</replaceable> | * ) </optional>;
|
||||
query-source-v6 ( ( <replaceable>ipv6_address</replaceable> | * ) | <optional> address ( <replaceable>ipv6_address</replaceable> | * ) </optional> ) <optional> port ( <replaceable>integer</replaceable> | * ) </optional>;
|
||||
cleaning-interval <replaceable>integer</replaceable>;
|
||||
min-roots <replaceable>integer</replaceable>; // not implemented
|
||||
lame-ttl <replaceable>integer</replaceable>;
|
||||
@ -241,33 +242,52 @@ options {
|
||||
max-cache-ttl <replaceable>integer</replaceable>;
|
||||
transfer-format ( many-answers | one-answer );
|
||||
max-cache-size <replaceable>size_no_default</replaceable>;
|
||||
max-acache-size <replaceable>size_no_default</replaceable>;
|
||||
clients-per-query <replaceable>number</replaceable>;
|
||||
max-clients-per-query <replaceable>number</replaceable>;
|
||||
check-names ( master | slave | response )
|
||||
( fail | warn | ignore );
|
||||
cache-file <replaceable>quoted_string</replaceable>;
|
||||
check-mx ( fail | warn | ignore );
|
||||
check-integrity <replaceable>boolean</replaceable>;
|
||||
check-mx-cname ( fail | warn | ignore );
|
||||
check-srv-cname ( fail | warn | ignore );
|
||||
cache-file <replaceable>quoted_string</replaceable>; // test option
|
||||
suppress-initial-notify <replaceable>boolean</replaceable>; // not yet implemented
|
||||
preferred-glue <replaceable>string</replaceable>;
|
||||
dual-stack-servers <optional> port <replaceable>integer</replaceable> </optional> {
|
||||
( <replaceable>quoted_string</replaceable> <optional>port <replaceable>integer</replaceable></optional> |
|
||||
<replaceable>ipv4_address</replaceable> <optional>port <replaceable>integer</replaceable></optional> |
|
||||
<replaceable>ipv6_address</replaceable> <optional>port <replaceable>integer</replaceable></optional> ); ...
|
||||
}
|
||||
};
|
||||
edns-udp-size <replaceable>integer</replaceable>;
|
||||
max-udp-size <replaceable>integer</replaceable>;
|
||||
root-delegation-only <optional> exclude { <replaceable>quoted_string</replaceable>; ... } </optional>;
|
||||
disable-algorithms <replaceable>string</replaceable> { <replaceable>string</replaceable>; ... };
|
||||
dnssec-enable <replaceable>boolean</replaceable>;
|
||||
dnssec-validation <replaceable>boolean</replaceable>;
|
||||
dnssec-lookaside <replaceable>string</replaceable> trust-anchor <replaceable>string</replaceable>;
|
||||
dnssec-must-be-secure <replaceable>string</replaceable> <replaceable>boolean</replaceable>;
|
||||
dnssec-accept-expired <replaceable>boolean</replaceable>;
|
||||
|
||||
empty-server <replaceable>string</replaceable>;
|
||||
empty-contact <replaceable>string</replaceable>;
|
||||
empty-zones-enable <replaceable>boolean</replaceable>;
|
||||
disable-empty-zone <replaceable>string</replaceable>;
|
||||
|
||||
dialup <replaceable>dialuptype</replaceable>;
|
||||
ixfr-from-differences <replaceable>ixfrdiff</replaceable>;
|
||||
|
||||
allow-query { <replaceable>address_match_element</replaceable>; ... };
|
||||
allow-query-cache { <replaceable>address_match_element</replaceable>; ... };
|
||||
allow-transfer { <replaceable>address_match_element</replaceable>; ... };
|
||||
allow-update { <replaceable>address_match_element</replaceable>; ... };
|
||||
allow-update-forwarding { <replaceable>address_match_element</replaceable>; ... };
|
||||
update-check-ksk <replaceable>boolean</replaceable>;
|
||||
|
||||
notify <replaceable>notifytype</replaceable>;
|
||||
notify-source ( <replaceable>ipv4_address</replaceable> | * ) <optional> port ( <replaceable>integer</replaceable> | * ) </optional>;
|
||||
notify-source-v6 ( <replaceable>ipv6_address</replaceable> | * ) <optional> port ( <replaceable>integer</replaceable> | * ) </optional>;
|
||||
notify-delay <replaceable>seconds</replaceable>;
|
||||
also-notify <optional> port <replaceable>integer</replaceable> </optional> { ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> )
|
||||
<optional> port <replaceable>integer</replaceable> </optional>; ... };
|
||||
allow-notify { <replaceable>address_match_element</replaceable>; ... };
|
||||
@ -302,6 +322,8 @@ options {
|
||||
|
||||
zone-statistics <replaceable>boolean</replaceable>;
|
||||
key-directory <replaceable>quoted_string</replaceable>;
|
||||
zero-no-soa-ttl <replaceable>boolean</replaceable>;
|
||||
zero-no-soa-ttl-cache <replaceable>boolean</replaceable>;
|
||||
|
||||
allow-v6-synthesis { <replaceable>address_match_element</replaceable>; ... }; // obsolete
|
||||
deallocate-on-exit <replaceable>boolean</replaceable>; // obsolete
|
||||
@ -317,11 +339,11 @@ options {
|
||||
use-id-pool <replaceable>boolean</replaceable>; // obsolete
|
||||
};
|
||||
</literallayout>
|
||||
</refsect1>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>VIEW</title>
|
||||
<literallayout>
|
||||
<refsect1>
|
||||
<title>VIEW</title>
|
||||
<literallayout>
|
||||
view <replaceable>string</replaceable> <replaceable>optional_class</replaceable> {
|
||||
match-clients { <replaceable>address_match_element</replaceable>; ... };
|
||||
match-destinations { <replaceable>address_match_element</replaceable>; ... };
|
||||
@ -336,7 +358,7 @@ view <replaceable>string</replaceable> <replaceable>optional_class</replaceable>
|
||||
...
|
||||
};
|
||||
|
||||
server ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ) {
|
||||
server ( <replaceable>ipv4_address<optional>/prefixlen</optional></replaceable> | <replaceable>ipv6_address<optional>/prefixlen</optional></replaceable> ) {
|
||||
...
|
||||
};
|
||||
|
||||
@ -359,8 +381,8 @@ view <replaceable>string</replaceable> <replaceable>optional_class</replaceable>
|
||||
rfc2308-type1 <replaceable>boolean</replaceable>; // not yet implemented
|
||||
additional-from-auth <replaceable>boolean</replaceable>;
|
||||
additional-from-cache <replaceable>boolean</replaceable>;
|
||||
query-source <optional> address ( <replaceable>ipv4_address</replaceable> | * ) </optional> <optional> port ( <replaceable>integer</replaceable> | * ) </optional>;
|
||||
query-source-v6 <optional> address ( <replaceable>ipv6_address</replaceable> | * ) </optional> <optional> port ( <replaceable>integer</replaceable> | * ) </optional>;
|
||||
query-source ( ( <replaceable>ipv4_address</replaceable> | * ) | <optional> address ( <replaceable>ipv4_address</replaceable> | * ) </optional> ) <optional> port ( <replaceable>integer</replaceable> | * ) </optional>;
|
||||
query-source-v6 ( ( <replaceable>ipv6_address</replaceable> | * ) | <optional> address ( <replaceable>ipv6_address</replaceable> | * ) </optional> ) <optional> port ( <replaceable>integer</replaceable> | * ) </optional>;
|
||||
cleaning-interval <replaceable>integer</replaceable>;
|
||||
min-roots <replaceable>integer</replaceable>; // not implemented
|
||||
lame-ttl <replaceable>integer</replaceable>;
|
||||
@ -368,9 +390,16 @@ view <replaceable>string</replaceable> <replaceable>optional_class</replaceable>
|
||||
max-cache-ttl <replaceable>integer</replaceable>;
|
||||
transfer-format ( many-answers | one-answer );
|
||||
max-cache-size <replaceable>size_no_default</replaceable>;
|
||||
max-acache-size <replaceable>size_no_default</replaceable>;
|
||||
clients-per-query <replaceable>number</replaceable>;
|
||||
max-clients-per-query <replaceable>number</replaceable>;
|
||||
check-names ( master | slave | response )
|
||||
( fail | warn | ignore );
|
||||
cache-file <replaceable>quoted_string</replaceable>;
|
||||
check-mx ( fail | warn | ignore );
|
||||
check-integrity <replaceable>boolean</replaceable>;
|
||||
check-mx-cname ( fail | warn | ignore );
|
||||
check-srv-cname ( fail | warn | ignore );
|
||||
cache-file <replaceable>quoted_string</replaceable>; // test option
|
||||
suppress-initial-notify <replaceable>boolean</replaceable>; // not yet implemented
|
||||
preferred-glue <replaceable>string</replaceable>;
|
||||
dual-stack-servers <optional> port <replaceable>integer</replaceable> </optional> {
|
||||
@ -379,22 +408,34 @@ view <replaceable>string</replaceable> <replaceable>optional_class</replaceable>
|
||||
<replaceable>ipv6_address</replaceable> <optional>port <replaceable>integer</replaceable></optional> ); ...
|
||||
};
|
||||
edns-udp-size <replaceable>integer</replaceable>;
|
||||
max-udp-size <replaceable>integer</replaceable>;
|
||||
root-delegation-only <optional> exclude { <replaceable>quoted_string</replaceable>; ... } </optional>;
|
||||
disable-algorithms <replaceable>string</replaceable> { <replaceable>string</replaceable>; ... };
|
||||
dnssec-enable <replaceable>boolean</replaceable>;
|
||||
dnssec-validation <replaceable>boolean</replaceable>;
|
||||
dnssec-lookaside <replaceable>string</replaceable> trust-anchor <replaceable>string</replaceable>;
|
||||
|
||||
dnssec-must-be-secure <replaceable>string</replaceable> <replaceable>boolean</replaceable>;
|
||||
dnssec-accept-expired <replaceable>boolean</replaceable>;
|
||||
|
||||
empty-server <replaceable>string</replaceable>;
|
||||
empty-contact <replaceable>string</replaceable>;
|
||||
empty-zones-enable <replaceable>boolean</replaceable>;
|
||||
disable-empty-zone <replaceable>string</replaceable>;
|
||||
|
||||
dialup <replaceable>dialuptype</replaceable>;
|
||||
ixfr-from-differences <replaceable>ixfrdiff</replaceable>;
|
||||
|
||||
allow-query { <replaceable>address_match_element</replaceable>; ... };
|
||||
allow-query-cache { <replaceable>address_match_element</replaceable>; ... };
|
||||
allow-transfer { <replaceable>address_match_element</replaceable>; ... };
|
||||
allow-update { <replaceable>address_match_element</replaceable>; ... };
|
||||
allow-update-forwarding { <replaceable>address_match_element</replaceable>; ... };
|
||||
update-check-ksk <replaceable>boolean</replaceable>;
|
||||
|
||||
notify <replaceable>notifytype</replaceable>;
|
||||
notify-source ( <replaceable>ipv4_address</replaceable> | * ) <optional> port ( <replaceable>integer</replaceable> | * ) </optional>;
|
||||
notify-source-v6 ( <replaceable>ipv6_address</replaceable> | * ) <optional> port ( <replaceable>integer</replaceable> | * ) </optional>;
|
||||
notify-delay <replaceable>seconds</replaceable>;
|
||||
also-notify <optional> port <replaceable>integer</replaceable> </optional> { ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> )
|
||||
<optional> port <replaceable>integer</replaceable> </optional>; ... };
|
||||
allow-notify { <replaceable>address_match_element</replaceable>; ... };
|
||||
@ -429,6 +470,8 @@ view <replaceable>string</replaceable> <replaceable>optional_class</replaceable>
|
||||
|
||||
zone-statistics <replaceable>boolean</replaceable>;
|
||||
key-directory <replaceable>quoted_string</replaceable>;
|
||||
zero-no-soa-ttl <replaceable>boolean</replaceable>;
|
||||
zero-no-soa-ttl-cache <replaceable>boolean</replaceable>;
|
||||
|
||||
allow-v6-synthesis { <replaceable>address_match_element</replaceable>; ... }; // obsolete
|
||||
fetch-glue <replaceable>boolean</replaceable>; // obsolete
|
||||
@ -436,11 +479,11 @@ view <replaceable>string</replaceable> <replaceable>optional_class</replaceable>
|
||||
max-ixfr-log-size <replaceable>size</replaceable>; // obsolete
|
||||
};
|
||||
</literallayout>
|
||||
</refsect1>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>ZONE</title>
|
||||
<literallayout>
|
||||
<refsect1>
|
||||
<title>ZONE</title>
|
||||
<literallayout>
|
||||
zone <replaceable>string</replaceable> <replaceable>optional_class</replaceable> {
|
||||
type ( master | slave | stub | hint |
|
||||
forward | delegation-only );
|
||||
@ -455,8 +498,14 @@ zone <replaceable>string</replaceable> <replaceable>optional_class</replaceable>
|
||||
database <replaceable>string</replaceable>;
|
||||
delegation-only <replaceable>boolean</replaceable>;
|
||||
check-names ( fail | warn | ignore );
|
||||
check-mx ( fail | warn | ignore );
|
||||
check-integrity <replaceable>boolean</replaceable>;
|
||||
check-mx-cname ( fail | warn | ignore );
|
||||
check-srv-cname ( fail | warn | ignore );
|
||||
dialup <replaceable>dialuptype</replaceable>;
|
||||
ixfr-from-differences <replaceable>boolean</replaceable>;
|
||||
journal <replaceable>quoted_string</replaceable>;
|
||||
zero-no-soa-ttl <replaceable>boolean</replaceable>;
|
||||
|
||||
allow-query { <replaceable>address_match_element</replaceable>; ... };
|
||||
allow-transfer { <replaceable>address_match_element</replaceable>; ... };
|
||||
@ -467,10 +516,12 @@ zone <replaceable>string</replaceable> <replaceable>optional_class</replaceable>
|
||||
( name | subdomain | wildcard | self ) <replaceable>string</replaceable>
|
||||
<replaceable>rrtypelist</replaceable>; ...
|
||||
};
|
||||
update-check-ksk <replaceable>boolean</replaceable>;
|
||||
|
||||
notify <replaceable>notifytype</replaceable>;
|
||||
notify-source ( <replaceable>ipv4_address</replaceable> | * ) <optional> port ( <replaceable>integer</replaceable> | * ) </optional>;
|
||||
notify-source-v6 ( <replaceable>ipv6_address</replaceable> | * ) <optional> port ( <replaceable>integer</replaceable> | * ) </optional>;
|
||||
notify-delay <replaceable>seconds</replaceable>;
|
||||
also-notify <optional> port <replaceable>integer</replaceable> </optional> { ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> )
|
||||
<optional> port <replaceable>integer</replaceable> </optional>; ... };
|
||||
allow-notify { <replaceable>address_match_element</replaceable>; ... };
|
||||
@ -513,32 +564,29 @@ zone <replaceable>string</replaceable> <replaceable>optional_class</replaceable>
|
||||
pubkey <replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>quoted_string</replaceable>; // obsolete
|
||||
};
|
||||
</literallayout>
|
||||
</refsect1>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>FILES</title>
|
||||
<para>
|
||||
<filename>/etc/named.conf</filename>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
<title>FILES</title>
|
||||
<para><filename>/etc/named.conf</filename>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>rndc</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>BIND 9 Administrator Reference Manual</refentrytitle>
|
||||
</citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para><citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>rndc</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>BIND 9 Administrator Reference Manual</refentrytitle>
|
||||
</citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
<!--
|
||||
</refentry><!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
- Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
- purpose with or without fee is hereby granted, provided that the above
|
||||
@ -13,15 +13,15 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: named.conf.html,v 1.1.4.15 2006/09/13 02:56:21 marka Exp $ -->
|
||||
<!-- $Id: named.conf.html,v 1.1.2.32 2007/01/30 00:23:44 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>named.conf</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482688"></a><div class="titlepage"></div>
|
||||
<a name="id2476275"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p><code class="filename">named.conf</code> — configuration file for named</p>
|
||||
@ -31,33 +31,33 @@
|
||||
<div class="cmdsynopsis"><p><code class="command">named.conf</code> </p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549388"></a><h2>DESCRIPTION</h2>
|
||||
<p>
|
||||
<code class="filename">named.conf</code> is the configuration file for
|
||||
<span><strong class="command">named</strong></span>. Statements are enclosed
|
||||
in braces and terminated with a semi-colon. Clauses in
|
||||
the statements are also semi-colon terminated. The usual
|
||||
comment styles are supported:
|
||||
<a name="id2542042"></a><h2>DESCRIPTION</h2>
|
||||
<p><code class="filename">named.conf</code> is the configuration file
|
||||
for
|
||||
<span><strong class="command">named</strong></span>. Statements are enclosed
|
||||
in braces and terminated with a semi-colon. Clauses in
|
||||
the statements are also semi-colon terminated. The usual
|
||||
comment styles are supported:
|
||||
</p>
|
||||
<p>
|
||||
C style: /* */
|
||||
C style: /* */
|
||||
</p>
|
||||
<p>
|
||||
C++ style: // to end of line
|
||||
C++ style: // to end of line
|
||||
</p>
|
||||
<p>
|
||||
Unix style: # to end of line
|
||||
Unix style: # to end of line
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549417"></a><h2>ACL</h2>
|
||||
<a name="id2543367"></a><h2>ACL</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
acl <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
<br>
|
||||
</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549433"></a><h2>KEY</h2>
|
||||
<a name="id2543383"></a><h2>KEY</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
key <em class="replaceable"><code>domain_name</code></em> {<br>
|
||||
algorithm <em class="replaceable"><code>string</code></em>;<br>
|
||||
@ -66,7 +66,7 @@ key
|
||||
</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549452"></a><h2>MASTERS</h2>
|
||||
<a name="id2543402"></a><h2>MASTERS</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
masters <em class="replaceable"><code>string</code></em> [<span class="optional"> port <em class="replaceable"><code>integer</code></em> </span>] {<br>
|
||||
( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [<span class="optional">port <em class="replaceable"><code>integer</code></em></span>] |<br>
|
||||
@ -75,11 +75,13 @@ masters
|
||||
</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549498"></a><h2>SERVER</h2>
|
||||
<a name="id2543448"></a><h2>SERVER</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
server ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ) {<br>
|
||||
server ( <em class="replaceable"><code>ipv4_address[<span class="optional">/prefixlen</span>]</code></em> | <em class="replaceable"><code>ipv6_address[<span class="optional">/prefixlen</span>]</code></em> ) {<br>
|
||||
bogus <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
edns <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
edns-udp-size <em class="replaceable"><code>integer</code></em>;<br>
|
||||
max-udp-size <em class="replaceable"><code>integer</code></em>;<br>
|
||||
provide-ixfr <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
request-ixfr <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
keys <em class="replaceable"><code>server_key</code></em>;<br>
|
||||
@ -95,7 +97,7 @@ server
|
||||
</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549556"></a><h2>TRUSTED-KEYS</h2>
|
||||
<a name="id2543516"></a><h2>TRUSTED-KEYS</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
trusted-keys {<br>
|
||||
<em class="replaceable"><code>domain_name</code></em> <em class="replaceable"><code>flags</code></em> <em class="replaceable"><code>protocol</code></em> <em class="replaceable"><code>algorithm</code></em> <em class="replaceable"><code>key</code></em>; ... <br>
|
||||
@ -103,7 +105,7 @@ trusted-keys
|
||||
</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549581"></a><h2>CONTROLS</h2>
|
||||
<a name="id2543542"></a><h2>CONTROLS</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
controls {<br>
|
||||
inet ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> | * )<br>
|
||||
@ -115,7 +117,7 @@ controls
|
||||
</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549617"></a><h2>LOGGING</h2>
|
||||
<a name="id2543577"></a><h2>LOGGING</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
logging {<br>
|
||||
channel <em class="replaceable"><code>string</code></em> {<br>
|
||||
@ -133,7 +135,7 @@ logging
|
||||
</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549655"></a><h2>LWRES</h2>
|
||||
<a name="id2543616"></a><h2>LWRES</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
lwres {<br>
|
||||
listen-on [<span class="optional"> port <em class="replaceable"><code>integer</code></em> </span>] {<br>
|
||||
@ -146,7 +148,7 @@ lwres
|
||||
</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549697"></a><h2>OPTIONS</h2>
|
||||
<a name="id2543657"></a><h2>OPTIONS</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
options {<br>
|
||||
avoid-v4-udp-ports { <em class="replaceable"><code>port</code></em>; ... };<br>
|
||||
@ -155,7 +157,6 @@ options
|
||||
coresize <em class="replaceable"><code>size</code></em>;<br>
|
||||
datasize <em class="replaceable"><code>size</code></em>;<br>
|
||||
directory <em class="replaceable"><code>quoted_string</code></em>;<br>
|
||||
cache-file <em class="replaceable"><code>quoted_string</code></em>; // test option<br>
|
||||
dump-file <em class="replaceable"><code>quoted_string</code></em>;<br>
|
||||
files <em class="replaceable"><code>size</code></em>;<br>
|
||||
heartbeat-interval <em class="replaceable"><code>integer</code></em>;<br>
|
||||
@ -203,8 +204,8 @@ options
|
||||
rfc2308-type1 <em class="replaceable"><code>boolean</code></em>; // not yet implemented<br>
|
||||
additional-from-auth <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
additional-from-cache <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
query-source [<span class="optional"> address ( <em class="replaceable"><code>ipv4_address</code></em> | * ) </span>] [<span class="optional"> port ( <em class="replaceable"><code>integer</code></em> | * ) </span>];<br>
|
||||
query-source-v6 [<span class="optional"> address ( <em class="replaceable"><code>ipv6_address</code></em> | * ) </span>] [<span class="optional"> port ( <em class="replaceable"><code>integer</code></em> | * ) </span>];<br>
|
||||
query-source ( ( <em class="replaceable"><code>ipv4_address</code></em> | * ) | [<span class="optional"> address ( <em class="replaceable"><code>ipv4_address</code></em> | * ) </span>] ) [<span class="optional"> port ( <em class="replaceable"><code>integer</code></em> | * ) </span>];<br>
|
||||
query-source-v6 ( ( <em class="replaceable"><code>ipv6_address</code></em> | * ) | [<span class="optional"> address ( <em class="replaceable"><code>ipv6_address</code></em> | * ) </span>] ) [<span class="optional"> port ( <em class="replaceable"><code>integer</code></em> | * ) </span>];<br>
|
||||
cleaning-interval <em class="replaceable"><code>integer</code></em>;<br>
|
||||
min-roots <em class="replaceable"><code>integer</code></em>; // not implemented<br>
|
||||
lame-ttl <em class="replaceable"><code>integer</code></em>;<br>
|
||||
@ -212,33 +213,52 @@ options
|
||||
max-cache-ttl <em class="replaceable"><code>integer</code></em>;<br>
|
||||
transfer-format ( many-answers | one-answer );<br>
|
||||
max-cache-size <em class="replaceable"><code>size_no_default</code></em>;<br>
|
||||
max-acache-size <em class="replaceable"><code>size_no_default</code></em>;<br>
|
||||
clients-per-query <em class="replaceable"><code>number</code></em>;<br>
|
||||
max-clients-per-query <em class="replaceable"><code>number</code></em>;<br>
|
||||
check-names ( master | slave | response )<br>
|
||||
( fail | warn | ignore );<br>
|
||||
cache-file <em class="replaceable"><code>quoted_string</code></em>;<br>
|
||||
check-mx ( fail | warn | ignore );<br>
|
||||
check-integrity <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
check-mx-cname ( fail | warn | ignore );<br>
|
||||
check-srv-cname ( fail | warn | ignore );<br>
|
||||
cache-file <em class="replaceable"><code>quoted_string</code></em>; // test option<br>
|
||||
suppress-initial-notify <em class="replaceable"><code>boolean</code></em>; // not yet implemented<br>
|
||||
preferred-glue <em class="replaceable"><code>string</code></em>;<br>
|
||||
dual-stack-servers [<span class="optional"> port <em class="replaceable"><code>integer</code></em> </span>] {<br>
|
||||
( <em class="replaceable"><code>quoted_string</code></em> [<span class="optional">port <em class="replaceable"><code>integer</code></em></span>] |<br>
|
||||
<em class="replaceable"><code>ipv4_address</code></em> [<span class="optional">port <em class="replaceable"><code>integer</code></em></span>] |<br>
|
||||
<em class="replaceable"><code>ipv6_address</code></em> [<span class="optional">port <em class="replaceable"><code>integer</code></em></span>] ); ...<br>
|
||||
}<br>
|
||||
};<br>
|
||||
edns-udp-size <em class="replaceable"><code>integer</code></em>;<br>
|
||||
max-udp-size <em class="replaceable"><code>integer</code></em>;<br>
|
||||
root-delegation-only [<span class="optional"> exclude { <em class="replaceable"><code>quoted_string</code></em>; ... } </span>];<br>
|
||||
disable-algorithms <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>string</code></em>; ... };<br>
|
||||
dnssec-enable <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-validation <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-lookaside <em class="replaceable"><code>string</code></em> trust-anchor <em class="replaceable"><code>string</code></em>;<br>
|
||||
dnssec-must-be-secure <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-accept-expired <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
<br>
|
||||
empty-server <em class="replaceable"><code>string</code></em>;<br>
|
||||
empty-contact <em class="replaceable"><code>string</code></em>;<br>
|
||||
empty-zones-enable <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
disable-empty-zone <em class="replaceable"><code>string</code></em>;<br>
|
||||
<br>
|
||||
dialup <em class="replaceable"><code>dialuptype</code></em>;<br>
|
||||
ixfr-from-differences <em class="replaceable"><code>ixfrdiff</code></em>;<br>
|
||||
<br>
|
||||
allow-query { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
allow-query-cache { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
allow-transfer { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
allow-update { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
allow-update-forwarding { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
update-check-ksk <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
<br>
|
||||
notify <em class="replaceable"><code>notifytype</code></em>;<br>
|
||||
notify-source ( <em class="replaceable"><code>ipv4_address</code></em> | * ) [<span class="optional"> port ( <em class="replaceable"><code>integer</code></em> | * ) </span>];<br>
|
||||
notify-source-v6 ( <em class="replaceable"><code>ipv6_address</code></em> | * ) [<span class="optional"> port ( <em class="replaceable"><code>integer</code></em> | * ) </span>];<br>
|
||||
notify-delay <em class="replaceable"><code>seconds</code></em>;<br>
|
||||
also-notify [<span class="optional"> port <em class="replaceable"><code>integer</code></em> </span>] { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> )<br>
|
||||
[<span class="optional"> port <em class="replaceable"><code>integer</code></em> </span>]; ... };<br>
|
||||
allow-notify { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
@ -273,6 +293,8 @@ options
|
||||
<br>
|
||||
zone-statistics <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
key-directory <em class="replaceable"><code>quoted_string</code></em>;<br>
|
||||
zero-no-soa-ttl <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
zero-no-soa-ttl-cache <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
<br>
|
||||
allow-v6-synthesis { <em class="replaceable"><code>address_match_element</code></em>; ... }; // obsolete<br>
|
||||
deallocate-on-exit <em class="replaceable"><code>boolean</code></em>; // obsolete<br>
|
||||
@ -290,7 +312,7 @@ options
|
||||
</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550312"></a><h2>VIEW</h2>
|
||||
<a name="id2544400"></a><h2>VIEW</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
view <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>optional_class</code></em> {<br>
|
||||
match-clients { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
@ -306,7 +328,7 @@ view
|
||||
...<br>
|
||||
};<br>
|
||||
<br>
|
||||
server ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ) {<br>
|
||||
server ( <em class="replaceable"><code>ipv4_address[<span class="optional">/prefixlen</span>]</code></em> | <em class="replaceable"><code>ipv6_address[<span class="optional">/prefixlen</span>]</code></em> ) {<br>
|
||||
...<br>
|
||||
};<br>
|
||||
<br>
|
||||
@ -329,8 +351,8 @@ view
|
||||
rfc2308-type1 <em class="replaceable"><code>boolean</code></em>; // not yet implemented<br>
|
||||
additional-from-auth <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
additional-from-cache <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
query-source [<span class="optional"> address ( <em class="replaceable"><code>ipv4_address</code></em> | * ) </span>] [<span class="optional"> port ( <em class="replaceable"><code>integer</code></em> | * ) </span>];<br>
|
||||
query-source-v6 [<span class="optional"> address ( <em class="replaceable"><code>ipv6_address</code></em> | * ) </span>] [<span class="optional"> port ( <em class="replaceable"><code>integer</code></em> | * ) </span>];<br>
|
||||
query-source ( ( <em class="replaceable"><code>ipv4_address</code></em> | * ) | [<span class="optional"> address ( <em class="replaceable"><code>ipv4_address</code></em> | * ) </span>] ) [<span class="optional"> port ( <em class="replaceable"><code>integer</code></em> | * ) </span>];<br>
|
||||
query-source-v6 ( ( <em class="replaceable"><code>ipv6_address</code></em> | * ) | [<span class="optional"> address ( <em class="replaceable"><code>ipv6_address</code></em> | * ) </span>] ) [<span class="optional"> port ( <em class="replaceable"><code>integer</code></em> | * ) </span>];<br>
|
||||
cleaning-interval <em class="replaceable"><code>integer</code></em>;<br>
|
||||
min-roots <em class="replaceable"><code>integer</code></em>; // not implemented<br>
|
||||
lame-ttl <em class="replaceable"><code>integer</code></em>;<br>
|
||||
@ -338,9 +360,16 @@ view
|
||||
max-cache-ttl <em class="replaceable"><code>integer</code></em>;<br>
|
||||
transfer-format ( many-answers | one-answer );<br>
|
||||
max-cache-size <em class="replaceable"><code>size_no_default</code></em>;<br>
|
||||
max-acache-size <em class="replaceable"><code>size_no_default</code></em>;<br>
|
||||
clients-per-query <em class="replaceable"><code>number</code></em>;<br>
|
||||
max-clients-per-query <em class="replaceable"><code>number</code></em>;<br>
|
||||
check-names ( master | slave | response )<br>
|
||||
( fail | warn | ignore );<br>
|
||||
cache-file <em class="replaceable"><code>quoted_string</code></em>;<br>
|
||||
check-mx ( fail | warn | ignore );<br>
|
||||
check-integrity <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
check-mx-cname ( fail | warn | ignore );<br>
|
||||
check-srv-cname ( fail | warn | ignore );<br>
|
||||
cache-file <em class="replaceable"><code>quoted_string</code></em>; // test option<br>
|
||||
suppress-initial-notify <em class="replaceable"><code>boolean</code></em>; // not yet implemented<br>
|
||||
preferred-glue <em class="replaceable"><code>string</code></em>;<br>
|
||||
dual-stack-servers [<span class="optional"> port <em class="replaceable"><code>integer</code></em> </span>] {<br>
|
||||
@ -349,22 +378,34 @@ view
|
||||
<em class="replaceable"><code>ipv6_address</code></em> [<span class="optional">port <em class="replaceable"><code>integer</code></em></span>] ); ...<br>
|
||||
};<br>
|
||||
edns-udp-size <em class="replaceable"><code>integer</code></em>;<br>
|
||||
max-udp-size <em class="replaceable"><code>integer</code></em>;<br>
|
||||
root-delegation-only [<span class="optional"> exclude { <em class="replaceable"><code>quoted_string</code></em>; ... } </span>];<br>
|
||||
disable-algorithms <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>string</code></em>; ... };<br>
|
||||
dnssec-enable <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-validation <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-lookaside <em class="replaceable"><code>string</code></em> trust-anchor <em class="replaceable"><code>string</code></em>;<br>
|
||||
<br>
|
||||
dnssec-must-be-secure <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-accept-expired <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
<br>
|
||||
empty-server <em class="replaceable"><code>string</code></em>;<br>
|
||||
empty-contact <em class="replaceable"><code>string</code></em>;<br>
|
||||
empty-zones-enable <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
disable-empty-zone <em class="replaceable"><code>string</code></em>;<br>
|
||||
<br>
|
||||
dialup <em class="replaceable"><code>dialuptype</code></em>;<br>
|
||||
ixfr-from-differences <em class="replaceable"><code>ixfrdiff</code></em>;<br>
|
||||
<br>
|
||||
allow-query { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
allow-query-cache { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
allow-transfer { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
allow-update { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
allow-update-forwarding { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
update-check-ksk <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
<br>
|
||||
notify <em class="replaceable"><code>notifytype</code></em>;<br>
|
||||
notify-source ( <em class="replaceable"><code>ipv4_address</code></em> | * ) [<span class="optional"> port ( <em class="replaceable"><code>integer</code></em> | * ) </span>];<br>
|
||||
notify-source-v6 ( <em class="replaceable"><code>ipv6_address</code></em> | * ) [<span class="optional"> port ( <em class="replaceable"><code>integer</code></em> | * ) </span>];<br>
|
||||
notify-delay <em class="replaceable"><code>seconds</code></em>;<br>
|
||||
also-notify [<span class="optional"> port <em class="replaceable"><code>integer</code></em> </span>] { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> )<br>
|
||||
[<span class="optional"> port <em class="replaceable"><code>integer</code></em> </span>]; ... };<br>
|
||||
allow-notify { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
@ -399,6 +440,8 @@ view
|
||||
<br>
|
||||
zone-statistics <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
key-directory <em class="replaceable"><code>quoted_string</code></em>;<br>
|
||||
zero-no-soa-ttl <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
zero-no-soa-ttl-cache <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
<br>
|
||||
allow-v6-synthesis { <em class="replaceable"><code>address_match_element</code></em>; ... }; // obsolete<br>
|
||||
fetch-glue <em class="replaceable"><code>boolean</code></em>; // obsolete<br>
|
||||
@ -408,7 +451,7 @@ view
|
||||
</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550878"></a><h2>ZONE</h2>
|
||||
<a name="id2544964"></a><h2>ZONE</h2>
|
||||
<div class="literallayout"><p><br>
|
||||
zone <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>optional_class</code></em> {<br>
|
||||
type ( master | slave | stub | hint |<br>
|
||||
@ -424,8 +467,14 @@ zone
|
||||
database <em class="replaceable"><code>string</code></em>;<br>
|
||||
delegation-only <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
check-names ( fail | warn | ignore );<br>
|
||||
check-mx ( fail | warn | ignore );<br>
|
||||
check-integrity <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
check-mx-cname ( fail | warn | ignore );<br>
|
||||
check-srv-cname ( fail | warn | ignore );<br>
|
||||
dialup <em class="replaceable"><code>dialuptype</code></em>;<br>
|
||||
ixfr-from-differences <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
journal <em class="replaceable"><code>quoted_string</code></em>;<br>
|
||||
zero-no-soa-ttl <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
<br>
|
||||
allow-query { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
allow-transfer { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
@ -436,10 +485,12 @@ zone
|
||||
( name | subdomain | wildcard | self ) <em class="replaceable"><code>string</code></em><br>
|
||||
<em class="replaceable"><code>rrtypelist</code></em>; ...<br>
|
||||
};<br>
|
||||
update-check-ksk <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
<br>
|
||||
notify <em class="replaceable"><code>notifytype</code></em>;<br>
|
||||
notify-source ( <em class="replaceable"><code>ipv4_address</code></em> | * ) [<span class="optional"> port ( <em class="replaceable"><code>integer</code></em> | * ) </span>];<br>
|
||||
notify-source-v6 ( <em class="replaceable"><code>ipv6_address</code></em> | * ) [<span class="optional"> port ( <em class="replaceable"><code>integer</code></em> | * ) </span>];<br>
|
||||
notify-delay <em class="replaceable"><code>seconds</code></em>;<br>
|
||||
also-notify [<span class="optional"> port <em class="replaceable"><code>integer</code></em> </span>] { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> )<br>
|
||||
[<span class="optional"> port <em class="replaceable"><code>integer</code></em> </span>]; ... };<br>
|
||||
allow-notify { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
@ -484,18 +535,16 @@ zone
|
||||
</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2551216"></a><h2>FILES</h2>
|
||||
<p>
|
||||
<code class="filename">/etc/named.conf</code>
|
||||
</p>
|
||||
<a name="id2545316"></a><h2>FILES</h2>
|
||||
<p><code class="filename">/etc/named.conf</code>
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2551228"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">rndc</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">BIND 9 Administrator Reference Manual</span></span>.
|
||||
</p>
|
||||
<a name="id2545328"></a><h2>SEE ALSO</h2>
|
||||
<p><span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">rndc</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">BIND 9 Administrator Reference Manual</span></span>.
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
</html>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY mdash "—">]>
|
||||
<!--
|
||||
- Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@ -18,9 +18,8 @@
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: named.docbook,v 1.5.98.7 2006/01/17 23:49:30 marka Exp $ -->
|
||||
|
||||
<refentry>
|
||||
<!-- $Id: named.docbook,v 1.7.18.8 2007/01/29 23:57:20 marka Exp $ -->
|
||||
<refentry id="man.named">
|
||||
<refentryinfo>
|
||||
<date>June 30, 2000</date>
|
||||
</refentryinfo>
|
||||
@ -31,11 +30,17 @@
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>named</application></refname>
|
||||
<refpurpose>Internet domain name server</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2004</year>
|
||||
<year>2005</year>
|
||||
<year>2006</year>
|
||||
<year>2007</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<copyright>
|
||||
@ -46,11 +51,6 @@
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>named</application></refname>
|
||||
<refpurpose>Internet domain name server</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>named</command>
|
||||
@ -72,16 +72,17 @@
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<command>named</command> is a Domain Name System (DNS) server,
|
||||
part of the BIND 9 distribution from ISC. For more
|
||||
information on the DNS, see RFCs 1033, 1034, and 1035.
|
||||
<para><command>named</command>
|
||||
is a Domain Name System (DNS) server,
|
||||
part of the BIND 9 distribution from ISC. For more
|
||||
information on the DNS, see RFCs 1033, 1034, and 1035.
|
||||
</para>
|
||||
<para>
|
||||
When invoked without arguments, <command>named</command> will
|
||||
read the default configuration file
|
||||
<filename>/etc/named.conf</filename>, read any initial
|
||||
data, and listen for queries.
|
||||
When invoked without arguments, <command>named</command>
|
||||
will
|
||||
read the default configuration file
|
||||
<filename>/etc/named.conf</filename>, read any initial
|
||||
data, and listen for queries.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
@ -90,189 +91,183 @@
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-4</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use IPv4 only even if the host machine is capable of IPv6.
|
||||
<option>-4</option> and <option>-6</option> are mutually
|
||||
exclusive.
|
||||
<term>-4</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use IPv4 only even if the host machine is capable of IPv6.
|
||||
<option>-4</option> and <option>-6</option> are mutually
|
||||
exclusive.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-6</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use IPv6 only even if the host machine is capable of IPv4.
|
||||
<option>-4</option> and <option>-6</option> are mutually
|
||||
exclusive.
|
||||
<term>-6</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use IPv6 only even if the host machine is capable of IPv4.
|
||||
<option>-4</option> and <option>-6</option> are mutually
|
||||
exclusive.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>-c <replaceable class="parameter">config-file</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use <replaceable
|
||||
class="parameter">config-file</replaceable> as the
|
||||
configuration file instead of the default,
|
||||
<filename>/etc/named.conf</filename>. To
|
||||
ensure that reloading the configuration file continues
|
||||
to work after the server has changed its working
|
||||
directory due to to a possible
|
||||
<option>directory</option> option in the configuration
|
||||
file, <replaceable
|
||||
class="parameter">config-file</replaceable> should be
|
||||
an absolute pathname.
|
||||
<term>-c <replaceable class="parameter">config-file</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use <replaceable class="parameter">config-file</replaceable> as the
|
||||
configuration file instead of the default,
|
||||
<filename>/etc/named.conf</filename>. To
|
||||
ensure that reloading the configuration file continues
|
||||
to work after the server has changed its working
|
||||
directory due to to a possible
|
||||
<option>directory</option> option in the configuration
|
||||
file, <replaceable class="parameter">config-file</replaceable> should be
|
||||
an absolute pathname.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-d <replaceable class="parameter">debug-level</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Set the daemon's debug level to <replaceable
|
||||
class="parameter">debug-level</replaceable>.
|
||||
Debugging traces from <command>named</command> become
|
||||
more verbose as the debug level increases.
|
||||
<term>-d <replaceable class="parameter">debug-level</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Set the daemon's debug level to <replaceable class="parameter">debug-level</replaceable>.
|
||||
Debugging traces from <command>named</command> become
|
||||
more verbose as the debug level increases.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-f</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Run the server in the foreground (i.e. do not daemonize).
|
||||
<term>-f</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Run the server in the foreground (i.e. do not daemonize).
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-g</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Run the server in the foreground and force all logging
|
||||
to <filename>stderr</filename>.
|
||||
<term>-g</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Run the server in the foreground and force all logging
|
||||
to <filename>stderr</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-n <replaceable class="parameter">#cpus</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Create <replaceable
|
||||
class="parameter">#cpus</replaceable> worker threads
|
||||
to take advantage of multiple CPUs. If not specified,
|
||||
<command>named</command> will try to determine the
|
||||
number of CPUs present and create one thread per CPU.
|
||||
If it is unable to determine the number of CPUs, a
|
||||
single worker thread will be created.
|
||||
<term>-n <replaceable class="parameter">#cpus</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Create <replaceable class="parameter">#cpus</replaceable> worker threads
|
||||
to take advantage of multiple CPUs. If not specified,
|
||||
<command>named</command> will try to determine the
|
||||
number of CPUs present and create one thread per CPU.
|
||||
If it is unable to determine the number of CPUs, a
|
||||
single worker thread will be created.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-p <replaceable class="parameter">port</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Listen for queries on port <replaceable
|
||||
class="parameter">port</replaceable>. If not
|
||||
specified, the default is port 53.
|
||||
<term>-p <replaceable class="parameter">port</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Listen for queries on port <replaceable class="parameter">port</replaceable>. If not
|
||||
specified, the default is port 53.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-s</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Write memory usage statistics to <filename>stdout</filename> on exit.
|
||||
<term>-s</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Write memory usage statistics to <filename>stdout</filename> on exit.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
This option is mainly of interest to BIND 9 developers
|
||||
and may be removed or changed in a future release.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
<note>
|
||||
<para>
|
||||
This option is mainly of interest to BIND 9 developers
|
||||
and may be removed or changed in a future release.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-t <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<function>chroot()</function> to <replaceable
|
||||
class="parameter">directory</replaceable> after
|
||||
processing the command line arguments, but before
|
||||
reading the configuration file.
|
||||
<term>-t <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para><function>chroot()</function>
|
||||
to <replaceable class="parameter">directory</replaceable> after
|
||||
processing the command line arguments, but before
|
||||
reading the configuration file.
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
This option should be used in conjunction with the
|
||||
<option>-u</option> option, as chrooting a process
|
||||
running as root doesn't enhance security on most
|
||||
systems; the way <function>chroot()</function> is
|
||||
defined allows a process with root privileges to
|
||||
escape a chroot jail.
|
||||
</para>
|
||||
</warning>
|
||||
</listitem>
|
||||
<warning>
|
||||
<para>
|
||||
This option should be used in conjunction with the
|
||||
<option>-u</option> option, as chrooting a process
|
||||
running as root doesn't enhance security on most
|
||||
systems; the way <function>chroot()</function> is
|
||||
defined allows a process with root privileges to
|
||||
escape a chroot jail.
|
||||
</para>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-u <replaceable class="parameter">user</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<function>setuid()</function> to <replaceable
|
||||
class="parameter">user</replaceable> after completing
|
||||
privileged operations, such as creating sockets that
|
||||
listen on privileged ports.
|
||||
<term>-u <replaceable class="parameter">user</replaceable></term>
|
||||
<listitem>
|
||||
<para><function>setuid()</function>
|
||||
to <replaceable class="parameter">user</replaceable> after completing
|
||||
privileged operations, such as creating sockets that
|
||||
listen on privileged ports.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
On Linux, <command>named</command> uses the kernel's
|
||||
capability mechanism to drop all root privileges
|
||||
except the ability to <function>bind()</function> to a
|
||||
privileged port and set process resource limits.
|
||||
Unfortunately, this means that the <option>-u</option>
|
||||
option only works when <command>named</command> is run
|
||||
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 <function>setuid()</function>.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
<note>
|
||||
<para>
|
||||
On Linux, <command>named</command> uses the kernel's
|
||||
capability mechanism to drop all root privileges
|
||||
except the ability to <function>bind()</function> to
|
||||
a
|
||||
privileged port and set process resource limits.
|
||||
Unfortunately, this means that the <option>-u</option>
|
||||
option only works when <command>named</command> is
|
||||
run
|
||||
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 <function>setuid()</function>.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Report the version number and exit.
|
||||
<term>-v</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Report the version number and exit.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-x <replaceable class="parameter">cache-file</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Load data from <replaceable
|
||||
class="parameter">cache-file</replaceable> into the
|
||||
cache of the default view.
|
||||
<term>-x <replaceable class="parameter">cache-file</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Load data from <replaceable class="parameter">cache-file</replaceable> into the
|
||||
cache of the default view.
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
This option must not be used. It is only of interest
|
||||
to BIND 9 developers and may be removed or changed in a
|
||||
future release.
|
||||
</para>
|
||||
</warning>
|
||||
</listitem>
|
||||
<warning>
|
||||
<para>
|
||||
This option must not be used. It is only of interest
|
||||
to BIND 9 developers and may be removed or changed in a
|
||||
future release.
|
||||
</para>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
@ -282,35 +277,35 @@
|
||||
<refsect1>
|
||||
<title>SIGNALS</title>
|
||||
<para>
|
||||
In routine operation, signals should not be used to control
|
||||
the nameserver; <command>rndc</command> should be used
|
||||
instead.
|
||||
In routine operation, signals should not be used to control
|
||||
the nameserver; <command>rndc</command> should be used
|
||||
instead.
|
||||
</para>
|
||||
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term>SIGHUP</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Force a reload of the server.
|
||||
<term>SIGHUP</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Force a reload of the server.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>SIGINT, SIGTERM</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Shut down the server.
|
||||
<term>SIGINT, SIGTERM</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Shut down the server.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>
|
||||
The result of sending any other signals to the server is undefined.
|
||||
The result of sending any other signals to the server is undefined.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
@ -318,10 +313,10 @@
|
||||
<refsect1>
|
||||
<title>CONFIGURATION</title>
|
||||
<para>
|
||||
The <command>named</command> configuration file is too complex
|
||||
to describe in detail here. A complete description is
|
||||
provided in the <citetitle>BIND 9 Administrator Reference
|
||||
Manual</citetitle>.
|
||||
The <command>named</command> configuration file is too complex
|
||||
to describe in detail here. A complete description is provided
|
||||
in the
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
@ -331,21 +326,21 @@
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><filename>/etc/named.conf</filename></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The default configuration file.
|
||||
<term><filename>/etc/named.conf</filename></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The default configuration file.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><filename>/var/run/named.pid</filename></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The default process-id file.
|
||||
<term><filename>/var/run/named.pid</filename></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The default process-id file.
|
||||
</para>
|
||||
</listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
@ -354,37 +349,32 @@
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para>
|
||||
<citetitle>RFC 1033</citetitle>,
|
||||
<citetitle>RFC 1034</citetitle>,
|
||||
<citetitle>RFC 1035</citetitle>,
|
||||
<citerefentry>
|
||||
<refentrytitle>rndc</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>lwresd</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>named.conf</refentrytitle>
|
||||
<manvolnum>5</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
<para><citetitle>RFC 1033</citetitle>,
|
||||
<citetitle>RFC 1034</citetitle>,
|
||||
<citetitle>RFC 1035</citetitle>,
|
||||
<citerefentry>
|
||||
<refentrytitle>rndc</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>lwresd</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>named.conf</refentrytitle>
|
||||
<manvolnum>5</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
<para>
|
||||
<corpauthor>Internet Systems Consortium</corpauthor>
|
||||
<para><corpauthor>Internet Systems Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
|
||||
<!--
|
||||
</refentry><!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
- Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
@ -14,15 +14,15 @@
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
<!-- $Id: named.html,v 1.4.2.1.4.13 2006/06/29 13:02:30 marka Exp $ -->
|
||||
<!-- $Id: named.html,v 1.6.18.18 2007/01/30 00:23:44 marka Exp $ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>named</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
|
||||
<a name="id2482688"></a><div class="titlepage"></div>
|
||||
<a name="man.named"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p><span class="application">named</span> — Internet domain name server</p>
|
||||
@ -32,209 +32,210 @@
|
||||
<div class="cmdsynopsis"><p><code class="command">named</code> [<code class="option">-4</code>] [<code class="option">-6</code>] [<code class="option">-c <em class="replaceable"><code>config-file</code></em></code>] [<code class="option">-d <em class="replaceable"><code>debug-level</code></em></code>] [<code class="option">-f</code>] [<code class="option">-g</code>] [<code class="option">-n <em class="replaceable"><code>#cpus</code></em></code>] [<code class="option">-p <em class="replaceable"><code>port</code></em></code>] [<code class="option">-s</code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-u <em class="replaceable"><code>user</code></em></code>] [<code class="option">-v</code>] [<code class="option">-x <em class="replaceable"><code>cache-file</code></em></code>]</p></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549491"></a><h2>DESCRIPTION</h2>
|
||||
<p>
|
||||
<span><strong class="command">named</strong></span> is a Domain Name System (DNS) server,
|
||||
part of the BIND 9 distribution from ISC. For more
|
||||
information on the DNS, see RFCs 1033, 1034, and 1035.
|
||||
<a name="id2543444"></a><h2>DESCRIPTION</h2>
|
||||
<p><span><strong class="command">named</strong></span>
|
||||
is a Domain Name System (DNS) server,
|
||||
part of the BIND 9 distribution from ISC. For more
|
||||
information on the DNS, see RFCs 1033, 1034, and 1035.
|
||||
</p>
|
||||
<p>
|
||||
When invoked without arguments, <span><strong class="command">named</strong></span> will
|
||||
read the default configuration file
|
||||
<code class="filename">/etc/named.conf</code>, read any initial
|
||||
data, and listen for queries.
|
||||
When invoked without arguments, <span><strong class="command">named</strong></span>
|
||||
will
|
||||
read the default configuration file
|
||||
<code class="filename">/etc/named.conf</code>, read any initial
|
||||
data, and listen for queries.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2549516"></a><h2>OPTIONS</h2>
|
||||
<a name="id2543468"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">-4</span></dt>
|
||||
<dd><p>
|
||||
Use IPv4 only even if the host machine is capable of IPv6.
|
||||
<code class="option">-4</code> and <code class="option">-6</code> are mutually
|
||||
exclusive.
|
||||
Use IPv4 only even if the host machine is capable of IPv6.
|
||||
<code class="option">-4</code> and <code class="option">-6</code> are mutually
|
||||
exclusive.
|
||||
</p></dd>
|
||||
<dt><span class="term">-6</span></dt>
|
||||
<dd><p>
|
||||
Use IPv6 only even if the host machine is capable of IPv4.
|
||||
<code class="option">-4</code> and <code class="option">-6</code> are mutually
|
||||
exclusive.
|
||||
Use IPv6 only even if the host machine is capable of IPv4.
|
||||
<code class="option">-4</code> and <code class="option">-6</code> are mutually
|
||||
exclusive.
|
||||
</p></dd>
|
||||
<dt><span class="term">-c <em class="replaceable"><code>config-file</code></em></span></dt>
|
||||
<dd><p>
|
||||
Use <em class="replaceable"><code>config-file</code></em> as the
|
||||
configuration file instead of the default,
|
||||
<code class="filename">/etc/named.conf</code>. To
|
||||
ensure that reloading the configuration file continues
|
||||
to work after the server has changed its working
|
||||
directory due to to a possible
|
||||
<code class="option">directory</code> option in the configuration
|
||||
file, <em class="replaceable"><code>config-file</code></em> should be
|
||||
an absolute pathname.
|
||||
Use <em class="replaceable"><code>config-file</code></em> as the
|
||||
configuration file instead of the default,
|
||||
<code class="filename">/etc/named.conf</code>. To
|
||||
ensure that reloading the configuration file continues
|
||||
to work after the server has changed its working
|
||||
directory due to to a possible
|
||||
<code class="option">directory</code> option in the configuration
|
||||
file, <em class="replaceable"><code>config-file</code></em> should be
|
||||
an absolute pathname.
|
||||
</p></dd>
|
||||
<dt><span class="term">-d <em class="replaceable"><code>debug-level</code></em></span></dt>
|
||||
<dd><p>
|
||||
Set the daemon's debug level to <em class="replaceable"><code>debug-level</code></em>.
|
||||
Debugging traces from <span><strong class="command">named</strong></span> become
|
||||
more verbose as the debug level increases.
|
||||
Set the daemon's debug level to <em class="replaceable"><code>debug-level</code></em>.
|
||||
Debugging traces from <span><strong class="command">named</strong></span> become
|
||||
more verbose as the debug level increases.
|
||||
</p></dd>
|
||||
<dt><span class="term">-f</span></dt>
|
||||
<dd><p>
|
||||
Run the server in the foreground (i.e. do not daemonize).
|
||||
Run the server in the foreground (i.e. do not daemonize).
|
||||
</p></dd>
|
||||
<dt><span class="term">-g</span></dt>
|
||||
<dd><p>
|
||||
Run the server in the foreground and force all logging
|
||||
to <code class="filename">stderr</code>.
|
||||
Run the server in the foreground and force all logging
|
||||
to <code class="filename">stderr</code>.
|
||||
</p></dd>
|
||||
<dt><span class="term">-n <em class="replaceable"><code>#cpus</code></em></span></dt>
|
||||
<dd><p>
|
||||
Create <em class="replaceable"><code>#cpus</code></em> worker threads
|
||||
to take advantage of multiple CPUs. If not specified,
|
||||
<span><strong class="command">named</strong></span> will try to determine the
|
||||
number of CPUs present and create one thread per CPU.
|
||||
If it is unable to determine the number of CPUs, a
|
||||
single worker thread will be created.
|
||||
Create <em class="replaceable"><code>#cpus</code></em> worker threads
|
||||
to take advantage of multiple CPUs. If not specified,
|
||||
<span><strong class="command">named</strong></span> will try to determine the
|
||||
number of CPUs present and create one thread per CPU.
|
||||
If it is unable to determine the number of CPUs, a
|
||||
single worker thread will be created.
|
||||
</p></dd>
|
||||
<dt><span class="term">-p <em class="replaceable"><code>port</code></em></span></dt>
|
||||
<dd><p>
|
||||
Listen for queries on port <em class="replaceable"><code>port</code></em>. If not
|
||||
specified, the default is port 53.
|
||||
Listen for queries on port <em class="replaceable"><code>port</code></em>. If not
|
||||
specified, the default is port 53.
|
||||
</p></dd>
|
||||
<dt><span class="term">-s</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Write memory usage statistics to <code class="filename">stdout</code> on exit.
|
||||
Write memory usage statistics to <code class="filename">stdout</code> on exit.
|
||||
</p>
|
||||
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
|
||||
<h3 class="title">Note</h3>
|
||||
<p>
|
||||
This option is mainly of interest to BIND 9 developers
|
||||
and may be removed or changed in a future release.
|
||||
</p>
|
||||
This option is mainly of interest to BIND 9 developers
|
||||
and may be removed or changed in a future release.
|
||||
</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
<code class="function">chroot()</code> to <em class="replaceable"><code>directory</code></em> after
|
||||
processing the command line arguments, but before
|
||||
reading the configuration file.
|
||||
<p><code class="function">chroot()</code>
|
||||
to <em class="replaceable"><code>directory</code></em> after
|
||||
processing the command line arguments, but before
|
||||
reading the configuration file.
|
||||
</p>
|
||||
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
|
||||
<h3 class="title">Warning</h3>
|
||||
<p>
|
||||
This option should be used in conjunction with the
|
||||
<code class="option">-u</code> option, as chrooting a process
|
||||
running as root doesn't enhance security on most
|
||||
systems; the way <code class="function">chroot()</code> is
|
||||
defined allows a process with root privileges to
|
||||
escape a chroot jail.
|
||||
</p>
|
||||
This option should be used in conjunction with the
|
||||
<code class="option">-u</code> option, as chrooting a process
|
||||
running as root doesn't enhance security on most
|
||||
systems; the way <code class="function">chroot()</code> is
|
||||
defined allows a process with root privileges to
|
||||
escape a chroot jail.
|
||||
</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt><span class="term">-u <em class="replaceable"><code>user</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
<code class="function">setuid()</code> to <em class="replaceable"><code>user</code></em> after completing
|
||||
privileged operations, such as creating sockets that
|
||||
listen on privileged ports.
|
||||
<p><code class="function">setuid()</code>
|
||||
to <em class="replaceable"><code>user</code></em> after completing
|
||||
privileged operations, such as creating sockets that
|
||||
listen on privileged ports.
|
||||
</p>
|
||||
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
|
||||
<h3 class="title">Note</h3>
|
||||
<p>
|
||||
On Linux, <span><strong class="command">named</strong></span> uses the kernel's
|
||||
capability mechanism to drop all root privileges
|
||||
except the ability to <code class="function">bind()</code> to a
|
||||
privileged port and set process resource limits.
|
||||
Unfortunately, this means that the <code class="option">-u</code>
|
||||
option only works when <span><strong class="command">named</strong></span> is run
|
||||
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 <code class="function">setuid()</code>.
|
||||
</p>
|
||||
On Linux, <span><strong class="command">named</strong></span> uses the kernel's
|
||||
capability mechanism to drop all root privileges
|
||||
except the ability to <code class="function">bind()</code> to
|
||||
a
|
||||
privileged port and set process resource limits.
|
||||
Unfortunately, this means that the <code class="option">-u</code>
|
||||
option only works when <span><strong class="command">named</strong></span> is
|
||||
run
|
||||
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 <code class="function">setuid()</code>.
|
||||
</p>
|
||||
</div>
|
||||
</dd>
|
||||
<dt><span class="term">-v</span></dt>
|
||||
<dd><p>
|
||||
Report the version number and exit.
|
||||
Report the version number and exit.
|
||||
</p></dd>
|
||||
<dt><span class="term">-x <em class="replaceable"><code>cache-file</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Load data from <em class="replaceable"><code>cache-file</code></em> into the
|
||||
cache of the default view.
|
||||
Load data from <em class="replaceable"><code>cache-file</code></em> into the
|
||||
cache of the default view.
|
||||
</p>
|
||||
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
|
||||
<h3 class="title">Warning</h3>
|
||||
<p>
|
||||
This option must not be used. It is only of interest
|
||||
to BIND 9 developers and may be removed or changed in a
|
||||
future release.
|
||||
</p>
|
||||
This option must not be used. It is only of interest
|
||||
to BIND 9 developers and may be removed or changed in a
|
||||
future release.
|
||||
</p>
|
||||
</div>
|
||||
</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550002"></a><h2>SIGNALS</h2>
|
||||
<a name="id2543813"></a><h2>SIGNALS</h2>
|
||||
<p>
|
||||
In routine operation, signals should not be used to control
|
||||
the nameserver; <span><strong class="command">rndc</strong></span> should be used
|
||||
instead.
|
||||
In routine operation, signals should not be used to control
|
||||
the nameserver; <span><strong class="command">rndc</strong></span> should be used
|
||||
instead.
|
||||
</p>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term">SIGHUP</span></dt>
|
||||
<dd><p>
|
||||
Force a reload of the server.
|
||||
Force a reload of the server.
|
||||
</p></dd>
|
||||
<dt><span class="term">SIGINT, SIGTERM</span></dt>
|
||||
<dd><p>
|
||||
Shut down the server.
|
||||
Shut down the server.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
<p>
|
||||
The result of sending any other signals to the server is undefined.
|
||||
The result of sending any other signals to the server is undefined.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550049"></a><h2>CONFIGURATION</h2>
|
||||
<a name="id2543861"></a><h2>CONFIGURATION</h2>
|
||||
<p>
|
||||
The <span><strong class="command">named</strong></span> configuration file is too complex
|
||||
to describe in detail here. A complete description is
|
||||
provided in the <em class="citetitle">BIND 9 Administrator Reference
|
||||
Manual</em>.
|
||||
The <span><strong class="command">named</strong></span> configuration file is too complex
|
||||
to describe in detail here. A complete description is provided
|
||||
in the
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550066"></a><h2>FILES</h2>
|
||||
<a name="id2543878"></a><h2>FILES</h2>
|
||||
<div class="variablelist"><dl>
|
||||
<dt><span class="term"><code class="filename">/etc/named.conf</code></span></dt>
|
||||
<dd><p>
|
||||
The default configuration file.
|
||||
The default configuration file.
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="filename">/var/run/named.pid</code></span></dt>
|
||||
<dd><p>
|
||||
The default process-id file.
|
||||
The default process-id file.
|
||||
</p></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550105"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<em class="citetitle">RFC 1033</em>,
|
||||
<em class="citetitle">RFC 1034</em>,
|
||||
<em class="citetitle">RFC 1035</em>,
|
||||
<span class="citerefentry"><span class="refentrytitle">rndc</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">lwresd</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">named.conf</span>(5)</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
|
||||
<a name="id2543917"></a><h2>SEE ALSO</h2>
|
||||
<p><em class="citetitle">RFC 1033</em>,
|
||||
<em class="citetitle">RFC 1034</em>,
|
||||
<em class="citetitle">RFC 1035</em>,
|
||||
<span class="citerefentry"><span class="refentrytitle">rndc</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">lwresd</span>(8)</span>,
|
||||
<span class="citerefentry"><span class="refentrytitle">named.conf</span>(5)</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<a name="id2550157"></a><h2>AUTHOR</h2>
|
||||
<p>
|
||||
<span class="corpauthor">Internet Systems Consortium</span>
|
||||
<a name="id2543969"></a><h2>AUTHOR</h2>
|
||||
<p><span class="corpauthor">Internet Systems Consortium</span>
|
||||
</p>
|
||||
</div>
|
||||
</div></body>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user