Skip to content

Instantly share code, notes, and snippets.

@sionide21
Created March 3, 2011 13:37
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 sionide21/852771 to your computer and use it in GitHub Desktop.
Save sionide21/852771 to your computer and use it in GitHub Desktop.
DNS Sample
require 'dns'
server = DNS::Server.new
server.handle_a do |query, response|
response << DNS::Record::A.new(query.name, "192.168.12.10#{rand 10}")
end
server.listen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment