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 keywords
12       recognized are trim, multi, nospoof, spoof, and  reorder.   These  key‐
13       words are described below.
14
15       trim   This  keyword may be listed more than once.  Each time it should
16              be followed by a list of domains,  separated  by  colons  (':'),
17              semicolons  (';')  or  commas (','), with the leading dot.  When
18              set, the resolv+  library  will  automatically  trim  the  given
19              domain name from the end of any hostname resolved via DNS.  This
20              is intended for use with  local  hosts  and  domains.   (Related
21              note:  trim  will  not  affect hostnames gathered via NIS or the
22              hosts file.  Care should be taken to ensure that the first host‐
23              name  for  each  entry  in  the hosts file is fully qualified or
24              unqualified, as appropriate for the local installation.)
25
26       multi  Valid values are on and off.  If set to on, the resolv+  library
27              will  return  all valid addresses for a host that appears in the
28              /etc/hosts file, instead of only the  first.   This  is  off  by
29              default, as it may cause a substantial performance loss at sites
30              with large hosts files.
31
32       nospoof
33              Valid values are on and off.  If set to on, the resolv+  library
34              will  attempt  to prevent hostname spoofing to enhance the secu‐
35              rity of rlogin and rsh.  It works as follows: after performing a
36              host  address lookup, resolv+ will perform a hostname lookup for
37              that address.  If the two hostnames do not match, the query will
38              fail.  The default value is off.
39
40       spoofalert
41              Valid  values  are  on and off.  If this option is set to on and
42              the nospoof option is also set, resolv+ will log  a  warning  of
43              the error via the syslog facility.  The default value is off.
44
45       spoof  Valid values are off, nowarn and warn.  If this option is set to
46              off, spoofed addresses are permitted and  no  warnings  will  be
47              emitted via the syslog facility.  If this option is set to warn,
48              resolv+ will attempt to prevent hostname spoofing to enhance the
49              security and log a warning of the error via the syslog facility.
50              If this option is  set  to  nowarn,  the  resolv+  library  will
51              attempt to prevent hostname spoofing to enhance the security but
52              not emit warnings via the syslog facility.  Setting this  option
53              to anything else is equal to setting it to nowarn.
54
55       reorder
56              Valid values are on and off.  If set to on, resolv+ will attempt
57              to reorder host addresses so that local addresses (i.e., on  the
58              same  subnet)  are  listed first when a gethostbyname(3) is per‐
59              formed.  Reordering is done for all lookup methods.  The default
60              value is off.
61

ENVIRONMENT

63       There  are six environment variables that can be used to allow users to
64       override the behavior which is configured in /etc/host.conf.
65
66       RESOLV_HOST_CONF
67              If set this variable points  to  a  file  that  should  be  read
68              instead of /etc/host.conf.
69
70       RESOLV_SPOOF_CHECK
71              Overrides the nospoof, spoofalert and spoof commands in the same
72              way as the spoof command  is  parsed.   Valid  values  are  off,
73              nowarn and warn.
74
75       RESOLV_MULTI
76              Overrides the multi command.
77
78       RESOLV_REORDER
79              Overrides the reorder command.
80
81       RESOLV_ADD_TRIM_DOMAINS
82              A  list of domains,  separated by colons (':'), semicolons (';')
83              or commas (','), with the leading dot, which will  be  added  to
84              the list of domains that should be trimmed.
85
86       RESOLV_OVERRIDE_TRIM_DOMAINS
87              A  list of domains,  separated by colons (':'), semicolons (';')
88              or commas (','), with the leading dot, which  will  replace  the
89              list of domains that should be trimmed.  Overrides the trim com‐
90              mand.
91

FILES

93       /etc/host.conf
94              Resolver configuration file
95
96       /etc/resolv.conf
97              Resolver configuration file
98
99       /etc/hosts
100              Local hosts database
101

NOTES

103       The following differences exist compared to  the  original  implementa‐
104       tion.    A   new   command   spoof   and  a  new  environment  variable
105       RESOLV_SPOOF_CHECK can take arguments like off, nowarn and warn.   Line
106       comments can appear anywhere and not only at the beginning of a line.
107

SEE ALSO

109       gethostbyname(3), hostname(7), named(8), resolv+(8)
110

COLOPHON

112       This  page  is  part of release 3.53 of the Linux man-pages project.  A
113       description of the project, and information about reporting  bugs,  can
114       be found at http://www.kernel.org/doc/man-pages/.
115
116
117
118Linux                             2003-08-23                      HOST.CONF(5)
Impressum