1 .\" Copyright (c) 1997 Martin Schulze (joey@infodrom.north.de)
2 .\" Much of the text is copied from the manpage of resolv+(8).
4 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 .\" GNU General Public License for more details.
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, see
22 .\" <http://www.gnu.org/licenses/>.
25 .\" 2003-08-23 Martin Schulze <joey@infodrom.org> Updated according to glibc 2.3.2
26 .TH HOST.CONF 5 2015-07-23 "Linux" "Linux System Administration"
28 host.conf \- resolver configuration file
32 contains configuration information specific to the resolver library.
33 It should contain one configuration keyword per line, followed by
34 appropriate configuration information.
35 The following keywords are recognized:
38 This keyword may be listed more than once.
39 Each time it should be
40 followed by a list of domains, separated by colons (\(aq:\(aq), semicolons
41 (\(aq;\(aq) or commas (\(aq,\(aq), with the leading dot.
43 resolver library will automatically trim the given domain name from the
44 end of any hostname resolved via DNS.
45 This is intended for use with
46 local hosts and domains.
47 (Related note: trim will not affect hostnames
48 gathered via NIS or the hosts file.
49 Care should be taken to
50 ensure that the first hostname for each entry in the hosts file is
51 fully qualified or unqualified, as appropriate for the local
59 the resolver library will return all valid addresses for a host that
63 instead of only the first.
66 by default, as it may cause a substantial performance loss at sites
67 with large hosts files.
75 will attempt to reorder host addresses so that local addresses
76 (i.e., on the same subnet) are listed first when a
79 Reordering is done for all lookup methods.
83 The following environment variables can be used to allow users to
84 override the behavior which is configured in
88 If set, this variable points to a file that should be read instead of
101 .B RESOLV_ADD_TRIM_DOMAINS
102 A list of domains, separated by colons (\(aq:\(aq), semicolons (\(aq;\(aq) or
103 commas (\(aq,\(aq), with the leading dot, which will be added to the list of
104 domains that should be trimmed.
106 .B RESOLV_OVERRIDE_TRIM_DOMAINS
107 A list of domains, separated by colons (\(aq:\(aq), semicolons (\(aq;\(aq) or
108 commas (\(aq,\(aq), with the leading dot, which will replace the list of
109 domains that should be trimmed.
116 Resolver configuration file
119 Resolver configuration file
124 The following differences exist compared to the original implementation.
127 and a new environment variable
128 .B RESOLV_SPOOF_CHECK
129 can take arguments like
130 .IR off ", " nowarn " and " warn .
131 Line comments can appear anywhere and not only at the beginning of a line.
134 .BR nsswitch.conf (5)
135 file is the modern way of controlling the order of host lookups.
137 In glibc 2.4 and earlier, the following keyword is recognized:
140 This keyword specifies how host lookups are to be performed.
141 It should be followed by one or more lookup methods, separated by commas.
143 .IR bind ", " hosts ", and " nis .
146 Overrides the order command.
148 Since glibc 2.0.7, the following keywords and environment variable have
149 been recognized but never implemented:
156 the resolver library will attempt to prevent hostname spoofing to
157 enhance the security of
158 .BR rlogin " and " rsh .
159 It works as follows: after performing a host address lookup,
160 the resolver library will perform a hostname lookup for that address.
162 do not match, the query will fail.
169 If this option is set to
174 the resolver library will log a warning of the error via the
181 .IR off ", " nowarn ", and " warn .
182 If this option is set to
184 spoofed addresses are permitted and no warnings will be emitted
185 via the syslog facility.
186 If this option is set to
188 the resolver library will attempt to prevent hostname spoofing to
189 enhance the security and log a warning of the error via the syslog
191 If this option is set to
193 the resolver library will attempt to prevent hostname spoofing to
194 enhance the security but not emit warnings via the syslog facility.
195 Setting this option to anything else is equal to setting it to
198 .B RESOLV_SPOOF_CHECK
200 .IR nospoof ", " spoofalert, " and " spoof
201 commands in the same way as the
205 .IR off ", " nowarn, " and " warn .
207 .BR gethostbyname (3),
209 .BR nsswitch.conf (5),