]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man5/host.conf.5
host.conf.5: Rework discussion of nospoof, spoofalert, spoof and RESOLV_SPOOF_CHECK
[thirdparty/man-pages.git] / man5 / host.conf.5
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 2015-02-21 "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 resolv+ 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
52 installation.)
53 .TP
54 .I multi
55 Valid values are
56 .IR on " and " off .
57 If set to
58 .IR on ,
59 the resolv+ library will return all valid addresses for a host that
60 appears in the
61 .I /etc/hosts
62 file,
63 instead of only the first.
64 This is
65 .I off
66 by default, as it may cause a substantial performance loss at sites
67 with large hosts files.
68 .TP
69 .I reorder
70 Valid values are
71 .IR on " and " off .
72 If set to
73 .IR on ,
74 resolv+ will attempt to reorder host addresses so that local addresses
75 (i.e., on the same subnet) are listed first when a
76 .BR gethostbyname (3)
77 is performed.
78 Reordering is done for all lookup methods.
79 The default value is
80 .IR off .
81 .SH ENVIRONMENT
82 The following environment variables can be used to allow users to
83 override the behavior which is configured in
84 .IR /etc/host.conf :
85 .TP
86 .B RESOLV_HOST_CONF
87 If set, this variable points to a file that should be read instead of
88 .IR /etc/host.conf .
89 .TP
90 .B RESOLV_MULTI
91 Overrides the
92 .I multi
93 command.
94 .TP
95 .B RESOLV_REORDER
96 Overrides the
97 .I reorder
98 command.
99 .TP
100 .B RESOLV_ADD_TRIM_DOMAINS
101 A list of domains, separated by colons (\(aq:\(aq), semicolons (\(aq;\(aq) or
102 commas (\(aq,\(aq), with the leading dot, which will be added to the list of
103 domains that should be trimmed.
104 .TP
105 .B RESOLV_OVERRIDE_TRIM_DOMAINS
106 A list of domains, separated by colons (\(aq:\(aq), semicolons (\(aq;\(aq) or
107 commas (\(aq,\(aq), with the leading dot, which will replace the list of
108 domains that should be trimmed.
109 Overrides the
110 .I trim
111 command.
112 .SH FILES
113 .TP
114 .I /etc/host.conf
115 Resolver configuration file
116 .TP
117 .I /etc/resolv.conf
118 Resolver configuration file
119 .TP
120 .I /etc/hosts
121 Local hosts database
122 .SH NOTES
123 The following differences exist compared to the original implementation.
124 A new command
125 .I spoof
126 and a new environment variable
127 .B RESOLV_SPOOF_CHECK
128 can take arguments like
129 .IR off ", " nowarn " and " warn .
130 Line comments can appear anywhere and not only at the beginning of a line.
131 .SS Historical
132 The
133 .BR nsswitch.conf (5)
134 file is the modern way of controlling the order of host lookups.
135 .PP
136 In glibc 2.4 and earlier, the following keyword is recognized:
137 .TP
138 .I order
139 This keyword specifies how host lookups are to be performed.
140 It should be followed by one or more lookup methods, separated by commas.
141 Valid methods are
142 .IR bind ", " hosts ", and " nis .
143 .TP
144 .B RESOLV_SERV_ORDER
145 Overrides the order command.
146 .PP
147 Since glibc 2.0.7, the following keywords and environment variable have
148 been recognized but never implemented:
149 .TP
150 .I nospoof
151 Valid values are
152 .IR on " and " off .
153 If set to
154 .IR on ,
155 the resolv+ library will attempt to prevent hostname spoofing to
156 enhance the security of
157 .BR rlogin " and " rsh .
158 It works as follows: after performing a host address lookup, resolv+
159 will perform a hostname lookup for that address.
160 If the two hostnames
161 do not match, the query will fail.
162 The default value is
163 .IR off .
164 .TP
165 .I spoofalert
166 Valid values are
167 .IR on " and " off .
168 If this option is set to
169 .I on
170 and the
171 .I nospoof
172 option is also set, resolv+ will log a warning of the error via the
173 syslog facility.
174 The default value is
175 .IR off .
176 .TP
177 .I spoof
178 Valid values are
179 .IR off ", " nowarn " and " warn .
180 If this option is set to
181 .IR off ,
182 spoofed addresses are permitted and no warnings will be emitted
183 via the syslog facility.
184 If this option is set to
185 .IR warn ,
186 resolv+ will attempt to prevent hostname spoofing to
187 enhance the security and log a warning of the error via the syslog
188 facility.
189 If this option is set to
190 .IR nowarn ,
191 the resolv+ library will attempt to prevent hostname spoofing to
192 enhance the security but not emit warnings via the syslog facility.
193 Setting this option to anything else is equal to setting it to
194 .IR nowarn .
195 .TP
196 .B RESOLV_SPOOF_CHECK
197 Overrides the
198 .IR nospoof ", " spoofalert " and " spoof
199 commands in the same way as the
200 .I spoof
201 command is parsed.
202 Valid values are
203 .IR off ", " nowarn " and " warn .
204 .SH SEE ALSO
205 .BR gethostbyname (3),
206 .BR hosts (5),
207 .BR nsswitch.conf (5),
208 .BR resolv.conf (5),
209 .BR hostname (7),
210 .BR named (8)