Skip to content
Ruby PowerDNS Development Framework
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
etc
pdns
records
COPYING
README
Rakefile
pdns-pipe-runner.rb
pdns.rb
ruby-pdns.spec

README

Ruby PDNS Pipe Backend

This is a framework for hosting specific records using Power DNS, you can code the logic
for these records in ruby, the framework takes care of the hard work like hosting your
code and speaking to PDNS.

A sample record code would be, this is all you would need to do to host foo.your.net in
PDNS and do GeoIP look ups and respond correctly

module Pdns
   newrecord("foo.your.net", :type => :record) do |query, answer|
       answer.qtype :A
       answer.ttl 600
   
       case country(query[:remoteip])
           when "DE"
               answer.content "1.2.3.4"
           else
               answer.content "4.3.2.1"
               answer.content "1.2.3.4"
               answer.content [:TXT, "Some TXT record for this response"]
       end
   end
end  

The code is hosted on Google Code at http://code.google.com/p/ruby-pdns/ find more information
there
Something went wrong with that request. Please try again.