[Pdns-users] Announce ruby-pdns 0.3

R.I.Pienaar rip at devco.net
Mon Aug 10 20:00:37 UTC 2009


I've written a simple little framework to write pipebackend based dynamic records using Ruby.

A sample:

module Pdns
  newrecord("www.your.net") do |query, answer|
    case country(query[:remoteip])
      when "US", "CA"
        answer.content "64.xx.xx.245"

      when "ZA", "ZW"
        answer.content "196.xx.xx.10"

        answer.content "78.xx.xx.140"

You would simply drop this into a file in a directory and it would get served, this is all you need to worry about, if you want to upgrade your record with new logic, just replace the file, no more.

Of course pdns has its own geo module but this is a good sample of a potential use case, the idea is to allow you do anything you can conceive using the Ruby language.

Please visit http://code.google.com/p/ruby-pdns/ for more information, downloads and use case samples.

Thanks, all feedback appreciated!


More information about the Pdns-users mailing list