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
- Why should I use mhost?
- Use Cases
Please see the CHANGELOG for a release history.
Why should I use mhost?
- JSON output
Use Operating System's Default Resolver and Google's public DNS servers
mhost -s 184.108.40.206 -s 220.127.116.11 github.com
mhost -u de github.com
Output JSON for post-processing
mhost -u de -o json github.com
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.
Please use Homebrew to install
mhost on your system.
brew install lukaspustina/os/mhost
Please install Rust via rustup and then run
git clone https://github.com/lukaspustina/mhost cd mhost cargo build
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