On Tue, Aug 8, 2017 at 12:32 PM, Peter Humphrey <pe...@prh.myzen.co.uk> wrote:
> On Tuesday 08 Aug 2017 09:11:22 Mike Gilbert wrote:
>> The "order" directive in /etc/host.conf only works for very old
>> versions of glibc. Modern versions use /etc/nsswitch.conf. The default
>> nsswitch.conf will check /etc/hosts (files) before DNS anyway.
>> How are you testing? I would guess you are probably using the wrong tool.
> nslookup -sil
>> The "host" command will always ignore /etc/hosts. It always does DNS
>> queries by design.
>> Try using "getent hosts [hostname]".
> Yes, that works. Thanks Mike. I'll set up a nice short alias for it. Looks
> like I can get rid of net-dns/bind-tools.

bind-tools is quite useful for performing advanced DNS queries. The
'dig' command is especially useful if you want to see the full rrset
being returned. It also lets you set various flags on the DNS request,
and manually override the DNS server.

For casual usage, bind-tools is probably unnecessary.

Reply via email to