1 |
On Tuesday 08 Aug 2017 09:11:22 Mike Gilbert wrote: |
2 |
|
3 |
> The "order" directive in /etc/host.conf only works for very old |
4 |
> versions of glibc. Modern versions use /etc/nsswitch.conf. The default |
5 |
> nsswitch.conf will check /etc/hosts (files) before DNS anyway. |
6 |
> |
7 |
> How are you testing? I would guess you are probably using the wrong tool. |
8 |
|
9 |
nslookup -sil |
10 |
|
11 |
> The "host" command will always ignore /etc/hosts. It always does DNS |
12 |
> queries by design. |
13 |
> |
14 |
> Try using "getent hosts [hostname]". |
15 |
|
16 |
Yes, that works. Thanks Mike. I'll set up a nice short alias for it. Looks |
17 |
like I can get rid of net-dns/bind-tools. |
18 |
|
19 |
-- |
20 |
Regards |
21 |
Peter |