Is there a good ruby DNS server library?
I want to create a test DNS server in ruby but didn't find anything suitable. I found pnet-dns ( http://rubyforge.org/projects/pnet-dns/ ). This project is incomplete and flawed. Is there any alternative?
a source to share
An alternative language agnostic is to use the PowerDNS backend . Since it communicates with the name server through a simple pipe, it can be written in any language, including Ruby. (The simple example in the documentation uses Perl, but needs to be easily translated.)
a source to share
Checkout another DNS server approach in ruby with celluloid: https://github.com/celluloid/celluloid-dns
The original celluloid-dns
is horribly incomplete (v0.0.1). RubyDNS has recently been copied to celluloid-dns
(I am doing this as we speak). RubyDNS will be modified to work with the updated celluloid-dns
as all core functionality will be moved from RubyDNS to celluloid-dns
.
If you want something that works right now, use RubyDNS. However, in the future, if you just want a low-level API, use celluloid-dns
.
a source to share
Have you watched Dnsruby ?
It aims to be fully RFC compliant, although it focuses primarily on the client side. However, you can write your own server - use Dnsruby::Message#decode
the RRSets zone to decode incoming packets, where your test records are stored. Then you can code your packets to send back to the client.