Mass Update of DNS Records
Eivind Olsen
eivind at aminor.no
Thu Aug 28 21:23:33 UTC 2003
--On 28. august 2003 11:14 +0000 Jake <jake at dontmailme.coma> wrote:
> I need to change the IP address of about 200 DNS records and also increase
> the serial number by one for each. Is there a script out there to do
> this?
> Basically I need it done like this:
> 1) Look through all zone files for IP address X
> 2) If IP address X found, replace it with Y
> 3) Increment serial number for this record
There are some things you didn't mention. Most imporantly, how will you
change the zonefiles? Through editing of the files on disk? If your zones
handle dynamic updates (for example, through the nsupdate command) I would
have scripted something.
Personally, I'd probably write a Perl script using the Net::DNS module to
AXFR a zone, look for the records that need updating and then do dynamic
updates to update it. One advantage to this approach is that you won't have
to update the serial number - the dynamic update process will take care of
that.
--
Regards / Hilsen
Eivind Olsen
<eivind at aminor.no>
More information about the bind-users
mailing list