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?

+1


a source to share


4 answers


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.)



+3


a source


RubyDNS is what you are looking for.



+3


a source


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

.

+2


a source


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.

0


a source







All Articles