Auto Root Zone Updates?

Jason Williams hizzow at cfl.rr.com
Tue Oct 10 02:03:23 UTC 2000


I recently setup a BIND 8 Server, I setup the server using the DNS HOWTO
that is included in the LDP (Linux Documentaion Project).  Towards the end
of the HOWTO, there is a script that uses Dig to get the latest Zone info
from internic.  My problem is this, I'm getting timeouts from Internic.  The
script runs fine, my connectivity is fine, so i'm assuming that Internic has
shut off that type service (why I don't know)  Is there another way to
Automaticly update the root Zone file without going through the FTP server?



Below is the Script that i was using,  Respective Rights to the author of
the script.


Thanks,
Jason Williams



#!/bin/sh
#
# Update the nameserver cache information file once per month.
# This is run automatically by a cron entry.
#
# Original by Al Longyear
# Updated for bind 8 by Nicolai Langfeldt
# Miscelanious error-conditions reported by David A. Ranch
# Ping test suggested by Martin Foster
#
(
 echo "To: hostmaster <hostmaster>"
 echo "From: system <root>"
 echo "Subject: Automatic update of the root.hints file"
 echo

 PATH=/sbin:/usr/sbin:/bin:/usr/bin:
 export PATH
 cd /var/named

 # Are we online?  Ping a server at your ISP
 case `ping -qnc some.machine.net` in
   *'100% packet loss'*)
        echo "The network is DOWN. root.hints NOT updated"
        echo
        exit 0
        ;;
 esac

 dig @rs.internic.net . ns >root.hints.new 2>&1

 case `cat root.hints.new` in
   *NOERROR*)
        # It worked
        :;;
   *)
        echo "The root.hints file update has FAILED."
        echo "This is the dig output reported:"
        echo
        cat root.hints.new
        exit 0
        ;;
 esac

 echo "The root.hints file has been updated to contain the following
information:"
 echo
 cat root.hints.new

 chown root.root root.hints.new
 chmod 444 root.hints.new
 rm -f root.hints.old
 mv root.hints root.hints.old
 mv root.hints.new root.hints
 ndc restart
 echo
 echo "The nameserver has been restarted to ensure that the update is
complete."
 echo "The previous root.hints file is now called
/var/named/root.hints.old."
) 2>&1 | /usr/lib/sendmail -t
exit 0




More information about the bind-users mailing list