{"id":4382,"date":"2022-12-20T17:49:07","date_gmt":"2022-12-20T20:49:07","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/host-conf-man5\/"},"modified":"2022-12-20T17:49:07","modified_gmt":"2022-12-20T20:49:07","slug":"host-conf-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/host-conf-man5\/","title":{"rendered":"HOST.CONF (man5)"},"content":{"rendered":"<h1 align=\"center\">HOST.CONF<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#ENVIRONMENT\">ENVIRONMENT<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COLOPHON\">COLOPHON<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">host.conf \u2212 resolver configuration file<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The file <i>\/etc\/host.conf<\/i> contains configuration information specific to the resolver library. It should contain one configuration keyword per line, followed by appropriate configuration information. The following keywords are recognized:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"7%\">\n<p><i>trim<\/i><\/p>\n<\/td>\n<td width=\"4%\"><\/td>\n<td width=\"78%\">\n<p>This keyword may be listed more than once. Each time it should be followed by a list of domains, separated by colons (&#8216;:&#8217;), semicolons (&#8216;;&#8217;) or commas (&#8216;,&#8217;), with the leading dot. When set, the resolver library will automatically trim the given domain name from the end of any hostname resolved via DNS. This is intended for use with local hosts and domains. (Related note: <i>trim<\/i> will not affect hostnames gathered via NIS or the <b>hosts<\/b>(5) file. Care should be taken to ensure that the first hostname for each entry in the hosts file is fully qualified or unqualified, as appropriate for the local installation.)<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"7%\">\n<p><i>multi<\/i><\/p>\n<\/td>\n<td width=\"4%\"><\/td>\n<td width=\"78%\">\n<p>Valid values are <i>on<\/i> and <i>off<\/i>. If set to <i>on<\/i>, the resolver library will return all valid addresses for a host that appears in the <i>\/etc\/hosts<\/i> file, instead of only the first. This is <i>off<\/i> by default, as it may cause a substantial performance loss at sites with large hosts files.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><i>reorder<\/i><\/p>\n<p style=\"margin-left:22%;\">Valid values are <i>on<\/i> and <i>off<\/i>. If set to <i>on<\/i>, the resolver library will attempt to reorder host addresses so that local addresses (i.e., on the same subnet) are listed first when a <b>gethostbyname<\/b>(3) is performed. Reordering is done for all lookup methods. The default value is <i>off<\/i>.<\/p>\n<h2>ENVIRONMENT <a name=\"ENVIRONMENT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The following environment variables can be used to allow users to override the behavior which is configured in <i>\/etc\/host.conf<\/i>: <b><br \/> RESOLV_HOST_CONF<\/b><\/p>\n<p style=\"margin-left:22%;\">If set, this variable points to a file that should be read instead of <i>\/etc\/host.conf<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><b>RESOLV_MULTI<\/b><\/p>\n<p style=\"margin-left:22%;\">Overrides the <i>multi<\/i> command.<\/p>\n<p style=\"margin-left:11%;\"><b>RESOLV_REORDER<\/b><\/p>\n<p style=\"margin-left:22%;\">Overrides the <i>reorder<\/i> command.<\/p>\n<p style=\"margin-left:11%;\"><b>RESOLV_ADD_TRIM_DOMAINS<\/b><\/p>\n<p style=\"margin-left:22%;\">A list of domains, separated by colons (&#8216;:&#8217;), semicolons (&#8216;;&#8217;) or commas (&#8216;,&#8217;), with the leading dot, which will be added to the list of domains that should be trimmed.<\/p>\n<p style=\"margin-left:11%;\"><b>RESOLV_OVERRIDE_TRIM_DOMAINS<\/b><\/p>\n<p style=\"margin-left:22%;\">A list of domains, separated by colons (&#8216;:&#8217;), semicolons (&#8216;;&#8217;) or commas (&#8216;,&#8217;), with the leading dot, which will replace the list of domains that should be trimmed. Overrides the <i>trim<\/i> command.<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>\/etc\/host.conf<\/i><\/p>\n<p style=\"margin-left:22%;\">Resolver configuration file<\/p>\n<p style=\"margin-left:11%;\"><i>\/etc\/resolv.conf<\/i><\/p>\n<p style=\"margin-left:22%;\">Resolver configuration file<\/p>\n<p style=\"margin-left:11%;\"><i>\/etc\/hosts<\/i><\/p>\n<p style=\"margin-left:22%;\">Local hosts database<\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The following differences exist compared to the original implementation. A new command <i>spoof<\/i> and a new environment variable <b>RESOLV_SPOOF_CHECK<\/b> can take arguments like <i>off<\/i>, <i>nowarn<\/i>, and <i>warn<\/i>. Line comments can appear anywhere and not only at the beginning of a line.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Historical<\/b> <br \/> The <b>nsswitch.conf<\/b>(5) file is the modern way of controlling the order of host lookups.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">In glibc 2.4 and earlier, the following keyword is recognized:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"7%\">\n<p><i>order<\/i><\/p>\n<\/td>\n<td width=\"4%\"><\/td>\n<td width=\"78%\">\n<p>This keyword specifies how host lookups are to be performed. It should be followed by one or more lookup methods, separated by commas. Valid methods are <i>bind<\/i>, <i>hosts<\/i>, and <i>nis<\/i>.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>RESOLV_SERV_ORDER<\/b><\/p>\n<p style=\"margin-left:22%;\">Overrides the <i>order<\/i> command.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Since glibc 2.0.7, and up through glibc 2.24, the following keywords and environment variable have been recognized but never implemented: <i><br \/> nospoof<\/i><\/p>\n<p style=\"margin-left:22%;\">Valid values are <i>on<\/i> and <i>off<\/i>. If set to <i>on<\/i>, the resolver library will attempt to prevent hostname spoofing to enhance the security of <b>rlogin<\/b> and <b>rsh<\/b>. It works as follows: after performing a host address lookup, the resolver library will perform a hostname lookup for that address. If the two hostnames do not match, the query fails. The default value is <i>off<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><i>spoofalert<\/i><\/p>\n<p style=\"margin-left:22%;\">Valid values are <i>on<\/i> and <i>off<\/i>. If this option is set to <i>on<\/i> and the <i>nospoof<\/i> option is also set, the resolver library will log a warning of the error via the syslog facility. The default value is <i>off<\/i>.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"7%\">\n<p><i>spoof<\/i><\/p>\n<\/td>\n<td width=\"4%\"><\/td>\n<td width=\"78%\">\n<p>Valid values are <i>off<\/i>, <i>nowarn<\/i>, and <i>warn<\/i>. If this option is set to <i>off<\/i>, spoofed addresses are permitted and no warnings will be emitted via the syslog facility. If this option is set to <i>warn<\/i>, the resolver library will attempt to prevent hostname spoofing to enhance the security and log a warning of the error via the syslog facility. If this option is set to <i>nowarn<\/i>, the resolver library will attempt to prevent hostname spoofing to enhance the security but not emit warnings via the syslog facility. Setting this option to anything else is equal to setting it to <i>nowarn<\/i>.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>RESOLV_SPOOF_CHECK<\/b><\/p>\n<p style=\"margin-left:22%;\">Overrides the <i>nospoof<\/i>, <i>spoofalert<\/i>, and <i>spoof<\/i> commands in the same way as the <i>spoof<\/i> command is parsed. Valid values are <i>off<\/i>, <i>nowarn<\/i>, and <i>warn<\/i>.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>gethostbyname<\/b>(3), <b>hosts<\/b>(5), <b>nsswitch.conf<\/b>(5), <b>resolv.conf<\/b>(5), <b>hostname<\/b>(7), <b>named<\/b>(8)<\/p>\n<h2>COLOPHON <a name=\"COLOPHON\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This page is part of release 5.10 of the Linux <i>man-pages<\/i> project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https:\/\/www.kernel.org\/doc\/man\u2212pages\/.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  host.conf \u2212 resolver configuration file <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[959],"tags":[961,1389,1291],"class_list":["post-4382","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-host","tag-man5"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4382"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4382\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}