Reversed
š Reverse DNS / IP Lookup for Ruby
Reversed.lookup("8.8.4.4")
# "dns.google"
Works with IPv4 and IPv6
Reversed.lookup("2a03:2880:2110:df07:face:b00c::1")
# "a.ns.facebook.com"
Installation
Add this line to your applicationās Gemfile:
gem "reversed"
Reference
Set timeout
Reversed.lookup(ip, timeout: 3)
Set nameservers
Reversed.lookup(ip, nameservers: ["1.1.1.1"])
Disable SOA fallback (only check PTR record)
Reversed.lookup(ip, fallback: false)
History
View the changelog
Contributing
Everyone is encouraged to help improve this project. Here are a few ways you can help:
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features
To get started with development:
git clone https://github.com/ankane/reversed.git
cd reversed
bundle install
bundle exec rake test