1HOST.CONF(5)              Linux System Administration             HOST.CONF(5)
2
3
4

NAME

6       host.conf - resolver configuration file
7

DESCRIPTION

9       The  file /etc/host.conf contains configuration information specific to
10       the resolver library.  It should contain one configuration keyword  per
11       line, followed by appropriate configuration information.  The following
12       keywords are recognized:
13
14       trim   This keyword may be listed more than once.  Each time it  should
15              be  followed  by  a  list of domains, separated by colons (':'),
16              semicolons (';') or commas (','), with the  leading  dot.   When
17              set,  the  resolver  library  will  automatically trim the given
18              domain name from the end of any hostname resolved via DNS.  This
19              is  intended  for  use  with  local hosts and domains.  (Related
20              note: trim will not affect hostnames gathered  via  NIS  or  the
21              hosts(5)  file.   Care  should be taken to ensure that the first
22              hostname for each entry in the hosts file is fully qualified  or
23              unqualified, as appropriate for the local installation.)
24
25       multi  Valid values are on and off.  If set to on, the resolver library
26              will return all valid addresses for a host that appears  in  the
27              /etc/hosts  file,  instead  of  only  the  first.  This is on by
28              default.  On systems with DNS, hosts files are much smaller  and
29              the  performance loss of multiple search is negligible. On sites
30              with large hosts files, turning it on may  cause  a  substantial
31              performance loss.
32
33       reorder
34              Valid values are on and off.  If set to on, the resolver library
35              will attempt to reorder host addresses so that  local  addresses
36              (i.e.,  on  the  same subnet) are listed first when a gethostby‐
37              name(3) is performed.  Reordering is done for all  lookup  meth‐
38              ods.  The default value is off.
39

ENVIRONMENT

41       The following environment variables can be used to allow users to over‐
42       ride the behavior which is configured in /etc/host.conf:
43
44       RESOLV_HOST_CONF
45              If set, this variable points to  a  file  that  should  be  read
46              instead of /etc/host.conf.
47
48       RESOLV_MULTI
49              Overrides the multi command.
50
51       RESOLV_REORDER
52              Overrides the reorder command.
53
54       RESOLV_ADD_TRIM_DOMAINS
55              A  list of domains,  separated by colons (':'), semicolons (';')
56              or commas (','), with the leading dot, which will  be  added  to
57              the list of domains that should be trimmed.
58
59       RESOLV_OVERRIDE_TRIM_DOMAINS
60              A  list of domains,  separated by colons (':'), semicolons (';')
61              or commas (','), with the leading dot, which  will  replace  the
62              list of domains that should be trimmed.  Overrides the trim com‐
63              mand.
64

FILES

66       /etc/host.conf
67              Resolver configuration file
68
69       /etc/resolv.conf
70              Resolver configuration file
71
72       /etc/hosts
73              Local hosts database
74

NOTES

76       The following differences exist compared to  the  original  implementa‐
77       tion.    A   new   command   spoof   and  a  new  environment  variable
78       RESOLV_SPOOF_CHECK can take arguments like off,