head	1.8;
access;
symbols
	RELENG_6_4_0_RELEASE:1.7.2.1
	RELENG_6_4:1.7.2.1.0.4
	RELENG_6_4_BP:1.7.2.1
	RELENG_6_3_0_RELEASE:1.7.2.1
	RELENG_6_3:1.7.2.1.0.2
	RELENG_6_3_BP:1.7.2.1
	RELENG_6_2_0_RELEASE:1.7
	RELENG_6_2:1.7.0.8
	RELENG_6_2_BP:1.7
	RELENG_5_5_0_RELEASE:1.6.8.1
	RELENG_5_5:1.6.8.1.0.6
	RELENG_5_5_BP:1.6.8.1
	RELENG_6_1_0_RELEASE:1.7
	RELENG_6_1:1.7.0.6
	RELENG_6_1_BP:1.7
	RELENG_6_0_0_RELEASE:1.7
	RELENG_6_0:1.7.0.4
	RELENG_6_0_BP:1.7
	RELENG_6:1.7.0.2
	RELENG_6_BP:1.7
	RELENG_5_4_0_RELEASE:1.6.8.1
	RELENG_5_4:1.6.8.1.0.4
	RELENG_5_4_BP:1.6.8.1
	RELENG_4_11_0_RELEASE:1.4.2.2
	RELENG_4_11:1.4.2.2.0.12
	RELENG_4_11_BP:1.4.2.2
	RELENG_5_3_0_RELEASE:1.6.8.1
	RELENG_5_3:1.6.8.1.0.2
	RELENG_5_3_BP:1.6.8.1
	RELENG_5:1.6.0.8
	RELENG_5_BP:1.6
	RELENG_4_10_0_RELEASE:1.4.2.2
	RELENG_4_10:1.4.2.2.0.10
	RELENG_4_10_BP:1.4.2.2
	RELENG_5_2_1_RELEASE:1.6
	RELENG_5_2_0_RELEASE:1.6
	RELENG_5_2:1.6.0.6
	RELENG_5_2_BP:1.6
	RELENG_4_9_0_RELEASE:1.4.2.2
	RELENG_4_9:1.4.2.2.0.8
	RELENG_4_9_BP:1.4.2.2
	RELENG_5_1_0_RELEASE:1.6
	RELENG_5_1:1.6.0.4
	RELENG_5_1_BP:1.6
	RELENG_4_8_0_RELEASE:1.4.2.2
	RELENG_4_8:1.4.2.2.0.6
	RELENG_4_8_BP:1.4.2.2
	RELENG_5_0_0_RELEASE:1.6
	RELENG_5_0:1.6.0.2
	RELENG_5_0_BP:1.6
	RELENG_4_7_0_RELEASE:1.4.2.2
	RELENG_4_7:1.4.2.2.0.4
	RELENG_4_7_BP:1.4.2.2
	RELENG_4_6_2_RELEASE:1.4.2.2
	RELENG_4_6_1_RELEASE:1.4.2.2
	RELENG_4_6_0_RELEASE:1.4.2.2
	RELENG_4_6:1.4.2.2.0.2
	RELENG_4_6_BP:1.4.2.2
	RELENG_4_5_0_RELEASE:1.4.2.1
	RELENG_4_5:1.4.2.1.0.6
	RELENG_4_5_BP:1.4.2.1
	RELENG_4_4_0_RELEASE:1.4.2.1
	RELENG_4_4:1.4.2.1.0.4
	RELENG_4_4_BP:1.4.2.1
	RELENG_4_3_0_RELEASE:1.4.2.1
	RELENG_4_3:1.4.2.1.0.2
	RELENG_4_3_BP:1.4.2.1
	RELENG_4_2_0_RELEASE:1.4
	RELENG_4_1_1_RELEASE:1.4
	PRE_SMPNG:1.4
	RELENG_4_1_0_RELEASE:1.4
	RELENG_3_5_0_RELEASE:1.3.2.1
	RELENG_4_0_0_RELEASE:1.4
	RELENG_4:1.4.0.2
	RELENG_4_BP:1.4
	RELENG_3_4_0_RELEASE:1.3.2.1
	RELENG_3_3_0_RELEASE:1.3.2.1
	RELENG_3_2_PAO:1.3.0.4
	RELENG_3_2_PAO_BP:1.3
	RELENG_3_2_0_RELEASE:1.3
	RELENG_3_1_0_RELEASE:1.3
	RELENG_3:1.3.0.2
	RELENG_3_BP:1.3
	RELENG_2_2_8_RELEASE:1.1.6.2
	RELENG_3_0_0_RELEASE:1.3
	RELENG_2_2_7_RELEASE:1.1.6.1
	RELENG_2_2_6_RELEASE:1.1.6.1
	RELENG_2_2_5_RELEASE:1.1.6.1
	RELENG_2_2_2_RELEASE:1.1
	RELENG_2_2_1_RELEASE:1.1
	RELENG_2_2_0_RELEASE:1.1
	RELENG_2_1_7_RELEASE:1.1
	RELENG_2_1_6_1_RELEASE:1.1
	RELENG_2_1_6_RELEASE:1.1
	RELENG_2_2:1.1.0.6
	RELENG_2_2_BP:1.1
	RELENG_2_1_5_RELEASE:1.1
	RELENG_2_1_0_RELEASE:1.1
	RELENG_2_1_0:1.1.0.4
	RELENG_2_1_0_BP:1.1
	RELENG_2_0_5_RELEASE:1.1
	RELENG_2_0_5:1.1.0.2
	RELENG_2_0_5_BP:1.1
	RELENG_2_0_5_ALPHA:1.1;
