Subject: Problem with BIND 9's "nsupdate" command
To: None <current-users@NetBSD.org>
From: Matthias Scheler <tron@zhadum.de>
List: current-users
Date: 06/17/2004 09:13:10
Hello,
the DNS of my internal network is managed via DNS updates either by the
DHCP server or a shell script whick invokes "nsupdate". The script
looks like this:
#!/bin/sh
PATH=${PATH}:/usr/pkg/bin; export PATH
PROGNAME=`basename $0`;export PROGNAME
if [ $# -lt 2 ]
then
echo "Usage: ${PROGNAME} address host [alias ...]" 1>&2
exit 1
fi
ADDR=$1
NAME=$2
shift 2
REV="`ipv6calc --in ipv6addr --out revnibbles.int $ADDR 2>/dev/null`"
if [ $? -ne 0 ]
then
REV="`ipv6calc --in ipv4addr --out revipv4 $ADDR 2>/dev/null`"
if [ $? -ne 0 ]
then
echo "${PROGNAME}: invalid address \"${ADDR}\"." 1>&2
exit 1
fi
RECORD=A
else
RECORD=AAAA
fi
(echo "update add $NAME 86400 $RECORD $ADDR"
echo "update add $REV 86400 PTR $NAME"
for ALIAS
do
echo "update add $ALIAS 86400 CNAME $NAME"
done
echo "") |
exec nsupdate -k /usr/local/lib/dns:intranet.zhadum.de.
Unfortunately this script doesn't work with BIND 9's "nsupdate" command any
more. The easy part was to change the "-k" argument" to
"/usr/local/lib/dns/Kintranet.zhadum.de.+157+00000.key" so that "nsupdate"
finds the key. But updates still don't work afterwards. "nsupdate" displays
this error message:
update failed: NOTZONE
The name server (BIND 9.3.0beta3 built from "pkgsrc" under NetBSD 2.0_BETA)
logs this error message:
Jun 16 11:47:30 colwyn named[12267]: client 213.146.107.4#65179: view internal: updating zone 'zhadum.de/IN': update failed: update RR is outside zone (NOTZONE)
It's not a problem with the name server setup because the script still
works fine with the old "nsupdate" binary under 2.0_BETA.
Kind regards
--
Matthias Scheler http://scheler.de/~matthias/