Zone transfer changing the zone name

Michael Kjorling michael at kjorling.com
Tue Feb 19 18:04:34 UTC 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

How would you define a script? Is a sequence of UNIX commands a
script?

You could of course do something on the order of (which can be given
all at once quite easily using the ; as a command separator):

dig zonename @server soa +norec > tmp
dig zonename @server axfr 2>&1 | egrep -vi '(soa|serial|retry|expiry|minimum)$' >> tmp
named-checkzone zonename tmp && ( mv tmp zonefile ; rndc reload zonename )

NOTE: This is untested, but you get the idea. Always try it manually
before applying it to a production box.


Michael Kjörling


On Feb 19 2002 13:51 -0000, Diego Balgera wrote:

> Hi Barry and all the others,
> your suggestion is interesting but there is a small draback. When you export
> a dns zone with dig, the SOA record is replicated twice (see the example
> below). This confuses the bind a little bit.
> Do you know how to remove the duplicated SOA record without writing scripts?
> Thank you in advance. Diego.
>
> @                       1S IN SOA       bohrdns3.tb.opi1.it.
> root.bohrdns3.tb.opi1.it. ( 2002021419      ; serial
>                                         8H              ; refresh
>                                         2H              ; retry
>                                         1W              ; expiry
>                                         1S )            ; minimum
>                         1S IN NS        bohrdns1.tb.opi1.it.
>                         1S IN NS        bohrdns2.tb.opi1.it.
>                         1S IN NS        bohrdns3.tb.opi1.it.
> rac000c.lac8214         1h6m40s IN A    10.10.10.12
> rac00d2.lac9c40         1h6m40s IN A    10.20.10.101
> @                       1S IN SOA       bohrdns3.tb.opi1.it.
> root.bohrdns3.tb.opi1.it. ( 2002021419      ; serial
>                                         8H              ; refresh
>                                         2H              ; retry
>                                         1W              ; expiry
>                                         1S )            ; minimum
>
> ;; Received 7 answers (7 records).
> ;; FROM: bohrdns2 to SERVER: 10.20.10.12
> ;; WHEN: Tue Feb 19 15:22:41 2002

- -- 
Michael Kjörling  --  Programmer/Network administrator  ^..^
Internet: michael at kjorling.com -- FidoNet: 2:204/254.4   \/
PGP: 95f1 074d 336d f8f0 f297 6a5b 2aa3 7bfd 8a70 e33e

``And indeed people sometimes speak of man's "bestial" cruelty, but
this is very unfair and insulting to the beasts: a beast can never be
so cruel as a man, so ingeniously, so artistically cruel.''
(Ivan Karamazov, in Dostoyevsky's 'The Brothers Karamazov')

*** Thinking about sending me spam? Take a close look at
*** http://michael.kjorling.com/spam/ before doing so.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Public key is at http://michael.kjorling.com/contact/pgp.html

iD8DBQE8cpO2KqN7/Ypw4z4RAqlaAKCxSG2DKCdlMm/lF+/goChQ7rEE0ACdEw/i
wIE/4IS5bknUa1JZZtr3e6U=
=6J5q
-----END PGP SIGNATURE-----




More information about the bind-users mailing list