locks; strict;
comment	@# @;


1.8
date	2007.06.18.05.58.23;	author dougb;	state dead;
branches;
next	1.7;

1.7
date	2004.09.28.09.46.00;	author dougb;	state Exp;
branches
	1.7.2.1;
next	1.6;

1.6
date	2002.01.22.17.22.41;	author ume;	state Exp;
branches
	1.6.8.1;
next	1.5;

1.5
date	2000.11.29.19.19.06;	author rwatson;	state Exp;
branches;
next	1.4;

1.4
date	99.08.27.23.24.01;	author peter;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	98.09.13.23.05.46;	author brian;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	97.08.11.04.06.49;	author fenner;	state Exp;
branches;
next	1.1;

1.1
date	95.03.21.16.33.44;	author wollman;	state Exp;
branches
	1.1.6.1;
next	;

1.7.2.1
date	2007.07.11.07.08.23;	author dougb;	state dead;
branches;
next	;

1.6.8.1
date	2004.09.30.23.36.07;	author dougb;	state Exp;
branches;
next	;

1.4.2.1
date	2001.03.05.13.33.00;	author asmodai;	state Exp;
branches;
next	1.4.2.2;

1.4.2.2
date	2002.02.04.18.24.21;	author ume;	state Exp;
branches;
next	1.4.2.3;

1.4.2.3
date	2012.11.17.07.22.38;	author svnexp;	state Exp;
branches;
next	;

1.3.2.1
date	99.08.29.14.19.30;	author peter;	state Exp;
branches;
next	;

1.1.6.1
date	97.08.11.04.09.06;	author fenner;	state Exp;
branches;
next	1.1.6.2;

1.1.6.2
date	98.09.13.23.10.08;	author brian;	state Exp;
branches;
next	1.1.6.3;

1.1.6.3
date	99.09.05.11.02.11;	author peter;	state Exp;
branches;
next	;


desc
@@


1.8
log
@Bring our default named configuration more in line with current
best practices:

1. The old way of generating the localhost zones was not optimal both
because they did not exist by default, and because they were not really
aligned with BCP. There is no need to have the dynamic data that the
make-localhost script generated, and good reasons to do this more
"by the book."

2. In named.conf
	a. Clean up white space
	b. Add/clarify a few comments
	c. Slave zones from the root servers instead of using a hints
	file. This has several advantages, as described in the comments.
	d. Significantly revamp the default zones, including the
	forward localhost zone, and the reverse zones for IPv4 and IPv6
	loopback addresses. There are extensive comments describing what
	is included and why. Interested readers should take the time to
	review the RFCs mentioned in the comments. There is also relevant
	information about the motivations for hosting these zones in the
	"work in progress" Internet-Draft,
	http://www.ietf.org/internet-drafts/draft-ietf-dnsop-default-local-zones-02.txt
	or its successor.
	It's also worth noting that a significant number of these
	empty zones are already included by default in the named binary
	without any user configuration.
	e. Because we're including a lot of examples of both local
	forward zones and slave zones in the default configuration,
	eliminate some of those examples.

3. Add new localhost-{forward|reverse} zone files, and an "empty" zone
to support the changes in 2.d. above. The empty zone file isn't really
empty in order to avoid a warning from BIND about a zone file that
doesn't contain any A or AAAA records.
@
text
@#!/bin/sh
#
# $FreeBSD: src/etc/namedb/make-localhost,v 1.7 2004/09/28 09:46:00 dougb Exp $
#
# make-localhost - edit the appropriate local information into
# /etc/namedb/localhost.rev
#

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
export PATH

if [ "`hostname -s`" != "`hostname`" ]; then
	# hostname must contain domain

	host=`hostname -s`
	fullhost=`hostname`
	domain=`echo $fullhost | sed "s/^$host\.//"`
else
	host=`hostname`

	if [ -z "$1" ]; then
		echo -n 'Enter your domain name: '
		read domain
	else
		domain="$1"
	fi

	# strip trailing dot, if any
	domain=`echo $domain | sed 's/\.$//'`
	fullhost="$host.$domain"
fi

date=`date +"%Y%m%d"`

mkdir -p master

mv -f master/localhost-v6.rev master/localhost-v6.rev.BAK 2>/dev/null

sed -e "s/@@host@@/$fullhost/g" \
	-e "s/@@domain@@/$domain/g" \
	-e "s/@@date@@/$date/g" \
	< PROTO.localhost-v6.rev > master/localhost-v6.rev

mv -f master/localhost.rev master/localhost.rev.BAK 2>/dev/null

exec sed -e "s/@@host@@/$fullhost/g" \
	-e "s/@@domain@@/$domain/g" \
	-e "s/@@date@@/$date/g" \
	< PROTO.localhost.rev > master/localhost.rev
@


1.7
log
@Create a named chroot directory structure in /var/named, and use it
by default when named is enabled. Also, improve our default directory
layout by creating /var/named/etc/namedb/{master|slave} directories,
and use the former for the generated localhost* files.

Rather than using pax to copy device entries, mount devfs in the
chroot directory.

There may be some corner cases where things need to be adjusted,
but overall this structure has been well tested on a production
network, and should serve the needs of the vast majority of users.

UPDATING has instructions on how to do the conversion for those
with existing configurations.
@
text
@d3 1
a3 1
# $FreeBSD$
@


1.7.2.1
log
@MFC of the work committed on 2007-06-18 to improve the default
named.conf. This brings us in line with BCP, and makes our
installed configuration usable as a local resolver right out
of the box.

This includes:
1.359 of etc/Makefile
1.5 of etc/namedb/Makefile
1.1 of etc/namedb/master/Makefile
all for the new files in etc/namedb/master,

1.23 and 1.24 of etc/namedb/named.conf to bring in the new
configuration options,

The new files in etc/namedb/master to support those options,

And deletion of the old *localhost*.rev files.

See the commit message to HEAD and the comments in the new
named.conf file for more details about the changes and the
reasons for them.
@
text
@d3 1
a3 1
# $FreeBSD: src/etc/namedb/make-localhost,v 1.7 2004/09/28 09:46:00 dougb Exp $
@


1.6
log
@Do not taint ::/124 for localhost reverse table.
@
text
@d3 1
a3 1
# $FreeBSD: src/etc/namedb/make-localhost,v 1.5 2000/11/29 19:19:06 rwatson Exp $
d35 3
a37 1
mv -f localhost-v6.rev localhost-v6.rev.BAK 2>/dev/null
d42 1
a42 1
	< PROTO.localhost-v6.rev > localhost-v6.rev
d44 1
a44 1
mv -f localhost.rev localhost.rev.BAK 2>/dev/null
d49 1
a49 1
	< PROTO.localhost.rev > localhost.rev
@


1.6.8.1
log
@MFC the BIND 9 import and chroot-by-default work up to date.

This includes:
1. More granular NO_BIND_* make knobs.
2. WITH_BIND_LIBS make knob.
3. Run in an automatically configured chroot dir by default.
4. Edit paths in man pages, and install man pages for liblwres.
5. Improve named.conf and make it work with the new structure.
6. Install the bind9 docs.
7. A few Makefile style fixes.

Approved by:	re (scottl)
@
text
@d3 1
a3 1
# $FreeBSD$
d35 1
a35 3
mkdir -p master

mv -f master/localhost-v6.rev master/localhost-v6.rev.BAK 2>/dev/null
d40 1
a40 1
	< PROTO.localhost-v6.rev > master/localhost-v6.rev
d42 1
a42 1
mv -f master/localhost.rev master/localhost.rev.BAK 2>/dev/null
d47 1
a47 1
	< PROTO.localhost.rev > master/localhost.rev
@


1.5
log
@o Add a PATH statement to the beginning of make-localhost, making it
  work right when the administrator has modified their runtime environment
  in a manner not anticipated by our script.

Requested by:	Tom Maher <tardis@@ece.cmu.edu>
@
text
@d3 1
a3 1
# $FreeBSD: src/etc/namedb/make-localhost,v 1.4 1999/08/27 23:24:01 peter Exp $
d34 7
@


1.4
log
@$Id$ -> $FreeBSD$
@
text
@d3 1
a3 1
# $FreeBSD$
d8 3
@


1.4.2.1
log
@MFC:	Add decent PATH.
@
text
@d3 1
a3 1
# $FreeBSD: src/etc/namedb/make-localhost,v 1.5 2000/11/29 19:19:06 rwatson Exp $
a7 3

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
export PATH
@


1.4.2.2
log
@MFC: Do not taint ::/124 for localhost reverse table.

	etc/namedb/PROTO.localhost-v6.rev:	1.1
	etc/namedb/make-localhost:		1.6
	etc/namedb/named.conf:			1.12
@
text
@d3 1
a3 1
# $FreeBSD: src/etc/namedb/make-localhost,v 1.4.2.1 2001/03/05 13:33:00 asmodai Exp $
a33 7

mv -f localhost-v6.rev localhost-v6.rev.BAK 2>/dev/null

sed -e "s/@@host@@/$fullhost/g" \
	-e "s/@@domain@@/$domain/g" \
	-e "s/@@date@@/$date/g" \
	< PROTO.localhost-v6.rev > localhost-v6.rev
@


1.4.2.3
log
@Switch importer
@
text
@d3 1
a3 1
# $FreeBSD: stable/4/etc/namedb/make-localhost 90207 2002-02-04 18:24:21Z ume $
@


1.3
log
@Add Id keyword
@
text
@d3 1
a3 1
#	$Id:$
@


1.3.2.1
log
@$Id$ -> $FreeBSD$
@
text
@d3 1
a3 1
# $FreeBSD$
@


1.2
log
@Make "make-localhost" Y2K safe by using "date +%Y" instead of "date +%y"
to pick the serial number.

PR:		misc/3465
Submitted by:	sjr1@@flash.net (Stephen J. Roznowski)
@
text
@d3 2
@


1.1
log
@Update root NS cache.
Delete bogus localhost.rev.
Add prototype localhost.rev and a script to create it automatically.
(NB to installl people: you should ask ``do you have a full-time connection
o the Internet?'', run this script, and enable named if the answer is
yes.)
@
text
@d28 1
a28 1
date=`date +"%y%m%d"`
@


1.1.6.1
log
@Merge from -current:
Make "make-localhost" Y2K safe by using "date +%Y" instead of "date +%y"
to pick the serial number.

PR:             misc/3465
Submitted by:   sjr1@@flash.net (Stephen J. Roznowski)
@
text
@d28 1
a28 1
date=`date +"%Y%m%d"`
@


1.1.6.2
log
@Add Id keyword
@
text
@a2 2
#	$Id:$
#
@


1.1.6.3
log
@$Id$ -> $FreeBSD$
@
text
@d3 1
a3 1
# $FreeBSD$
@

