Christophe Casalegno

Bind : how to modify serial number of all your dns zone with sed

You can simply use the sed command to do this :

Go on your dns zone directory and :

<em>sed -i -e "s/2[0-9]\{9\}/yourserialnumber/g" path_to_your_dns_zone_files/*.hosts</em>

Example :

<em>sed -i -e "s/2[0-9]\{9\}/2012011901/g" /var/lib/named/var/named/master/*.hosts</em>

That’s done, you can just restart bind :)

 


Christophe Casalegno
http://twitter.com/Brain0verride
http://www.facebook.com/brain.override

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *