Skip to content

Instantly share code, notes, and snippets.

@cschritt
Created March 8, 2015 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cschritt/4f8e45b39067b3d95a58 to your computer and use it in GitHub Desktop.
Save cschritt/4f8e45b39067b3d95a58 to your computer and use it in GitHub Desktop.
dnsruby signed update
require 'dnsruby'
res = Dnsruby::Resolver.new("myserver.local")
tsig = Dnsruby::RR.create({ :name => "mykey", :type => "TSIG", :key => "secretKey==", })
update = Dnsruby::Update.new("mydomain.local")
update.add("update-test.mydomain.local", "A", 86400, "10.20.20.100")
tsig.apply(update)
response = res.send_message(update)
@cschritt
Copy link
Author

cschritt commented Mar 8, 2015

The result is always

Dnsruby::Refused: Dnsruby::Refused
from /usr/local/rvm/gems/ruby-2.2.1/gems/dnsruby-1.57.0/lib/dnsruby/resolver.rb:248:in send_message' from (irb):8 from /usr/local/rvm/rubies/ruby-2.2.1/bin/irb:11:in

'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment