Integrations

The file “/etc/resolv.conf” can contain a search” parameter, which specifies a list of domain names that should be appended to the end of each query being resolved.

dog will detect if this option is set, and will automatically send out queries using the domains in search list.

Hosts file warning v0.2.0+

On Unix systems, the file “/etc/hosts” contains a user-overridable mapping of host names to IP addresses, which the OS will prefer to use instead of making a DNS request when it needs to resolve a host by its name.

DNS clients like dog intentionally ignore this file, as it is intended to make general DNS queries rather than trying to mimic the behaviour of the OS it is running on. However, it can be confusing to find dog returning one IP address in its results, only to see the OS using a completely different IP address.

To help with this case, dog will display a warning if it detects an entry for the host name you are looking up in the hosts file, even though it will still make the query and display the results as it otherwise would.

For example, if you have a host called “banana” defined in your hosts file, and you try to resolve its IP address using dog, you will receive the standard SOA record for when a host name does not exist, along with a warning that you may be looking for answers in the wrong place.

$ dog banana
warning: domain 'banana.' also exists in hosts file
Status: NXDomain
SOA  1h00m00s A "a.root-servers.net." "nstld.verisign-grs.com." 2020041702 30m00s 15m00s 7d0h00m00s 1d0h00m00s