termios.3: Clarify zero argument for cfsetispeed()
[man-pages.git] / man5 / host.conf.5
blobfb9398e77f7b59a95e301d4748c03e50854f8178
1 .\" Copyright (c) 1997 Martin Schulze (joey@infodrom.north.de)
2 .\" Much of the text is copied from the manpage of resolv+(8).
3 .\"
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.
9 .\"
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.
14 .\"
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.
19 .\"
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/>.
23 .\" %%%LICENSE_END
24 .\"
25 .\" 2003-08-23 Martin Schulze <joey@infodrom.org> Updated according to glibc 2.3.2
26 .TH HOST.CONF 5 2019-03-06 "Linux" "Linux System Administration"
27 .SH NAME
28 host.conf \- resolver configuration file
29 .SH DESCRIPTION
30 The file
31 .I /etc/host.conf
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:
36 .TP
37 .I trim
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.
42 When set, the
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:
48 .I trim
49 will not affect hostnames gathered via NIS or the
50 .BR hosts (5)
51 file.
52 Care should be taken to
53 ensure that the first hostname for each entry in the hosts file is
54 fully qualified or unqualified, as appropriate for the local
55 installation.)
56 .TP
57 .I multi
58 Valid values are
59 .IR on " and " off .
60 If set to
61 .IR on ,
62 the resolver library will return all valid addresses for a host that
63 appears in the
64 .I /etc/hosts
65 file,
66 instead of only the first.
67 This is
68 .I off
69 by default, as it may cause a substantial performance loss at sites
70 with large hosts files.
71 .TP
72 .I reorder
73 Valid values are
74 .IR on " and " off .
75 If set to
76 .IR on ,
77 the resolver library
78 will attempt to reorder host addresses so that local addresses
79 (i.e., on the same subnet) are listed first when a
80 .BR gethostbyname (3)
81 is performed.
82 Reordering is done for all lookup methods.
83 The default value is
84 .IR off .
85 .SH ENVIRONMENT
86 The following environment variables can be used to allow users to
87 override the behavior which is configured in
88 .IR /etc/host.conf :
89 .TP
90 .B RESOLV_HOST_CONF
91 If set, this variable points to a file that should be read instead of
92 .IR /etc/host.conf .
93 .TP
94 .B RESOLV_MULTI
95 Overrides the
96 .I multi
97 command.
98 .TP
99 .B RESOLV_REORDER
100 Overrides the
101 .I reorder
102 command.
104 .B RESOLV_ADD_TRIM_DOMAINS
105 A list of domains,  separated by colons (\(aq:\(aq), semicolons (\(aq;\(aq), or
106 commas (\(aq,\(aq), with the leading dot, which will be added to the list of
107 domains that should be trimmed.
109 .B RESOLV_OVERRIDE_TRIM_DOMAINS
110 A list of domains,  separated by colons (\(aq:\(aq), semicolons (\(aq;\(aq), or
111 commas (\(aq,\(aq), with the leading dot, which will replace the list of
112 domains that should be trimmed.
113 Overrides the
114 .I trim
115 command.
116 .SH FILES
118 .I /etc/host.conf
119 Resolver configuration file
121 .I /etc/resolv.conf
122 Resolver configuration file
124 .I /etc/hosts
125 Local hosts database
126 .SH NOTES
127 The following differences exist compared to the original implementation.
128 A new command
129 .I spoof
130 and a new environment variable
131 .B RESOLV_SPOOF_CHECK
132 can take arguments like
133 .IR off ", " nowarn ", and " warn .
134 Line comments can appear anywhere and not only at the beginning of a line.
135 .SS Historical
137 .BR nsswitch.conf (5)
138 file is the modern way of controlling the order of host lookups.
140 In glibc 2.4 and earlier, the following keyword is recognized:
142 .I order
143 This keyword specifies how host lookups are to be performed.
144 It should be followed by one or more lookup methods, separated by commas.
145 Valid methods are
146 .IR bind ", " hosts ", and " nis .
148 .B RESOLV_SERV_ORDER
149 Overrides the
150 .I order
151 command.
153 .\" commit 7d68cdaa4f748e87ee921f587ee2d483db624b3d
154 Since glibc 2.0.7, and up through glibc 2.24, the following keywords and environment variable have
155 been recognized but never implemented:
157 .I nospoof
158 Valid values are
159 .IR on " and " off .
160 If set to
161 .IR on ,
162 the resolver library will attempt to prevent hostname spoofing to
163 enhance the security of
164 .BR rlogin " and " rsh .
165 It works as follows: after performing a host address lookup,
166 the resolver library will perform a hostname lookup for that address.
167 If the two hostnames
168 do not match, the query fails.
169 The default value is
170 .IR off .
172 .I spoofalert
173 Valid values are
174 .IR on " and " off .
175 If this option is set to
176 .I on
177 and the
178 .I nospoof
179 option is also set,
180 the resolver library will log a warning of the error via the
181 syslog facility.
182 The default value is
183 .IR off .
185 .I spoof
186 Valid values are
187 .IR off ", " nowarn ", and " warn .
188 If this option is set to
189 .IR off ,
190 spoofed addresses are permitted and no warnings will be emitted
191 via the syslog facility.
192 If this option is set to
193 .IR warn ,
194 the resolver library will attempt to prevent hostname spoofing to
195 enhance the security and log a warning of the error via the syslog
196 facility.
197 If this option is set to
198 .IR nowarn ,
199 the resolver library will attempt to prevent hostname spoofing to
200 enhance the security but not emit warnings via the syslog facility.
201 Setting this option to anything else is equal to setting it to
202 .IR nowarn .
204 .B RESOLV_SPOOF_CHECK
205 Overrides the
206 .IR nospoof ", " spoofalert ", and " spoof
207 commands in the same way as the
208 .I spoof
209 command is parsed.
210 Valid values are
211 .IR off ", " nowarn ", and " warn .
212 .SH SEE ALSO
213 .BR gethostbyname (3),
214 .BR hosts (5),
215 .BR nsswitch.conf (5),
216 .BR resolv.conf (5),
217 .BR hostname (7),
218 .BR named (8)