]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man5/host.conf.5
getent.1, _syscall.2, acct.2, adjtimex.2, bdflush.2, brk.2, cacheflush.2, getsid...
[thirdparty/man-pages.git] / man5 / host.conf.5
1 .\" Copyright (c) 1997 Martin Schulze (joey@infodrom.north.de)
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_doc_full)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, see
21 .\" <http://www.gnu.org/licenses/>.
22 .\" %%%LICENSE_END
23 .\"
24 .\" Much of the text is copied from the manpage of resolv+(8).
25 .\"
26 .\" 2003-08-23 Martin Schulze <joey@infodrom.org> Updated according to glibc 2.3.2
27 .TH HOST.CONF 5 2003-08-23 "Linux" "Linux System Administration"
28 .SH NAME
29 host.conf \- resolver configuration file
30 .SH DESCRIPTION
31 The file
32 .I /etc/host.conf
33 contains configuration information specific to the resolver library.
34 It should contain one configuration keyword per line, followed by
35 appropriate configuration information.
36 The keywords recognized are
37 .IR order ", " trim ", " multi ", " nospoof ", " spoof ", and " reorder .
38 These keywords are described below.
39 .TP
40 .I order
41 This keyword specifies how host lookups are to be performed.
42 It should be followed by one or more lookup methods, separated by commas.
43 Valid methods are
44 .IR bind ", " hosts ", and " nis .
45 .TP
46 .I trim
47 This keyword may be listed more than once.
48 Each time it should be
49 followed by a list of domains, separated by colons (\(aq:\(aq), semicolons
50 (\(aq;\(aq) or commas (\(aq,\(aq), with the leading dot.
51 When set, the
52 resolv+ library will automatically trim the given domain name from the
53 end of any hostname resolved via DNS.
54 This is intended for use with
55 local hosts and domains.
56 (Related note: trim will not affect hostnames
57 gathered via NIS or the hosts file.
58 Care should be taken to
59 ensure that the first hostname for each entry in the hosts file is
60 fully qualified or unqualified, as appropriate for the local
61 installation.)
62 .TP
63 .I multi
64 Valid values are
65 .IR on " and " off .
66 If set to
67 .IR on ,
68 the resolv+ library will return all valid addresses for a host that
69 appears in the
70 .I /etc/hosts
71 file,
72 instead of only the first.
73 This is
74 .I off
75 by default, as it may cause a substantial performance loss at sites
76 with large hosts files.
77 .TP
78 .I nospoof
79 Valid values are
80 .IR on " and " off .
81 If set to
82 .IR on ,
83 the resolv+ library will attempt to prevent hostname spoofing to
84 enhance the security of
85 .BR rlogin " and " rsh .
86 It works as follows: after performing a host address lookup, resolv+
87 will perform a hostname lookup for that address.
88 If the two hostnames
89 do not match, the query will fail.
90 The default value is
91 .IR off .
92 .TP
93 .I spoofalert
94 Valid values are
95 .IR on " and " off .
96 If this option is set to
97 .I on
98 and the
99 .I nospoof
100 option is also set, resolv+ will log a warning of the error via the
101 syslog facility.
102 The default value is
103 .IR off .
104 .TP
105 .I spoof
106 Valid values are
107 .IR off ", " nowarn " and " warn .
108 If this option is set to
109 .IR off ,
110 spoofed addresses are permitted and no warnings will be emitted
111 via the syslog facility.
112 If this option is set to
113 .IR warn ,
114 resolv+ will attempt to prevent hostname spoofing to
115 enhance the security and log a warning of the error via the syslog
116 facility.
117 If this option is set to
118 .IR nowarn ,
119 the resolv+ library will attempt to prevent hostname spoofing to
120 enhance the security but not emit warnings via the syslog facility.
121 Setting this option to anything else is equal to setting it to
122 .IR nowarn .
123 .TP
124 .I reorder
125 Valid values are
126 .IR on " and " off .
127 If set to
128 .IR on ,
129 resolv+ will attempt to reorder host addresses so that local addresses
130 (i.e., on the same subnet) are listed first when a
131 .BR gethostbyname (3)
132 is performed.
133 Reordering is done for all lookup methods.
134 The default value is
135 .IR off .
136 .SH ENVIRONMENT
137 There are six environment variables that can be used to allow users to
138 override the behavior which is configured in
139 .IR /etc/host.conf .
140 .TP
141 .B RESOLV_HOST_CONF
142 If set this variable points to a file that should be read instead of
143 .IR /etc/host.conf .
144 .TP
145 .B RESOLV_SERV_ORDER
146 Overrides the
147 .I order
148 command.
149 .TP
150 .B RESOLV_SPOOF_CHECK
151 Overrides the
152 .IR nospoof ", " spoofalert " and " spoof
153 commands in the same way as the
154 .I spoof
155 command is parsed.
156 Valid values are
157 .IR off ", " nowarn " and " warn .
158 .TP
159 .B RESOLV_MULTI
160 Overrides the
161 .I multi
162 command.
163 .TP
164 .B RESOLV_REORDER
165 Overrides the
166 .I reorder
167 command.
168 .TP
169 .B RESOLV_ADD_TRIM_DOMAINS
170 A list of domains, separated by colons (\(aq:\(aq), semicolons (\(aq;\(aq) or
171 commas (\(aq,\(aq), with the leading dot, which will be added to the list of
172 domains that should be trimmed.
173 .TP
174 .B RESOLV_OVERRIDE_TRIM_DOMAINS
175 A list of domains, separated by colons (\(aq:\(aq), semicolons (\(aq;\(aq) or
176 commas (\(aq,\(aq), with the leading dot, which will replace the list of
177 domains that should be trimmed.
178 Overrides the
179 .I trim
180 command.
181 .SH FILES
182 .TP
183 .I /etc/host.conf
184 Resolver configuration file
185 .TP
186 .I /etc/resolv.conf
187 Resolver configuration file
188 .TP
189 .I /etc/hosts
190 Local hosts database
191 .SH NOTES
192 The following differences exist compared to the original implementation.
193 A new command
194 .I spoof
195 and a new environment variable
196 .B RESOLV_SPOOF_CHECK
197 can take arguments like
198 .IR off ", " nowarn " and " warn .
199 Line comments can appear anywhere and not only at the beginning of a line.
200 .SH SEE ALSO
201 .BR gethostbyname (3),
202 .BR hostname (7),
203 .BR named (8),
204 .BR resolv+ (8)