Bv9ARM.4.html revision 9bff67898d55cddfcec9ce30cc2b1bb6211ec691
2899N/ADynamic update is the term used for the ability under certain specified conditions to add, modify or delete records or RRsets in the master zone files. Dynamic update is fully described in RFC 2136.</P>
2521N/ADynamic update is enabled on a zone-by-zone basis, by including an <CODE CLASS="Program-Process">
3998N/A proposal, a work in progress in the DNS Extensions working group of the IETF. (See <EM CLASS="URL">
3998N/A<A HREF="http://www.ietf.org/html.charters/dnsext-charter.html">http://www.ietf.org/html.charters/dnsext-charter.html</A></EM>
3998N/A for information about the DNS Extensions working group.) SIG and NXT records affected by updates are automatically regenerated by the server using an online zone key. Update authorization is based on transaction signatures and an explicit server policy.</P>
3998N/AThe zone files of dynamic zones must not be edited by hand. The zone file on disk at any given time may not contain the latest changes performed by dynamic update. The zone file is written to disk only periodically, and changes that have occurred since the zone file was last written to disk are stored only in the zone's journal (<EM CLASS="pathname">
3998N/A) file. BINDv9 currently does not update the zone file when it exits like BIND 8 does, so editing the zone file manually is unsafe even when the server has been shut down. </P>
4049N/AThe incremental zone transfer (IXFR) protocol is a way for slave servers to transfer only changed data, instead of having to transfer the entire zone. The IXFR protocol is documented in RFC 1995. See the list of proposed standards in Appendix C, <A HREF="Bv9ARM.8.html#17631" CLASS="XRef">
4049N/AWhen acting as a master, BINDv9 supports IXFR for those zones where the necessary change history information is available. These include master zones maintained by dynamic update and slave zones whose data was obtained by IXFR, but not manually maintained master zones nor slave zones obtained by performing a full zone transfer (AXFR).</P>
When acting as a slave, BINDv9 will attempt to use IXFR unless it is explicitly disabled. For more information about disabling IXFR, see the description of the <CODE CLASS="Program-Process">
Setting up different views, or visibility, of DNS space to internal, as opposed to external, resolvers is usually referred to as a <EM CLASS="Emphasis">
One common reason for setting up a DNS system this way is to hide "internal" DNS information from "external" clients on the Internet. There is some debate as to whether or not this is actually useful. Internal DNS information leaks out in many ways (via email headers, for example) and most savvy "attackers" can find the information they need using other means.</P>
Another common reason for setting up a Split DNS system is to allow internal networks that are behind filters or RFC 1918 space (reserved IP space, as documented in RFC 1918) to resolve DNS on the Internet. Split DNS can also be used to allow mail from outside back in to the internal network.</P>
(example.com) has several corporate sites that have an internal network with reserved Internet Protocol (IP) space and an external demilitarized zone (DMZ), or "outside" section of a network, that is available to the public.</P>
wants its internal clients to be able to resolve external hostnames and to exchange mail with people on the outside. The company also wants its internal resolvers to have access to certain internal-only zones that are not available at all outside of the internal network.</P>
In order to accomplish this, the company will set up two sets of nameservers. One set will be on the inside network (in the reserved IP space) and the other set will be on bastion hosts, which are "proxy" hosts that can talk to both sides of its network, in the DMZ.</P>
The internal servers will be configured to forward all queries, except queries for <EM CLASS="pathname">
, to the servers in the DMZ. These internal servers will have complete sets of information for <EM CLASS="pathname">
domains, the internal nameservers must be configured to disallow all queries to these domains from any external hosts, including the bastion hosts.</P>
The external servers, which are on the bastion hosts, will be configured to serve the "public" version of the <EM CLASS="pathname">
zones should have special MX records that contain wildcard ('*') records pointing to the bastion hosts. This is needed because external mail servers do not have any other way of looking up how to deliver mail to those internal hosts. With the wildcard records, the mail will be delivered to the bastion host, which can then forward it on to internal hosts.</P>
Now that they accept mail on behalf of anything in the internal network, the bastion hosts will need to know how to deliver mail to internal hosts. In order for this to work properly, the resolvers on the bastion hosts will need to be configured to point to the internal nameservers for DNS resolution.</P>
Queries for internal hostnames will be answered by the internal servers, and queries for external hostnames will be forwarded back out to the DNS servers on the bastion hosts.</P>
In order for all this to work properly, internal clients will need to be configured to query <EM CLASS="Emphasis">
the internal nameservers for DNS queries. This could also be enforced via selective filtering on the network.</P>
Here is an example configuration for the setup we just described above. Note that this is only configuration information; for information on how to configure your zone files, see <A HREF="Bv9ARM.3.html#30164" CLASS="XRef">
acl externals { </CODE><EM CLASS="variable">bastion-ips-go-here</EM><CODE CLASS="Program-Process">; };
forwarders { </CODE><EM CLASS="variable">bastion-ips-go-here</EM><CODE CLASS="Program-Process">; }; // forward to external servers
allow-transfer { </CODE><EM CLASS="variable">none</EM><CODE CLASS="Program-Process">; }; // sample allow-transfer (</CODE><EM CLASS="variable">no one</EM><CODE CLASS="Program-Process">)
allow-query { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; </CODE><EM CLASS="variable">externals</EM><CODE CLASS="Program-Process">; }; // restrict query access
allow-recursion { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; }; // restrict recursion
<CODE CLASS="Program-Process">zone "</CODE><EM CLASS="pathname">site1.example.com</EM><CODE CLASS="Program-Process">" { // sample slave zone
file </CODE><KBD CLASS="Literal-user-input">"m/site1.example.com"</KBD><CODE CLASS="Program-Process">;
allow-query { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; </CODE><EM CLASS="variable">externals</EM><CODE CLASS="Program-Process">; };
<CODE CLASS="Program-Process">zone "</CODE><EM CLASS="pathname">site2.example.com</EM><CODE CLASS="Program-Process">" {
file </CODE><KBD CLASS="Literal-user-input">"s/site2.example.com"</KBD><CODE CLASS="Program-Process">
allow-query { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; </CODE><EM CLASS="variable">externals</EM><CODE CLASS="Program-Process">; };
file </CODE><KBD CLASS="Literal-user-input">"m/site1.internal"</KBD><CODE CLASS="Program-Process">;
<CODE CLASS="Program-Process">zone "</CODE><EM CLASS="pathname">site2.internal</EM><CODE CLASS="Program-Process">" {
file </CODE><KBD CLASS="Literal-user-input">"s/site2.internal"</KBD><CODE CLASS="Program-Process">;
acl externals { </CODE><EM CLASS="variable">bastion-ips-go-here</EM><CODE CLASS="Program-Process">; };
allow-transfer { </CODE><EM CLASS="variable">none</EM><CODE CLASS="Program-Process">; }; // sample allow-transfer (no one)
allow-query { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; </CODE><EM CLASS="variable">externals</EM><CODE CLASS="Program-Process">; }; // restrict query access
allow-recursion { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; </CODE><EM CLASS="variable">externals</EM><CODE CLASS="Program-Process">; }; // restrict recursion
<CODE CLASS="Program-Process">zone "</CODE><EM CLASS="pathname">site1.example.com</EM><CODE CLASS="Program-Process">" { // sample slave zone
file </CODE><KBD CLASS="Literal-user-input">"m/site1.foo.com"</KBD><CODE CLASS="Program-Process">;
allow-transfer { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; </CODE><EM CLASS="variable">externals</EM><CODE CLASS="Program-Process">; };
<CODE CLASS="Program-Process">zone "</CODE><EM CLASS="pathname">site2.example.com</EM><CODE CLASS="Program-Process">" {
file </CODE><KBD CLASS="Literal-user-input">"s/site2.foo.com"</KBD><CODE CLASS="Program-Process">;
masters { </CODE><EM CLASS="variable">another_bastion_host_maybe</EM><CODE CLASS="Program-Process">; };
allow-transfer { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; </CODE><EM CLASS="variable">externals</EM><CODE CLASS="Program-Process">; }
This is a short guide to setting up Transaction SIGnatures (TSIG) based transaction security in BIND. It describes changes to the configuration file as well as what changes are required for different features, including the process of creating transaction keys and using transaction signatures with BIND.</P>
BIND primarily supports TSIG for server to server communication. This includes zone transfer, notify, and recursive query messages. The resolver bundled with BIND 8.2 has limited support for TSIG, but it is doubtful that support will be integrated into any client applications.</P>
TSIG might be most useful for dynamic update. A primary server for a dynamic zone should use access control to control updates, but IP-based access control is insufficient. Key-based access control is far superior. See RFC 2845 in the <A HREF="Bv9ARM.a.html#17631" CLASS="XRef">
A shared secret is generated to be shared between host1 and host2. The key name is chosen to be "host1-host2.", which is arbitrary. The key name must be the same on both hosts.</P>
The following command will generate a 128 bit (16 byte) HMAC-MD5 key as described above. Longer keys are better, but shorter keys are easier to read. Note that the maximum key length is 512 bits; keys longer than that will be digested with MD5 to produce a 128 bit key.</P>
<KBD CLASS="Literal-user-input">bin/dnssec/dnssec-keygen -a hmac-md5 -b 128 -n HOST host1-host2.</KBD>
The key is in the file "Khost1-host2.+157+00000.private". Nothing actually uses this file, but the base-64 encoded string following "Key:" can be extracted:</P>
The shared secret is simply a random sequence of bits, encoded in base-64. Most ASCII strings are valid base-64 strings (assuming the length is a multiple of 4 and only valid characters are used), so the shared secret can be manually generated.</P>
This is beyond the scope of DNS. A secure transport mechanism should be used. This could be secure FTP, ssh, telephone, etc.</P>
secret "</CODE><KBD CLASS="Literal-user-input">La/E5CjG9O+os1jq0a2jdA==</KBD><CODE CLASS="Program-Process">";
The algorithm, hmac-md5, is the only one supported by BIND. The secret is the one generated above. Since this is a secret, it is recommended that either <CODE CLASS="Program-Process">
be non-world readable, or the key directive be added to a non-world readable file that is included by <CODE CLASS="Program-Process">
At this point, the key is recognized. This means that if the server receives a message signed by this key, it can verify the signature. If the signature succeeds, the response is signed by the same key.</P>
Since keys are shared between two hosts only, the server must be told when keys are to be used. The following is added to the <CODE CLASS="Program-Process">
Multiple keys may be present, but only the first is used. This directive does not contain any secrets, so it may be in a world-readable file.</P>
If host1 sends a message that is a response to that address, the message will be signed with the specified key. host1 will expect any responses to signed messages to be signed with the same key.</P>
A similar statement must be present in host2's configuration file (with host1's address) for host2 to sign non-response messages to host1.</P>
directives. This has been extended to allow TSIG keys also. The above key would be denoted <CODE CLASS="Program-Process">
This allows dynamic updates to succeed only if the request was signed by a key named "<CODE CLASS="Program-Process">
The processing of TSIG signed messages can result in several errors. If a signed message is sent to a non-TSIG aware server, a FORMERR will be returned, since the server will not understand the record. This is a result of misconfiguration, since the server must be explicitly configured to send a TSIG signed message to a specific server.</P>
If a TSIG aware server receives a message signed by an unknown key, the response will be unsigned with the TSIG extended error code set to BADKEY. If a TSIG aware server receives a message with a signature that does not validate, the response will be unsigned with the TSIG extended error code set to BADSIG. If a TSIG aware server receives a message with a time outside of the allowed range, the response will be signed with the TSIG extended error code set to BADTIME, and the time values will be adjusted so that the response can be successfully verified. In any of these cases, the message's rcode is set to NOTAUTH.</P>
is a mechanism for automatically generating a shared secret between two hosts. There are several "modes" of <CODE CLASS="Program-Process">
that specify how the key is generated or assigned. BIND implements only one of these modes, the Diffie-Hellman key exchange. Both hosts are required to have a Diffie-Hellman KEY record (although this record is not required to be present in a zone). The <CODE CLASS="Program-Process">
process must use signed messages, signed either by TSIG or SIG(0). The result of <CODE CLASS="Program-Process">
query (including any appropriate KEYs) to a TKEY-aware server. The server response, if it indicates success, will contain a <CODE CLASS="Program-Process">
record and any appropriate keys. After this exchange, both participants have enough information to determine the shared secret; the exact process depends on the <CODE CLASS="Program-Process">
Cryptographic authentication of DNS information is possible through the DNS Security (<EM CLASS="Emphasis">
) extension, defined in RFC 2535. This section describes the creation and use of DNSSEC signed zones.</P>
In order to set up a DNSSEC secure zone, there are a series of steps which must be followed. BINDv9 ships with several tools that are used in this process, which are explained in more detail below. In all cases, the "<CODE CLASS="Program-Process">
There must also be communication with the administrators of the parent and/or child zone to transmit keys and signatures. A zone's security status must be indicated by the parent zone for a DNSSEC capable resolver to trust its data.</P>
For other servers to trust data in this zone, they must either be statically configured with this zone's zone key or the zone key of another zone above this one in the DNS tree.</P>
A secure zone must contain one or more zone keys. The zone keys will sign all other records in the zone, as well as the zone keys of any secure delegated zones. Zone keys must have the same name as the zone, a name type of <CODE CLASS="Program-Process">
, and must be usable for authentication. It is recommended that zone keys be mandatory to implement a cryptographic algorithm; currently the only key mandatory to implement an algorithm is DSA.</P>
(where 12345 is an example of a key identifier). The key file names contain the key name (<EM CLASS="pathname">
), algorithm (3 is DSA, 1 is RSA, etc.), and the key identifier (12345 in this case). The private key (in the <EM CLASS="pathname">
Once the zone keys have been generated, a key set must be built for transmission to the administrator of the parent zone, so that the parent zone can sign the keys with its own zone key and correctly indicate the security status of this zone. When building a key set, the list of keys to be included and the TTL of the set must be specified, and the desired signature validity period of the parent's signature may also be specified.</P>
The list of keys to be inserted into the key set may also included non-zone keys present at the apex. <CODE CLASS="Program-Process">
The following command generates a key set containing the above key and another key similarly generated, with a TTL of 3600 and a signature validity period of 10 days starting from now.</P>
. This file should be transmitted to the parent to be signed. It includes the keys, as well as signatures over the key set generated by the zone keys themselves, which are used to prove ownership of the private keys and encode the desired validity period.</P>
administrator should receive keyset files for each secure subzone. These keys must be signed by this zone's zone keys.</P>
. This file should be both transmitted back to the child and retained. It includes all keys (the child's keys) from the keyset file and signatures generated by this zone's zone keys.</P>
file for this zone generated by the parent (if there is one). The zone signer will generate <CODE CLASS="Program-Process">
records for the zone, as well as incorporate the zone key signature from the parent and indicate the security status at all delegation points.</P>
. By default, all zone keys which have an available private key are used to generate signatures.</P>
Unlike in BIND 8, data is not verified on load in BINDv9, so zone keys for authoritative zones do not need to be specified in the configuration file.</P>
IPv6 addresses are 128-bit identifiers for interfaces and sets of interfaces which were introduced in the DNS to facilitate scalable Internet routing. There are three types of addresses: <EM CLASS="Emphasis">
, an identifier for a set of interfaces. Here we describe the global Unicast address scheme. For more information, see RFC 2374.</P>
is provided by the upstream provider or ISP, and (roughly) corresponds to the IPv4 <EM CLASS="Emphasis">
is where you can subnet this space, much like subnetting an IPv4 class A or B network into class Cs. The <EM CLASS="Emphasis">
is the address of an individual interface on a given network. (With IPv6, addresses belong to interfaces rather than machines.)</P>
The subnetting capability of IPv6 is much more flexible than that of IPv4: subnetting can now be carried out on bit boundaries, in much the same way as Classless InterDomain Routing (CIDR).</P>
A 3 bit FP (Format Prefix) of 001 indicates this is a global Unicast address. FP lengths for other types of addresses may vary.</P>
24 bits for Next Level Aggregators. This allows organizations with a TLA to hand out portions of their IP space to client organizations, so that the client can then split up the network further by filling in more NLA bits, and hand out IPv6 prefixes to their clients, and so forth.</P>
There is no particular structure for the Site topology section. Organizations can allocate these bits in any way they desire, in the same way as they would subnet an IPv4 class A (8-bit prefix) network.</P>
The Interface Identifier must be unique on that network. On ethernet networks, one way to ensure this is to set the address to the first three bytes of the hardware address, "FFFE", then the last three bytes of the hardware address. The lowest significant bit of the first byte should then be complemented. Addresses are written as 32-bit blocks separated with a colon, and leading zeros of a block may be omitted, for example:</P>
IPv6 address specifications are likely to contain long strings of zeros, so the architects have included a shorthand for specifying them. The double colon ('::') indicates the longest possible string of zeros that can fit, and can be used only once in an address.</P>
Forward name lookups (host name to IP address) under IPv6 do not necessarily return the complete IPv6 address of the host. Because the provider-assigned prefix may change, the A6 record can simply specify the locally assigned portion of the name, and refer to the provider for the remainder.</P>
Note that the number preceding the address is the number of bits to be provided via the referral. This is probably the easiest way to roll out an IPv6 installation, though you may wish to provide a reference to your provider assigned prefix:</P>
The referral where there are no more bits is to ".", the root zone. Be warned that excessive use of this chaining can lead to extremely poor name resolution for people trying to access your hosts.</P>
Reverse IPv6 addresses may appear as one or more hex strings, known as "bitstring labels," each followed by a number of valid bits. A full 128 bits may be specified at the ip6.int top level, or more likely, the provider will delegate you a smaller chunk of addresses for which you will need to supply reverse DNS.</P>
The address can be split up along arbitrary boundaries, and is written with hex numbers in forward order, rather than in reverse order as IPv4 PTR records are written. The sections between dot separators are reversed as usual. If the number of valid bits in the hex string is less than the string specifies, it is the <EM CLASS="Emphasis-underline">
that are counted. Thus, \[x2/3] gives a bit pattern of 0010, the first three bits of which, 001, are valid.</P>
These strings are all equivalent. The combined TLA/RES/NLA in the second example bears no resemblance to any string in the address because it is offset by three bits.</P>
Delegation of reverse addresses is done through the new DNAME RR. In the example above, where <EM CLASS="Emphasis">
), the domain administrator would insert a line similar to the following in the <EM CLASS="Emphasis">
, in this case) provide all the bits required for reverse and forward resolution to allow name resolution even if the network is disconnected from the Internet. This will also allow operation with DNSSEC if you set up a false trusted server for "." containing only delegations for your forward and reverse zones directly to the top of your administrative control. This should be signed with a key trusted by all of your clients, equivalent to the real key for ".". </P>