1HOST.CONF(5) Linux System Administration HOST.CONF(5)
2
3
4
6 host.conf - resolver configuration file
7
9 The file /etc/host.conf contains configuration information specific to
10 the resolver library. It should contain one configuration keyword per
11 line, followed by appropriate configuration information. The keywords
12 recognized are order, trim, multi, nospoof, spoof, and reorder. These
13 keywords are described below.
14
15 order This keyword specifies how host lookups are to be performed. It
16 should be followed by one or more lookup methods, separated by
17 commas. Valid methods are bind, hosts, and nis.
18
19 trim This keyword may be listed more than once. Each time it should
20 be followed by a list of domains, separated by colons (':'),
21 semicolons (';') or commas (','), with the leading dot. When
22 set, the resolv+ library will automatically trim the given
23 domain name from the end of any hostname resolved via DNS. This
24 is intended for use with local hosts and domains. (Related
25 note: trim will not affect hostnames gathered via NIS or the
26 hosts file. Care should be taken to ensure that the first host‐
27 name for each entry in the hosts file is fully qualified or
28 unqualified, as appropriate for the local installation.)
29
30 multi Valid values are on and off. If set to on, the resolv+ library
31 will return all valid addresses for a host that appears in the
32 /etc/hosts file, instead of only the first. This is off by
33 default, as it may cause a substantial performance loss at sites
34 with large hosts files.
35
36 nospoof
37 Valid values are on and off. If set to on, the resolv+ library
38 will attempt to prevent hostname spoofing to enhance the secu‐
39 rity of rlogin and rsh. It works as follows: after performing a
40 host address lookup, resolv+ will perform a hostname lookup for
41 that address. If the two hostnames do not match, the query will
42 fail. The default value is off.
43
44 spoofalert
45 Valid values are on and off. If this option is set to on and
46 the nospoof option is also set, resolv+ will log a warning of
47 the error via the syslog facility. The default value is off.
48
49 spoof Valid values are off, nowarn and warn. If this option is set to
50 off, spoofed addresses are permitted and no warnings will be
51 emitted via the syslog facility. If this option is set to warn,
52 resolv+ will attempt to prevent hostname spoofing to enhance the
53 security and log a warning of the error via the syslog facility.
54 If this option is set to nowarn, the resolv+ library will
55 attempt to prevent hostname spoofing to enhance the security but
56 not emit warnings via the syslog facility. Setting this option
57 to anything else is equal to setting it to nowarn.
58
59 reorder
60 Valid values are on and off. If set to on, resolv+ will attempt
61 to reorder host addresses so that local addresses (i.e., on the
62 same subnet) are listed first when a gethostbyname(3) is per‐
63 formed. Reordering is done for all lookup methods. The default
64 value is off.
65
67 There are six environment variables that can be used to allow users to
68 override the behavior which is configured in /etc/host.conf.
69
70 RESOLV_HOST_CONF
71 If set this variable points to a file that should be read
72 instead of /etc/host.conf.
73
74 RESOLV_SERV_ORDER
75 Overrides the order command.
76
77 RESOLV_SPOOF_CHECK
78 Overrides the nospoof, spoofalert and spoof commands in the same
79 way as the spoof command is parsed. Valid values are off,
80 nowarn and warn.
81
82 RESOLV_MULTI
83 Overrides the multi command.
84
85 RESOLV_REORDER
86 Overrides the reorder command.
87
88 RESOLV_ADD_TRIM_DOMAINS
89 A list of domains, separated by colons (':'), semicolons (';')
90 or commas (','), with the leading dot, which will be added to
91 the list of domains that should be trimmed.
92
93 RESOLV_OVERRIDE_TRIM_DOMAINS
94 A list of domains, separated by colons (':'), semicolons (';')
95 or commas (','), with the leading dot, which will replace the
96 list of domains that should be trimmed. Overrides the trim com‐
97 mand.
98
100 /etc/host.conf
101 Resolver configuration file
102
103 /etc/resolv.conf
104 Resolver configuration file
105
106 /etc/hosts
107 Local hosts database
108
110 The following differences exist compared to the original implementa‐
111 tion. A new command spoof and a new environment variable
112 RESOLV_SPOOF_CHECK can take arguments like off, nowarn and warn. Line
113 comments can appear anywhere and not only at the beginning of a line.
114
116 gethostbyname(3), hostname(7), named(8), resolv+[22m(8)
117
119 This page is part of release 3.25 of the Linux man-pages project. A
120 description of the project, and information about reporting bugs, can
121 be found at http://www.kernel.org/doc/man-pages/.
122
123
124
125Linux 2003-08-23 HOST.CONF(5)