dnslookup is a DNS record query CLI gem written in Ruby. dnslookup automatically queries multiple public DNS servers or allows you to query a specific DNS server.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install dnslookup
Lookup DNS records:
$ dnslookup <domain name> [options]
--mx will return only MX records.
--aname will return only A name records.
--cname will return only C name records.
--txt will return only TXT records.
--server=IP will query specific name server IP.
--help will output this help in your shell.
Help with usage and options:
$ dnslookup -h
Bug reports and pull requests are welcome on GitHub. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.