Merge the two attribute syntax tables.
[tprouty/samba.git] / source4 / setup / named.conf
index 025788093ef6cf5b6d342a121310ab522a1fb3b3..0b087069c773c8cef00b1a84c05889e9b06f79ab 100644 (file)
@@ -1,37 +1,67 @@
+# This file should be included in your main BIND configuration file
 #
-# Insert these snippets into your named.conf or bind.conf to configure
-# the BIND nameserver.
-#
-
-# If you have a very recent BIND, supporting GSS-TSIG, 
-# insert this into options {}  (otherwise omit, it is not required if we don't accept updates)
-tkey-gssapi-credential "DNS/${DNSDOMAIN}";
-tkey-domain "${REALM}";
+# For example with
+# include "${PRIVATE_DIR}/named.conf";
 
-# You should always include the actual zone configuration reference:
 zone "${DNSDOMAIN}." IN {
-        type master;
-        file "${DNSDOMAIN}.zone";
+       type master;
+       file "${PRIVATE_DIR}/${DNSDOMAIN}.zone";
+       /*
+        * Attention: Not all BIND versions support "ms-self". The instead use
+        * of allow-update { any; }; is another, but less secure possibility.
+        */
        update-policy {
-               /* use ANY only for Domain controllers for now */
-               /* for normal machines A AAAA PTR is probbaly all is needed */
-               grant ${HOSTNAME}.${DNSDOMAIN}@${REALM} name ${HOSTNAME}.${DNSDOMAIN} ANY;
+               /*
+                * A rather long description here, as the "ms-self" option does
+                * not appear in any docs yet (it can only be found in the
+                * source code).
+                *
+                * The short of it is that each host is allowed to update its
+                * own A and AAAA records, when the update request is properly
+                * signed by the host itself.
+                *
+                * The long description is (look at the
+                * dst_gssapi_identitymatchesrealmms() call in lib/dns/ssu.c and
+                * its definition in lib/dns/gssapictx.c for details):
+                *
+                * A GSS-TSIG update request will be signed by a given signer
+                * (e.g. machine-name$@${REALM}).  The signer name is split into
+                * the machine component (e.g. "machine-name") and the realm
+                * component (e.g. "${REALM}").  The update is allowed if the
+                * following conditions are met:
+                *
+                * 1) The machine component of the signer name matches the first
+                * (host) component of the FQDN that is being updated.
+                *
+                * 2) The realm component of the signer name matches the realm
+                * in the grant statement below (${REALM}).
+                *
+                * 3) The domain component of the FQDN that is being updated
+                * matches the realm in the grant statement below.
+                *
+                * If the 3 conditions above are satisfied, the update succeeds.
+                */
+               grant ${REALM} ms-self * A AAAA;
        };
 };
 
-# Also, you need to change your init scripts to set this environment variable
-# for named: KRB5_KTNAME so that it points to the keytab generated.
-# In RedHat derived systems such RHEL/CentOS/Fedora you can add the following
-# line to the /etc/sysconfig/named file:
-# export KRB5_KTNAME=${DNS_KEYTAB_ABS}
-#
-# Please note that most distributions have BIND configured to run under
-# a non-root user account.  For example, Fedora Core 6 (FC6) runs BIND as
-# the user "named" once the daemon relinquishes its rights.  Therefore,
-# the file "${DNS_KEYTAB}" must be readable by the user that BIND run as.
-# If BIND is running as a non-root user, the "${DNS_KEYTAB}" file must have its
-# permissions altered to allow the daemon to read it.  In the FC6
-# example, execute the commands:
-# 
-# chgrp named ${DNS_KEYTAB_ABS}
-# chmod g+r ${DNS_KEYTAB_ABS}
+# The reverse zone configuration is optional.  The following example assumes a
+# subnet of 192.168.123.0/24:
+
+/*
+zone "123.168.192.in-addr.arpa" in {
+       type master;
+       file "123.168.192.in-addr.arpa.zone";
+       update-policy {
+               grant ${REALM_WC} wildcard *.123.168.192.in-addr.arpa. PTR;
+       };
+};
+*/
+
+# Note that the reverse zone file is not created during the provision process.
+
+# The most recent BIND versions (9.5.0a5 or later) support secure GSS-TSIG
+# updates.  If you are running an earlier version of BIND, or if you do not wish
+# to use secure GSS-TSIG updates, you may remove the update-policy sections in
+# both examples above.
+