1 |
On Tue, Aug 8, 2017 at 12:32 PM, Peter Humphrey <peter@××××××××××××.uk> wrote: |
2 |
> On Tuesday 08 Aug 2017 09:11:22 Mike Gilbert wrote: |
3 |
> |
4 |
>> The "order" directive in /etc/host.conf only works for very old |
5 |
>> versions of glibc. Modern versions use /etc/nsswitch.conf. The default |
6 |
>> nsswitch.conf will check /etc/hosts (files) before DNS anyway. |
7 |
>> |
8 |
>> How are you testing? I would guess you are probably using the wrong tool. |
9 |
> |
10 |
> nslookup -sil |
11 |
> |
12 |
>> The "host" command will always ignore /etc/hosts. It always does DNS |
13 |
>> queries by design. |
14 |
>> |
15 |
>> Try using "getent hosts [hostname]". |
16 |
> |
17 |
> Yes, that works. Thanks Mike. I'll set up a nice short alias for it. Looks |
18 |
> like I can get rid of net-dns/bind-tools. |
19 |
|
20 |
bind-tools is quite useful for performing advanced DNS queries. The |
21 |
'dig' command is especially useful if you want to see the full rrset |
22 |
being returned. It also lets you set various flags on the DNS request, |
23 |
and manually override the DNS server. |
24 |
|
25 |
For casual usage, bind-tools is probably unnecessary. |