Usage Examples
mhost
has three main verbs: lookup
, discover
, check
. Each verb can be abbreviated to shorter forms as long as they remain unambiguous, e.g., l
for lookup
, d
for discover
, and c
for check
.
#
Just lookup an IP addressIn this run, all default settings are applied. Especially, most
uses only the local system’s name servers and queries only the default record types.
#
Just lookup an IP address, using more than just your local name serversSee, there’re more answers than before!
-p
add public name servers that mhost
predefines for your convenience. By default, only the UDP is used to contact the predefined name servers. You can control this behaviour using --predefined-filter
and filter for UDP, TCP, DoT, DoH. --list-predefined
show all available predefined name servers.
#
Just lookup an IP address, using even more than just your local name serversSee, there’re even more answers than before!
The first command downloads a list of public available name servers that are maintained by the Public DNS community. Usually only a subset of these are reachable, but it still a large set of active name servers.
The second command uses the name servers list from before and queries all of them concurrently. These settings are very aggressive and highly stresses your internet connection. mhost
default settings are set much more cautiously.
#
Just lookup an IP address, using UDP, TCP, DoT, and DoHAs already mentioned before, mhost
supports DNS queries over UDP, TCP, DNS over TLS (DoT), as well as DNS over HTTPS (DoH). In the above example, mhost
uses all four protocols to query Cloudflare’s name servers.
This command also shows the syntax for name server specification, which in general is protocol:<host name | ip address>:port,tls_auth_name=hostname,name=human-readable-name
.
#
Discover a domainSometimes you want to know which host names and subdomains a domain has. mhost
offers a simple command to help you find these. Please mind, that mhost
only uses DNS specific discovery methods. If you want even deeper discoveries using Google, Shodan etc. there are other tools available.
This command uses the predefined name servers to discover the GitHub domain. The -s
reduces all discovered names to real subdomains of github.com.
.
You can go one more step and explore the autonomous systems GitHub uses. In order to discover those, you can use the following commands: