Bv9ARM.4.html revision 9bff67898d55cddfcec9ce30cc2b1bb6211ec691
7f007e36bec06aba6b3a0f84a64f2abf99edfcd8gstein<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML EXPERIMENTAL 970324//EN">
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj - Copyright (C) 2000 Internet Software Consortium.
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj - Permission to use, copy, modify, and distribute this software for any
6a01f2d5ec2024b68edd1d42056b41a88dc0a935aaron - purpose with or without fee is hereby granted, provided that the above
6a01f2d5ec2024b68edd1d42056b41a88dc0a935aaron - copyright notice and this permission notice appear in all copies.
4a257be29f8aeab984fe5622fa69e0b2aab204d7jerenkrantz - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz - ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz - OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
df14f0d3a5191cdd7c4bb5b03acd135d43a6f51brbb - CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
df14f0d3a5191cdd7c4bb5b03acd135d43a6f51brbb - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
ab71b233b3a36489e44a7b061c48293be0b17788jwoolley - PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
571760de5e60c0b459cb11be45507b923cd023eejwoolley - ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
571760de5e60c0b459cb11be45507b923cd023eejwoolley - SOFTWARE.
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb<META NAME="GENERATOR" CONTENT="Adobe FrameMaker 5.5/HTML Export Filter">
09bd86d0db1114ee23eda0a6eb76ca055877a1cftrawickSection 4. Advanced Concepts</H1>
af4c982a7cf4515f124935f99a329744035fc699sliveDynamic Update</H3>
2f316e524ff96c16278c4f3361bac3f69179005dwroweDynamic 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>
2f316e524ff96c16278c4f3361bac3f69179005dwroweDynamic update is enabled on a zone-by-zone basis, by including an <CODE CLASS="Program-Process">
2f316e524ff96c16278c4f3361bac3f69179005dwroweallow-update</CODE>
2f316e524ff96c16278c4f3361bac3f69179005dwroweupdate-policy</CODE>
2f316e524ff96c16278c4f3361bac3f69179005dwrowe statement.</P>
c00273b9c51c617ede471e9cb95c22420f1227fbbrianpUpdating of secure zones (zones using DNSSEC) is modelled after the <EM CLASS="Emphasis">
c00273b9c51c617ede471e9cb95c22420f1227fbbrianpsimple-secure-update</EM>
c00273b9c51c617ede471e9cb95c22420f1227fbbrianp proposal, a work in progress in the DNS Extensions working group of the IETF. (See <EM CLASS="URL">
c00273b9c51c617ede471e9cb95c22420f1227fbbrianp<A HREF="http://www.ietf.org/html.charters/dnsext-charter.html">http://www.ietf.org/html.charters/dnsext-charter.html</A></EM>
54e1babd5a5a56c576eeeace54110150769cc916coar 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>
54e1babd5a5a56c576eeeace54110150769cc916coarThe 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">
7fe18c15b669db9d191859695901dc4fcf3829dawrowe) 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>
b84f66c93f820824b1d5455181f55598b766319cwroweIncremental Zone Transfers (IXFR)</H3>
bf9acc131271d18db51d30ace549d3c3b6a2b9fbrbbThe 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">
b84f66c93f820824b1d5455181f55598b766319cwroweWhen 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>
79d5106a9b65b956d646f5daae4b94bc79e315b8trawickWhen 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">
dc96a5e6f9af3c514df4c61ab9468fcf97f9846fwrowerequest-ixfr</CODE>
dc96a5e6f9af3c514df4c61ab9468fcf97f9846fwroweserver</CODE>
976501adbc040220270f7d1d77c4b8373033be69wrowe statement.</P>
852271d782b83c92c4581c9f1bafe342169edc89jerenkrantz4.3 Split DNS</H3>
1b3f48fd6b1ccb8745f908e40156c5a85ca3c347jerenkrantzSetting up different views, or visibility, of DNS space to internal, as opposed to external, resolvers is usually referred to as a <EM CLASS="Emphasis">
1b3f48fd6b1ccb8745f908e40156c5a85ca3c347jerenkrantzSplit DNS</EM>
1b3f48fd6b1ccb8745f908e40156c5a85ca3c347jerenkrantzSplit Brain DNS</EM>
1b3f48fd6b1ccb8745f908e40156c5a85ca3c347jerenkrantz setup. There are several reasons an organization would want to set up its DNS this way.</P>
39cf872a6df49bd5affe2ca6eaf683918184fbb4trawickOne 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>
1b3f48fd6b1ccb8745f908e40156c5a85ca3c347jerenkrantzAnother 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>
33f5961d34a8b5390cebad0543b3ebe67830e5d7jerenkrantzHere is an example of a split DNS setup:</P>
33f5961d34a8b5390cebad0543b3ebe67830e5d7jerenkrantzExample, Inc.</EM>
54e1babd5a5a56c576eeeace54110150769cc916coar (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>
54e1babd5a5a56c576eeeace54110150769cc916coarExample, Inc.</EM>
54e1babd5a5a56c576eeeace54110150769cc916coar 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>
54e1babd5a5a56c576eeeace54110150769cc916coarIn 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>
949aa7bba7f804faa8e6b08cad42a98fc0255d85jerenkrantzThe internal servers will be configured to forward all queries, except queries for <EM CLASS="pathname">
07021d9f405849228b859d9fb4b877f20e4fbba3jerenkrantz, to the servers in the DMZ. These internal servers will have complete sets of information for <EM CLASS="pathname">
109faf633e12ab0bbdd602c7addc795cce59e8addreid domains, the internal nameservers must be configured to disallow all queries to these domains from any external hosts, including the bastion hosts.</P>
109faf633e12ab0bbdd602c7addc795cce59e8addreidThe external servers, which are on the bastion hosts, will be configured to serve the "public" version of the <EM CLASS="pathname">
109faf633e12ab0bbdd602c7addc795cce59e8addreid zones. This could include things such as the host records for public servers (<EM CLASS="pathname">
4ca13a5e126946272f02637e268a8e09193c553ecoar), and mail exchange (MX) records (<EM CLASS="pathname">
4ca13a5e126946272f02637e268a8e09193c553ecoar 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>
38b116de532efb28defc6a0aaa71fb8c46487190gsteinHere's an example of a wildcard MX record:</P>
38b116de532efb28defc6a0aaa71fb8c46487190gstein<PRE CLASS="2Level-fixed"><A NAME="pgfId=997373"> </A>
38b116de532efb28defc6a0aaa71fb8c46487190gstein<CODE CLASS="grammar_literal">* IN MX 10 external1.example.com.</CODE>
abf9f8824312153040e1ee588a50058c67a4081ajerenkrantzNow 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>
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantzQueries 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>
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantzIn order for all this to work properly, internal clients will need to be configured to query <EM CLASS="Emphasis">
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantz the internal nameservers for DNS queries. This could also be enforced via selective filtering on the network.</P>
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantzIf everything has been set properly, <EM CLASS="Emphasis">
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantzExample, Inc.</EM>
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantz's internal clients will now be able to:</P>
38b116de532efb28defc6a0aaa71fb8c46487190gstein zones.</LI>
38b116de532efb28defc6a0aaa71fb8c46487190gstein domains.</LI>
b84f66c93f820824b1d5455181f55598b766319cwroweLook up any hostnames on the Internet.</LI>
7fe18c15b669db9d191859695901dc4fcf3829dawroweExchange mail with internal AND external people.</LI>
60d567a0c2aae815ee6fc20c0d65032bea52c92cwroweHosts on the Internet will be able to:</P>
3913a3b7e7c72ea11d05da36275db39c2dc39b68jwoolleyExchange mail with anyone in the <EM CLASS="pathname">
3913a3b7e7c72ea11d05da36275db39c2dc39b68jwoolley zones.</LI>
5fcdb40a60e9819e5fb192f7ea97a4c29d350ecbjerenkrantzHere 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">
5fcdb40a60e9819e5fb192f7ea97a4c29d350ecbjerenkrantzSample Configuration and Logging</A>
e32adabcbf3bf5b69ba2e8b163b971839efc94dbtrawickInternal DNS server config:</P>
23ce412bd50a47accab4dd26019b78810bbf46ebtrawick<PRE CLASS="2Level-fixed"><A NAME="pgfId=997390"></A>
e32adabcbf3bf5b69ba2e8b163b971839efc94dbtrawick<CODE CLASS="Program-Process">acl internals { 172.16.72.0/24; 192.168.1.0/24; };
bebc7b9445f95339822c26bfd470349006f9ec40stoddardacl externals { </CODE><EM CLASS="variable">bastion-ips-go-here</EM><CODE CLASS="Program-Process">; };
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard forward only;
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard forwarders { </CODE><EM CLASS="variable">bastion-ips-go-here</EM><CODE CLASS="Program-Process">; }; // forward to external servers
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard 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">)
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard 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
1b9744b72f26e9a0e935f9c08d49feb1fcce72f9jwoolley allow-recursion { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; }; // restrict recursion
1b9744b72f26e9a0e935f9c08d49feb1fcce72f9jwoolley<PRE CLASS="2Level-fixed"><A NAME="pgfId=997402"></A>
1b9744b72f26e9a0e935f9c08d49feb1fcce72f9jwoolley<CODE CLASS="Program-Process">zone "</CODE><EM CLASS="pathname">site1.example.com</EM><CODE CLASS="Program-Process">" { // sample slave zone
1b9744b72f26e9a0e935f9c08d49feb1fcce72f9jwoolley type </CODE><EM CLASS="variable">master</EM><CODE CLASS="Program-Process">;
1b9744b72f26e9a0e935f9c08d49feb1fcce72f9jwoolley file </CODE><KBD CLASS="Literal-user-input">"m/site1.example.com"</KBD><CODE CLASS="Program-Process">;
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard forwarders { }; // do normal iterative
19cbe4d7b7c931723e7249de6829bf965a1fee72stoddard // resolution (do not forward)
19cbe4d7b7c931723e7249de6829bf965a1fee72stoddard allow-query { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; </CODE><EM CLASS="variable">externals</EM><CODE CLASS="Program-Process">; };
93db592309ba9e5ab230f67611a2c74fece9cdb2marc allow-transfer { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; };
93db592309ba9e5ab230f67611a2c74fece9cdb2marc<CODE CLASS="Program-Process">zone "</CODE><EM CLASS="pathname">site2.example.com</EM><CODE CLASS="Program-Process">" {
93db592309ba9e5ab230f67611a2c74fece9cdb2marc type </CODE><EM CLASS="variable">slave</EM><CODE CLASS="Program-Process">;
93db592309ba9e5ab230f67611a2c74fece9cdb2marc file </CODE><KBD CLASS="Literal-user-input">"s/site2.example.com"</KBD><CODE CLASS="Program-Process">
b187d568e1507d75139ebc13ca945b38fc05d55cstoddard masters { 172.16.72.3; };
b187d568e1507d75139ebc13ca945b38fc05d55cstoddard forwarders { };
b187d568e1507d75139ebc13ca945b38fc05d55cstoddard allow-query { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; </CODE><EM CLASS="variable">externals</EM><CODE CLASS="Program-Process">; };
1c6fb1e726ce22694de0e9a957adb67b929e5d4fstoddard allow-transfer { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; };
a5ed555df952c85bc1b179f5981e8a6c54ba16e6stoddard<CODE CLASS="Program-Process">zone "</CODE><EM CLASS="pathname">site1.internal</EM>
d2f8b010487ffa990a9c268df5a25579e7291bcdrbb type </CODE><EM CLASS="variable">master</EM><CODE CLASS="Program-Process">;
a5ed555df952c85bc1b179f5981e8a6c54ba16e6stoddard file </CODE><KBD CLASS="Literal-user-input">"m/site1.internal"</KBD><CODE CLASS="Program-Process">;
0bff2f28ef945280c17099c142126178a78e1e54manoj forwarders { };
0bff2f28ef945280c17099c142126178a78e1e54manoj allow-query { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; };
0bff2f28ef945280c17099c142126178a78e1e54manoj allow-transfer { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; }
35330e0d79ceb8027223bbb8330a381b1f989d6etrawick<PRE CLASS="2Level-fixed"><A NAME="pgfId=997424"></A>
0bff2f28ef945280c17099c142126178a78e1e54manoj<CODE CLASS="Program-Process">zone "</CODE><EM CLASS="pathname">site2.internal</EM><CODE CLASS="Program-Process">" {
9c09943bad734ebd5c7cc10bd6d63b75c4c6e056stoddard type </CODE><EM CLASS="variable">slave</EM><CODE CLASS="Program-Process">;
ff849e4163ed879288f0df15f78b6c9d278ec804fanf file </CODE><KBD CLASS="Literal-user-input">"s/site2.internal"</KBD><CODE CLASS="Program-Process">;
ff849e4163ed879288f0df15f78b6c9d278ec804fanf masters { 172.16.72.3; };
447c6ce3ff08073c44f6785d5256271fcb877512wrowe forwarders { };
447c6ce3ff08073c44f6785d5256271fcb877512wrowe allow-query { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process"> };
447c6ce3ff08073c44f6785d5256271fcb877512wrowe allow-transfer { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; }
7fe18c15b669db9d191859695901dc4fcf3829dawroweExternal (bastion host) DNS server config:</P>
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gstein<CODE CLASS="Program-Process">acl internals { 172.16.72.0/24; 192.168.1.0/24; };
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gsteinacl externals { </CODE><EM CLASS="variable">bastion-ips-go-here</EM><CODE CLASS="Program-Process">; };
20db975063c58c8fadf72656a8cbd869554e6bfbwrowe allow-transfer { </CODE><EM CLASS="variable">none</EM><CODE CLASS="Program-Process">; }; // sample allow-transfer (no one)
20db975063c58c8fadf72656a8cbd869554e6bfbwrowe 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
20db975063c58c8fadf72656a8cbd869554e6bfbwrowe allow-recursion { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; </CODE><EM CLASS="variable">externals</EM><CODE CLASS="Program-Process">; }; // restrict recursion
615618f97c8870e6d62b9ad417632c19302c08c0ianh<CODE CLASS="Program-Process">zone "</CODE><EM CLASS="pathname">site1.example.com</EM><CODE CLASS="Program-Process">" { // sample slave zone
20db975063c58c8fadf72656a8cbd869554e6bfbwrowe type </CODE><EM CLASS="variable">master</EM><CODE CLASS="Program-Process">;
db3ccce11afac4fc1d4f51a65424412f7480c46cgstein file </CODE><KBD CLASS="Literal-user-input">"m/site1.foo.com"</KBD><CODE CLASS="Program-Process">;
dd4713dc5b186f4d1be7b88f86608fdb84cbe5d5gstein allow-query { </CODE><EM CLASS="variable">any</EM><CODE CLASS="Program-Process">; };
0eb7ca6cf812d98c534661ac474e873a32bf6325gstein allow-transfer { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; </CODE><EM CLASS="variable">externals</EM><CODE CLASS="Program-Process">; };
db3ccce11afac4fc1d4f51a65424412f7480c46cgstein<CODE CLASS="Program-Process">zone "</CODE><EM CLASS="pathname">site2.example.com</EM><CODE CLASS="Program-Process">" {
79d5106a9b65b956d646f5daae4b94bc79e315b8trawick type </CODE><EM CLASS="variable">slave</EM><CODE CLASS="Program-Process">;
79d5106a9b65b956d646f5daae4b94bc79e315b8trawick file </CODE><KBD CLASS="Literal-user-input">"s/site2.foo.com"</KBD><CODE CLASS="Program-Process">;
79d5106a9b65b956d646f5daae4b94bc79e315b8trawick masters { </CODE><EM CLASS="variable">another_bastion_host_maybe</EM><CODE CLASS="Program-Process">; };
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gstein allow-query { </CODE><EM CLASS="variable">any</EM><CODE CLASS="Program-Process">; };
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gstein allow-transfer { </CODE><EM CLASS="variable">internals</EM><CODE CLASS="Program-Process">; </CODE><EM CLASS="variable">externals</EM><CODE CLASS="Program-Process">; }
14cccaddba3a9263cf0d0ddc311e18f3e3dc9b0fgstein (or equivalent) on the bastion host(s):</P>
823c303d33c9e637a83d82208bcbafaf5f532d7bgsteinnameserver 172.16.72.2
e636eba7474e0010b5c7198af1c2fe5ad8652dbbmanojnameserver 172.16.72.3
e636eba7474e0010b5c7198af1c2fe5ad8652dbbmanojnameserver 172.16.72.4</CODE>
60d567a0c2aae815ee6fc20c0d65032bea52c92cwroweThis 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>
fdff4ace2701177219fe1c444f69242372423354aaronBIND 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>
fdff4ace2701177219fe1c444f69242372423354aaronTSIG 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">
fdff4ace2701177219fe1c444f69242372423354aaronProposed Standards</A>
fdff4ace2701177219fe1c444f69242372423354aaronsection of the Appendix. The <CODE CLASS="Program-Process">
fdff4ace2701177219fe1c444f69242372423354aaronnsupdate</CODE>
1d6142cc1486017d9bf11197334f78553fcb4244trawick program that is shipped with BIND 8 supports TSIG via the "<CODE CLASS="Program-Process">
9fccaed3f2d8df9e68dcd31b52885a17853b9f86lars" command line option.</P>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar4.4.1 Generate Shared Keys for Each Pair of Hosts</H4>
28d1da9ca818f831ea491f110dafcc10f7f07050coarA 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>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar4.4.1.1 Automatic Generation</H5>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarThe 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>
28d1da9ca818f831ea491f110dafcc10f7f07050coar<KBD CLASS="Literal-user-input">bin/dnssec/dnssec-keygen -a hmac-md5 -b 128 -n HOST host1-host2.</KBD>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarThe 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>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar <CODE CLASS="grammar_literal">La/E5CjG9O+os1jq0a2jdA==</CODE>
28d1da9ca818f831ea491f110dafcc10f7f07050coarThis string represents a shared secret.</P>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar4.4.1.2 Manual Generation</H5>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarThe 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>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarAlso, a known string can be run through <CODE CLASS="Program-Process">
28d1da9ca818f831ea491f110dafcc10f7f07050coarmmencode</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar or a similar program to generate base-64 encoded data.</P>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar4.4.2 Copying the Shared Secret to Both Machines</H4>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarThis is beyond the scope of DNS. A secure transport mechanism should be used. This could be secure FTP, ssh, telephone, etc.</P>
28d1da9ca818f831ea491f110dafcc10f7f07050coar4.4.3 Informing the Servers of the Key's Existence</H4>
28d1da9ca818f831ea491f110dafcc10f7f07050coarhost 2</EM>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar are both servers. The following is added to each server's <CODE CLASS="Program-Process">
64ad864fa0f4493eebb181e393b40a8a90beccb9coar<CODE CLASS="Program-Process">key </CODE><KBD CLASS="Literal-user-input">
64ad864fa0f4493eebb181e393b40a8a90beccb9coar algorithm </CODE><KBD CLASS="Literal-user-input">hmac-md5</KBD><CODE CLASS="Program-Process">;
28d1da9ca818f831ea491f110dafcc10f7f07050coar secret "</CODE><KBD CLASS="Literal-user-input">La/E5CjG9O+os1jq0a2jdA==</KBD><CODE CLASS="Program-Process">";
64ad864fa0f4493eebb181e393b40a8a90beccb9coarThe 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">
28d1da9ca818f831ea491f110dafcc10f7f07050coar be non-world readable, or the key directive be added to a non-world readable file that is included by <CODE CLASS="Program-Process">
64ad864fa0f4493eebb181e393b40a8a90beccb9coarAt 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>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar4.4.4 Instructing the Server to Use the Key</H4>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarSince 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">
28d1da9ca818f831ea491f110dafcc10f7f07050coar is 10.1.2.3:</P>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar<KBD CLASS="Literal-user-input">10.1.2.3</KBD><CODE CLASS="Program-Process"> {
28d1da9ca818f831ea491f110dafcc10f7f07050coar keys { </CODE><KBD CLASS="Literal-user-input">host1-host2</KBD><CODE CLASS="Program-Process">. ;};
64ad864fa0f4493eebb181e393b40a8a90beccb9coarMultiple 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>
6694e265e9a71ceaedbe1f1aa4db4d9ba42fb866wroweIf 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>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarA similar statement must be present in host2's configuration file (with host1's address) for host2 to sign non-response messages to host1.</P>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar4.4.5 TSIG Key Based Access Control</H4>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarBIND allows IP addresses and ranges to be specified in ACL definitions and<BR>
28d1da9ca818f831ea491f110dafcc10f7f07050coarallow-{ query | transfer | update } </CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coardirectives. This has been extended to allow TSIG keys also. The above key would be denoted <CODE CLASS="Program-Process">
64ad864fa0f4493eebb181e393b40a8a90beccb9coarkey host1-host2.</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarAn example of an allow-update directive would be:</P>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar<CODE CLASS="Program-Process">allow-update { key host1-host2. ;};</CODE>
28d1da9ca818f831ea491f110dafcc10f7f07050coarThis allows dynamic updates to succeed only if the request was signed by a key named "<CODE CLASS="Program-Process">
64ad864fa0f4493eebb181e393b40a8a90beccb9coarhost1-host2.</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar".</P>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar4.4.6 Errors</H4>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarThe 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>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarIf 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>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar4.5 TKEY</H3>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarTKEY</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar is a mechanism for automatically generating a shared secret between two hosts. There are several "modes" of <CODE CLASS="Program-Process">
28d1da9ca818f831ea491f110dafcc10f7f07050coarTKEY</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar 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">
64ad864fa0f4493eebb181e393b40a8a90beccb9coarTKEY</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar process must use signed messages, signed either by TSIG or SIG(0). The result of <CODE CLASS="Program-Process">
28d1da9ca818f831ea491f110dafcc10f7f07050coarTKEY</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar is a shared secret that can be used to sign messages with TSIG. <CODE CLASS="Program-Process">
64ad864fa0f4493eebb181e393b40a8a90beccb9coarTKEY</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar can also be used to delete shared secrets that it had previously generated.</P>
28d1da9ca818f831ea491f110dafcc10f7f07050coarTKEY</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar process is initiated by a client or server by sending a signed <CODE CLASS="Program-Process">
64ad864fa0f4493eebb181e393b40a8a90beccb9coarTKEY</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar query (including any appropriate KEYs) to a TKEY-aware server. The server response, if it indicates success, will contain a <CODE CLASS="Program-Process">
28d1da9ca818f831ea491f110dafcc10f7f07050coarTKEY</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar 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">
64ad864fa0f4493eebb181e393b40a8a90beccb9coarTKEY</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar mode. When using the Diffie-Hellman <CODE CLASS="Program-Process">
28d1da9ca818f831ea491f110dafcc10f7f07050coarTKEY</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar mode, Diffie-Hellman keys are exchanged, and the shared secret is derived by both participants.</P>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarDNSSEC</H3>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarCryptographic authentication of DNS information is possible through the DNS Security (<EM CLASS="Emphasis">
28d1da9ca818f831ea491f110dafcc10f7f07050coarDNSSEC</EM>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar) extension, defined in RFC 2535. This section describes the creation and use of DNSSEC signed zones.</P>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarIn 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">
64ad864fa0f4493eebb181e393b40a8a90beccb9coar" option prints a full list of parameters.</P>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarThere 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>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarFor 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>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar4.6.1 Generating Keys</H4>
64ad864fa0f4493eebb181e393b40a8a90beccb9coardnssec-keygen</CODE>
28d1da9ca818f831ea491f110dafcc10f7f07050coar program is used to generate keys.</P>
28d1da9ca818f831ea491f110dafcc10f7f07050coarA 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">
64ad864fa0f4493eebb181e393b40a8a90beccb9coarZONE</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar, 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>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarThe following command will generate a 768 bit DSA key for the <EM CLASS="pathname">
28d1da9ca818f831ea491f110dafcc10f7f07050coardnssec-keygen</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarTwo output files will be produced: <EM CLASS="pathname">
64ad864fa0f4493eebb181e393b40a8a90beccb9coar (where 12345 is an example of a key identifier). The key file names contain the key name (<EM CLASS="pathname">
28d1da9ca818f831ea491f110dafcc10f7f07050coar), algorithm (3 is DSA, 1 is RSA, etc.), and the key identifier (12345 in this case). The private key (in the <EM CLASS="pathname">
64ad864fa0f4493eebb181e393b40a8a90beccb9coar.private</EM>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar file) is used to generate signatures, and the public key (in the <EM CLASS="pathname">
64ad864fa0f4493eebb181e393b40a8a90beccb9coar file) is used for signature verification.</P>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarTo generate another key with the same properties, repeat the above command.</P>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarThe public keys should be inserted into the zone file with <CODE CLASS="Program-Process">
28d1da9ca818f831ea491f110dafcc10f7f07050coar$INCLUDE</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar statements.</P>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar4.6.2 Creating a Keyset</H4>
64ad864fa0f4493eebb181e393b40a8a90beccb9coardnssec-makekeyset</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar program is used to create a key set from one or more keys.</P>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarOnce 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>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarThe list of keys to be inserted into the key set may also included non-zone keys present at the apex. <CODE CLASS="Program-Process">
64ad864fa0f4493eebb181e393b40a8a90beccb9coardnssec-makekeyset</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coar may also be used at non-apex names.</P>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarThe 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>
64ad864fa0f4493eebb181e393b40a8a90beccb9coardnssec-makekeyset</CODE>
64ad864fa0f4493eebb181e393b40a8a90beccb9coarnow+864000</EM>
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj. 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>
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj4.6.3 Signing the Child's Keyset</H4>
ec0315cdf832eac2b78e50ad636af84fe4c9118cgsteindnssec-signkey</CODE>
ec0315cdf832eac2b78e50ad636af84fe4c9118cgstein program is used to sign one child's keyset.</P>
ec0315cdf832eac2b78e50ad636af84fe4c9118cgstein zone has any delegations which are secure, for example, <EM CLASS="pathname">
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj administrator should receive keyset files for each secure subzone. These keys must be signed by this zone's zone keys.</P>
dbf0c7bef06259486cd2748a2d0e82f27e099d6efieldingThe following command signs the child's key set with the zone keys:</P>
3e17185356213124b2e18ecaf1678a676f8e9ba5rbbdnssec-signkey</CODE>
ae6907470ddf23ab7c6b506e6407cc5372f9c0dftrawick. 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>
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj4.6.4 Signing the Zone</H4>
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>