<p>In that case how about other entries from same zone? I m talking about any consequences on static entries or the ones which I dont want to me dynamic. </p>
<div class="gmail_quote">On 23 Jul 2013 16:45, "Kumar, Naveen, Vodafone Group" <<a href="mailto:naveen.kumar32@vodafone.com">naveen.kumar32@vodafone.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
    <br>
    <br>
    <div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Manish,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">You can configure the zone as dynamic, this way it can start taking nsupdates,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Upon failed TCP monitor by nagios, it can fire nsupdate command and update the A record accordingly.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Naveen<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> bind-users-bounces+naveen.kumar=<a href="mailto:cw.com@lists.isc.org" target="_blank">cw.com@lists.isc.org</a> [mailto:<a href="mailto:bind-users-bounces%2Bnaveen.kumar" target="_blank">bind-users-bounces+naveen.kumar</a>=<a href="mailto:cw.com@lists.isc.org" target="_blank">cw.com@lists.isc.org</a>] <b>On Behalf Of </b>Manish Rane<br>
<b>Sent:</b> Tuesday, July 23, 2013 4:30 PM<br><b>To:</b> Mark Andrews<br><b>Cc:</b> <a href="mailto:bind-users@isc.org" target="_blank">bind-users@isc.org</a><br><b>Subject:</b> Re: Can I change the zone file from command line?<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p><div><div><div><div><div><p class="MsoNormal">Well, I am trying to configure DNS System Monitoring stuff with Nagios plugins. This monitor the server status and if any of th link fails remove the said IP from zone and reload the zone. This entry would have low TTL so that traffic would be routed to new entry instantly.<br>
<br>Lets say I have two ISPs terminated on my firewall and <a href="http://www.example.com" target="_blank">www.example.com</a> with private IP 172.16.3.10 is natted with 1.2.3.4 and 5.6.7.8 with TTL value 300<u></u><u></u></p>
</div><p class="MsoNormal" style="margin-bottom:12.0pt">Nagios plugin check_tcp would monitor those links or IPs on port 80 and if any of the link fails I can have by any mean edit the zone file and remove the IP associated with failed link so that traffic would never reach to that IP.<u></u><u></u></p>
</div><p class="MsoNormal" style="margin-bottom:12.0pt">Upon recovery the plugin will show the result GREEN and I can again have the A record added in zone file, thus reload the zone. Due to the low TTL I believe there shouldn't be any issue for populating those changes faster.  <u></u><u></u></p>
</div><p class="MsoNormal" style="margin-bottom:12.0pt">What say guys?<br><br><u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><br clear="all"><u></u><u></u></p><div><p class="MsoNormal">
--------------------------------------------------------------------------<br>Thanks and Regards,<br>Manish R<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p><div><p class="MsoNormal">
On Tue, Jul 23, 2013 at 11:46 AM, Mark Andrews <<a href="mailto:marka@isc.org" target="_blank">marka@isc.org</a>> wrote:<u></u><u></u></p><p class="MsoNormal"><br>In message <<a href="mailto:CAN3um4yrT%2Bt7Cp2EZYWq-rM5eWx3-ygOK9VKxVUG4qbxcbpzcA@mail.gmail.com" target="_blank">CAN3um4yrT+t7Cp2EZYWq-rM5eWx3-ygOK9VKxVUG4qbxcbpzcA@mail.gmail.com</a>><u></u><u></u></p>
<div><p class="MsoNormal" style="margin-bottom:12.0pt">, Mike Hale writes:<br>> This seems pretty straight forward.<br>><br>> Use your standard bash tools to modify the file when necessary, then<br>> you should simply be able to call rndc reload ZONENAME in the script.<u></u><u></u></p>
</div><p class="MsoNormal">Though why one would want to do this rather than just updating the<br>zone using DDNS is beyond me.   It's not like DDNS can't be made<br>secure by using TSIG.<br><br>Normalize the zone file using named-checkzone.<br>
Use awk or similar to change the relevent entries and update the SOA serial.<br>Use named-checkzone to confirm that the resulting file is still valid then<br>if it is rename it and reload the zone.<br><br>named-checkzone -D -q zone file |<br>
awk '$1 == "server" && $4 == "A" { print $1, $2, $3, $4, NEWIP}<br>$4 == "SOA" { $7 = $7 + 1; print }' > temp<br>named-checkzone -q zone temp && mv temp file && rndc reload zone<br>
<br>Mark<u></u><u></u></p><div><div><p class="MsoNormal"><br>> On Mon, Jul 22, 2013 at 10:28 PM, Mihamina Rakotomandimby<br>> <<a href="mailto:mihamina@rktmb.org" target="_blank">mihamina@rktmb.org</a>> wrote:<br>
> > Hello,<br>> ><br>> > I did not catch what you're trying to achieve.<br>> > Please give more details.<br>> ><br>> ><br>> > On 2013-07-23 08:25, Manish Rane wrote:<br>> ><br>
> > Hi Folks,<br>> ><br>> > Wondering if I can edit/change the static zone file as a result of certain<br>> > bash script. Well, I am trying to write a script which will monitor the<br>> > server on certain ports and it if fails to connect to the server it will<br>
> > delete or add the entry from zone file so that traffic will be routed to<br>> > another server, possible?<br>> ><br>> > OR does any one aware of such solution available in open source?<br>> ><br>
> ><br>> ><br>> > _______________________________________________<br>> > Please visit <a href="https://lists.isc.org/mailman/listinfo/bind-users" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a> to<br>
> > unsubscribe from this list<br>> ><br>> > bind-users mailing list<br>> > <a href="mailto:bind-users@lists.isc.org" target="_blank">bind-users@lists.isc.org</a><br>> > <a href="https://lists.isc.org/mailman/listinfo/bind-users" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a><br>
> ><br>> ><br>> ><br>> > --<br>> > RMA.<br>> ><br>> ><br>> > _______________________________________________<br>> > Please visit <a href="https://lists.isc.org/mailman/listinfo/bind-users" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a> to<br>
> > unsubscribe from this list<br>> ><br>> > bind-users mailing list<br>> > <a href="mailto:bind-users@lists.isc.org" target="_blank">bind-users@lists.isc.org</a><br>> > <a href="https://lists.isc.org/mailman/listinfo/bind-users" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a><br>
><br>><br>><br>> --<br>> 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0<br>> _______________________________________________<br>> Please visit <a href="https://lists.isc.org/mailman/listinfo/bind-users" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a> to unsubscribe<br>
>  from this list<br>><br>> bind-users mailing list<br>> <a href="mailto:bind-users@lists.isc.org" target="_blank">bind-users@lists.isc.org</a><br>> <a href="https://lists.isc.org/mailman/listinfo/bind-users" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a><u></u><u></u></p>
</div></div><p class="MsoNormal"><span><span style="color:#888888">--</span></span><span style="color:#888888"><br><span>Mark Andrews, ISC</span><br><span>1 Seymour St., Dundas Valley, NSW 2117, Australia</span><br><span>PHONE: +61 2 9871 4742                 INTERNET: <a href="mailto:marka@isc.org" target="_blank">marka@isc.org</a></span></span><u></u><u></u></p>
<div><div><p class="MsoNormal">_______________________________________________<br>Please visit <a href="https://lists.isc.org/mailman/listinfo/bind-users" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a> to unsubscribe from this list<br>
<br>bind-users mailing list<br><a href="mailto:bind-users@lists.isc.org" target="_blank">bind-users@lists.isc.org</a><br><a href="https://lists.isc.org/mailman/listinfo/bind-users" target="_blank">https://lists.isc.org/mailman/listinfo/bind-users</a><u></u><u></u></p>
</div></div></div><p class="MsoNormal"><u></u> <u></u></p></div></div>
    <br>
    <br>
   <hr>
   <font face="arial">
Vodafone Group Services Limited, One Kingdom Street, Paddington Central, London W2 6BY.
<br>
<br>
<a href="http://www.vodafone.com" target="_blank">www.vodafone.com</a>
<br>
<br>
This message and any files or documents attached are confidential and may also be legally privileged, protected from
disclosure and/or protected by other legal rules. It is intended only for the individual or entity named. If you are not the named 
addressee or you have received this email in error, please inform the sender immediately, delete it from your system and do not 
copy or disclose it or its contents or use it for any purpose. Thank you. Please also note that transmission cannot be 
guaranteed to be secure or error-free.   
</font>
   <hr>

    
</div></blockquote></div>