Like `host`, but uses multiple DNS servers for massively parallel queries, and compares results.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.ci Fix 4 for new cargo publish deployment Sep 28, 2017
distribution/deb Add man page to Debian packaging Oct 23, 2017
docs Small, but incomplete docs update Mar 8, 2018
src
tests Add SRV RR support Nov 1, 2017
.appveyor.yml Require rust stable only Sep 28, 2017
.gitignore Add IntelliJ to gitignore Sep 19, 2017
.travis.yml Fix 2 for new cargo publish deployment Sep 28, 2017
CHANGELOG.md
Cargo.lock Bump to version v0.0.7 Nov 1, 2017
Cargo.toml Bump to version v0.0.7 Nov 1, 2017
LICENSE Init Sep 18, 2017
Makefile
README.md

README.md

mhost

mhost is a not so simple utility for performing DNS lookups. It is designed to use multiple DNS servers in parallel and combine their answers. In this way, it is easy to troubleshot DNS issues or even spot DNS server misconfigurations.

mhost comes with a predefined set of public DNS servers and can load DNS servers from the ungefiltert-surfen.de project, which maintains large lists of public DNS servers per country. By default mhost uses all local DNS servers listed in /etc/resolv.conf.

mhost's output is colorized if supported by the terminal and can be controlled by several output modules. Currently, the default is a summary of all received responses. It also runs certain checks on the data, e.g. it compares the serial numbers of SOA records. A detailed output shows the answers from all responding servers. These two output modules also support a human-friendly output with times and durations shown as relative times, as well as semantic output of certain resource records. Further, JSON output allows for easy automatic processing of the answers from scripts etc.

mhost uses UDP as the transport protocol. Since UDP is an unreliable protocol, DNS queries and DNS responses may get lost. The likelihood for losses increases with the number of servers used, so it is not uncommon to get way less responses than DNS servers queried. Keep this in mind when querying many DNS servers, for example, when using ungefiltert-surfen.de lists.

For details on mhost's functionality and how to use it, please see the man page.

Table of Contents

Changelog

Please see the CHANGELOG for a release history.

Why should I use mhost?

  • JSON output

Use Cases

Use Operating System's Default Resolver and Google's public DNS servers

mhost -s 8.8.8.8 -s 8.8.4.4 github.com

Use 100 DNS German Servers from ungefiltert-surfen

mhost -u de github.com

Output JSON for post-processing

mhost -u de -o json github.com

Installation

Ubuntu [x86_64 and Raspberry Pi]

Please add my PackageCloud open source repository and install mhost via apt.

curl -s https://packagecloud.io/install/repositories/lukaspustina/opensource/script.deb.sh | sudo bash
sudo apt-get install mhost

Linux Binaries [x86_64 and Raspberry Pi]

There are binaries available at the GitHub release page. The binaries get compiled on Ubuntu.

Windows Binaries [x86_64 and i686]

There are binaries available at the GitHub release page.

macOS

Please use Homebrew to install mhost on your system.

brew install lukaspustina/os/mhost

Sources

Please install Rust via rustup and then run

git clone https://github.com/lukaspustina/mhost
cd mhost
cargo build

Postcardware

You're free to use mhost. If you find it useful, I would highly appreciate you sending me a postcard from your hometown mentioning how you use mhost. My work address is

Lukas Pustina
CenterDevice GmbH
Rheinwerkallee 3
53227 Bonn
Germany

Thanks

Thanks to Benjamin Fry for his literally wonderful TRust-DNS server and the corresponding client library which does all the heavy lifting of mhost.