Global change of ip
Kevin Darcy
kcd at chrysler.com
Fri Oct 31 22:33:54 UTC 2008
Scott Haneda wrote:
> I have an A record change that needs to happen across many zones. I
> have the old ipand of course the new ip. Can someone help me with a
> command to find and replace across multiple files please.
>
> I also will need to do a serial update as well, and that could be any
> number and not cinsistant.
>
> I am using unix not windows.
>
>
Editing zonefiles safely, and updating serial numbers, is a pain in the
butt. That's why I migrated towards using Dynamic Update exclusively for
all updates. You could put a loop around
zone $ZONE.
prereq yxrrset foo.$ZONE. a 1.2.3.4
update delete foo.$ZONE. a
update foo.$ZONE. 10800 a 5.6.7.8
send
and be done with it. Note that the prereq is optional, and its only
purpose is to get a meaningful error code if there is a bug or
malfunction in the higher-level logic, or a concurrency issue (i.e.
someone else changing the record at the same time).
The Net::DNS module of Perl has more scriptable Dynamic Update
capabilities, and can even sign the updates with a TSIG key.
- Kevin
More information about the bind-users
mailing list