1 .\" Copyright (c) 1997 Martin Schulze (joey@infodrom.north.de)
2 .\" Much of the text is copied from the manpage of resolv+(8).
4 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .\" 2003-08-23 Martin Schulze <joey@infodrom.org> Updated according to glibc 2.3.2
7 .TH host.conf 5 (date) "Linux man-pages (unreleased)"
9 host.conf \- resolver configuration file
13 contains configuration information specific to the resolver library.
14 It should contain one configuration keyword per line, followed by
15 appropriate configuration information.
16 The following keywords are recognized:
19 This keyword may be listed more than once.
20 Each time it should be
21 followed by a list of domains, separated by colons (\[aq]:\[aq]), semicolons
22 (\[aq];\[aq]) or commas (\[aq],\[aq]), with the leading dot.
24 resolver library will automatically trim the given domain name from the
25 end of any hostname resolved via DNS.
26 This is intended for use with
27 local hosts and domains.
30 will not affect hostnames gathered via NIS or the
33 Care should be taken to
34 ensure that the first hostname for each entry in the hosts file is
35 fully qualified or unqualified, as appropriate for the local
43 the resolver library will return all valid addresses for a host that
47 instead of only the first.
50 by default, as it may cause a substantial performance loss at sites
51 with large hosts files.
59 will attempt to reorder host addresses so that local addresses
60 (i.e., on the same subnet) are listed first when a
63 Reordering is done for all lookup methods.
67 The following environment variables can be used to allow users to
68 override the behavior which is configured in
72 If set, this variable points to a file that should be read instead of
85 .B RESOLV_ADD_TRIM_DOMAINS
88 colons (\[aq]:\[aq]), semicolons (\[aq];\[aq]), or commas (\[aq],\[aq]),
90 which will be added to the list of domains that should be trimmed.
92 .B RESOLV_OVERRIDE_TRIM_DOMAINS
95 colons (\[aq]:\[aq]), semicolons (\[aq];\[aq]), or commas (\[aq],\[aq]),
97 which will replace the list of domains that should be trimmed.
104 Resolver configuration file
107 Resolver configuration file
112 The following differences exist compared to the original implementation.
115 and a new environment variable
116 .B RESOLV_SPOOF_CHECK
117 can take arguments like
118 .IR off ", " nowarn ", and " warn .
119 Line comments can appear anywhere and not only at the beginning of a line.
122 .BR nsswitch.conf (5)
123 file is the modern way of controlling the order of host lookups.
125 In glibc 2.4 and earlier, the following keyword is recognized:
128 This keyword specifies how host lookups are to be performed.
129 It should be followed by one or more lookup methods, separated by commas.
131 .IR bind ", " hosts ", and " nis .
138 .\" commit 7d68cdaa4f748e87ee921f587ee2d483db624b3d
139 Since glibc 2.0.7, and up through glibc 2.24,
140 the following keywords and environment variable
141 have been recognized but never implemented:
148 the resolver library will attempt to prevent hostname spoofing to
149 enhance the security of
150 .BR rlogin " and " rsh .
151 It works as follows: after performing a host address lookup,
152 the resolver library will perform a hostname lookup for that address.
154 do not match, the query fails.
161 If this option is set to
166 the resolver library will log a warning of the error via the
173 .IR off ", " nowarn ", and " warn .
174 If this option is set to
176 spoofed addresses are permitted and no warnings will be emitted
177 via the syslog facility.
178 If this option is set to
180 the resolver library will attempt to prevent hostname spoofing to
181 enhance the security and log a warning of the error via the syslog
183 If this option is set to
185 the resolver library will attempt to prevent hostname spoofing to
186 enhance the security but not emit warnings via the syslog facility.
187 Setting this option to anything else is equal to setting it to
190 .B RESOLV_SPOOF_CHECK
192 .IR nospoof ", " spoofalert ", and " spoof
193 commands in the same way as the
197 .IR off ", " nowarn ", and " warn .
199 .BR gethostbyname (3),
201 .BR nsswitch.conf (5),