OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / 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 2003-08-23 "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 keywords recognized are
36 .IR order ", " trim ", " multi ", " nospoof ", " spoof ", and " reorder .
37 These keywords are described below.
38 .TP
39 .I order
40 This keyword specifies how host lookups are to be performed.
41 It should be followed by one or more lookup methods, separated by commas.
42 Valid methods are
43 .IR bind ", " hosts ", and " nis .
44 .TP
45 .I trim
46 This keyword may be listed more than once.
47 Each time it should be
48 followed by a list of domains, separated by colons (\(aq:\(aq), semicolons
49 (\(aq;\(aq) or commas (\(aq,\(aq), with the leading dot.
50 When set, the
51 resolv+ library will automatically trim the given domain name from the
52 end of any hostname resolved via DNS.
53 This is intended for use with
54 local hosts and domains.
55 (Related note: trim will not affect hostnames
56 gathered via NIS or the hosts file.
57 Care should be taken to
58 ensure that the first hostname for each entry in the hosts file is
59 fully qualified or unqualified, as appropriate for the local
60 installation.)
61 .TP
62 .I multi
63 Valid values are
64 .IR on " and " off .
65 If set to
66 .IR on ,
67 the resolv+ library will return all valid addresses for a host that
68 appears in the
69 .I /etc/hosts
70 file,
71 instead of only the first.
72 This is
73 .I off
74 by default, as it may cause a substantial performance loss at sites
75 with large hosts files.
76 .TP
77 .I nospoof
78 Valid values are
79 .IR on " and " off .
80 If set to
81 .IR on ,
82 the resolv+ library will attempt to prevent hostname spoofing to
83 enhance the security of
84 .BR rlogin " and " rsh .
85 It works as follows: after performing a host address lookup, resolv+
86 will perform a hostname lookup for that address.
87 If the two hostnames
88 do not match, the query will fail.
89 The default value is
90 .IR off .
91 .TP
92 .I spoofalert
93 Valid values are
94 .IR on " and " off .
95 If this option is set to
96 .I on
97 and the
98 .I nospoof
99 option is also set, resolv+ will log a warning of the error via the
100 syslog facility.
101 The default value is
102 .IR off .
103 .TP
104 .I spoof
105 Valid values are
106 .IR off ", " nowarn " and " warn .
107 If this option is set to
108 .IR off ,
109 spoofed addresses are permitted and no warnings will be emitted
110 via the syslog facility.
111 If this option is set to
112 .IR warn ,
113 resolv+ will attempt to prevent hostname spoofing to
114 enhance the security and log a warning of the error via the syslog
115 facility.
116 If this option is set to
117 .IR nowarn ,
118 the resolv+ library will attempt to prevent hostname spoofing to
119 enhance the security but not emit warnings via the syslog facility.
120 Setting this option to anything else is equal to setting it to
121 .IR nowarn .
122 .TP
123 .I reorder
124 Valid values are
125 .IR on " and " off .
126 If set to
127 .IR on ,
128 resolv+ will attempt to reorder host addresses so that local addresses
129 (i.e., on the same subnet) are listed first when a
130 .BR gethostbyname (3)
131 is performed.
132 Reordering is done for all lookup methods.
133 The default value is
134 .IR off .
135 .SH ENVIRONMENT
136 There are six environment variables that can be used to allow users to
137 override the behavior which is configured in
138 .IR /etc/host.conf .
139 .TP
140 .B RESOLV_HOST_CONF
141 If set, this variable points to a file that should be read instead of
142 .IR /etc/host.conf .
143 .TP
144 .B RESOLV_SERV_ORDER
145 Overrides the
146 .I order
147 command.
148 .TP
149 .B RESOLV_SPOOF_CHECK
150 Overrides the
151 .IR nospoof ", " spoofalert " and " spoof
152 commands in the same way as the
153 .I spoof
154 command is parsed.
155 Valid values are
156 .IR off ", " nowarn " and " warn .
157 .TP
158 .B RESOLV_MULTI
159 Overrides the
160 .I multi
161 command.
162 .TP
163 .B RESOLV_REORDER
164 Overrides the
165 .I reorder
166 command.
167 .TP
168 .B RESOLV_ADD_TRIM_DOMAINS
169 A list of domains,  separated by colons (\(aq:\(aq), semicolons (\(aq;\(aq) or
170 commas (\(aq,\(aq), with the leading dot, which will be added to the list of
171 domains that should be trimmed.
172 .TP
173 .B RESOLV_OVERRIDE_TRIM_DOMAINS
174 A list of domains,  separated by colons (\(aq:\(aq), semicolons (\(aq;\(aq) or
175 commas (\(aq,\(aq), with the leading dot, which will replace the list of
176 domains that should be trimmed.
177 Overrides the
178 .I trim
179 command.
180 .SH FILES
181 .TP
182 .I /etc/host.conf
183 Resolver configuration file
184 .TP
185 .I /etc/resolv.conf
186 Resolver configuration file
187 .TP
188 .I /etc/hosts
189 Local hosts database
190 .SH NOTES
191 The following differences exist compared to the original implementation.
192 A new command
193 .I spoof
194 and a new environment variable
195 .B RESOLV_SPOOF_CHECK
196 can take arguments like
197 .IR off ", " nowarn " and " warn .
198 Line comments can appear anywhere and not only at the beginning of a line.
199 .SH SEE ALSO
200 .BR gethostbyname (3),
201 .BR hostname (7),
202 .BR named (8),
203 .BR resolv+ (8)
204 .SH COLOPHON
205 This page is part of release 3.79 of the Linux
206 .I man-pages
207 project.
208 A description of the project,
209 information about reporting bugs,
210 and the latest version of this page,
211 can be found at
212 \%http://www.kernel.org/doc/man\-pages/.