On Tue, Mar 15, 2011 at 12:36 PM,  <span dir="ltr">&lt;<a href="mailto:bertagaz@ptitcanardnoir.org">bertagaz@ptitcanardnoir.org</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br><div class="im">
&gt; I&#39;ve implemented a dynamic DNS service, on top of powerdns and redis.  It&#39;s<br>
&gt; part of the infrastructure behind <a href="http://pagekite.net" target="_blank">pagekite.net</a>.  I wouldn&#39;t mind sharing<br>
&gt; that code, I am sure some peer review would do it good. :-)<br>
</div><br>Nice, sure I&#39;d like to see/test that. I&#39;m not a lot in redis and all, but<br>
might be usefull in the futur.<br></blockquote><div><br>OK.  Putting my code where my mouth is:<br><br>  <a href="https://github.com/pagekite/PyPdnsRedis">https://github.com/pagekite/PyPdnsRedis</a><br><br>This code can do three things:<br>
<br>   1. Function as a PowerDNS pipe-backend, pulling data from Redis.<br>   2. Function as a command-line tool, for adding to or removing records from Redis.<br>   3. Function as a Python library, for doing the same through code.<br>
<br>PowerDNS takes care of speaking the DNS protocol, and Redis takes care of replication (so no need for zone transfers etc.)<br><br>I&#39;m sorry I haven&#39;t included the dynamic DNS update CGI itself, but it is pretty intricately tied to how I handle <a href="http://pagekite.net">pagekite.net</a> user accounts and passwords etc.  Honestly, thats about all it does - parse the CGI arguments, check if the credentials match and then use the library above to update DNS.<br>
<br>Please let me know if you find any use for this - or any bugs! :-)<br><br>It&#39;s kinda fun to sub-class PdnsChatter and wrap/rewrite the Lookup function - that&#39;s a really easy way to generate programmatic replies to DNS lookups, as opposed to plain just static database lookups.  The only magic it supports today is if you set an IP address to &#39;self&#39;, the DNS server will respond with its own IP address, whatever that happens to be.<br>
<br>Have fun!<br><br></div></div>-- <br>Bjarni R. Einarsson<br>The Beanstalks Project ehf.<br><br>Making personal web-pages fly: <a href="http://pagekite.net/" target="_blank">http://pagekite.net/</a><br>