Date: Sun, 26 Jan 2003 15:55:30 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Marc Schneiders <marc@schneiders.org> Cc: <freebsd-stable@FreeBSD.ORG> Subject: Re: 4.7-R-p3: j.root-servers.net Message-ID: <200301262355.h0QNtU0m069607@apollo.backplane.com> References: <20030126224956.K27492-100000@voo.doo.net>
next in thread | previous in thread | raw e-mail | index | archive | help
:On Sun, 26 Jan 2003, at 14:08 [=GMT+0100], Hanspeter Roth wrote:
:> On Jan 25 at 14:25, Kevin Oberman spoke:
:> > > Date: Sat, 25 Jan 2003 23:17:25 +0100
:> > > From: Hanspeter Roth <hampi@rootshell.be>
:
:> > If you want to get a new version at any time, just issue the command:
:> > dig ns . @b.root-servers.net. > /etc/named/named.root (or wherever
:> > your named.conf tells it to look).
:>
:> Ok. I'll create a job as I have to update the instance in
:> /var/named/namedb anyway.
:
:A more permanent solution is to run secondary for root. This has
:several advantages. One being speed. The root data will be on your
:machine and automatically refreshed every 30 minutes (only when there
:...
It's better to pull the root list with a cronjob. I've included the
shell script I use. All you need to do is replace the named restart
code with whatever is appropriate for your machine (I'm using bind9 and
a chroot so 'ndc' doesn't work for me). You could get fancier and
compare the old and new zone files and only restart if they're
different but I only pull it once a week and there are almost always
differences so I didn't bother.
Pulling from a root server unnecessarily loads the root server,
especially when you use a secondary entry.
30 4 * * 0 cd /etc/namedb; ./getroot
-Matt
#!/bin/tcsh -f
#
# The root_hints file should be updated periodicly from
# ftp.rs.internic.net
umask 027
#set hostname = 'ftp.alternic.net'
#set remfile = 'db.root'
#set locfile = 'db.root'
set hostname = 'ftp.rs.internic.net'
set remfile = domain/root.zone.gz
set locfile = root.zone.gz
set path = ( /bin /usr/bin /sbin /usr/sbin )
fetch ftp://${hostname}:/${remfile}
if ( $status != 0) then
rm -f ${locfile}
echo "Download failed"
else
gunzip < ${locfile} > root.zone.new
if ( $status == 0 ) then
rm -f ${locfile}
if ( -f root.zone ) then
mv -f root.zone root.zone.bak
endif
mv -f root.zone.new root.zone
echo "Download succeeded, restarting named"
#
# CHANGE THESE LINES AS APPROPRIATE FOR YOUR SETUP
#
killall named
sleep 1
/usr/local/sbin/named -c named.conf -t /etc/namedb -u bind
else
echo "Download failed: gunzip returned error"
rm -f ${locfile}
endif
endif
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301262355.h0QNtU0m069607>
