Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Aug 2008 04:18:39 -0400
From:      Tom Rhodes <trhodes@FreeBSD.org>
To:        Wayne Sierke <ws@au.dyndns.ws>
Cc:        trhodes@FreeBSD.org, freebsd-doc@FreeBSD.org
Subject:   Re: docs/124949: Discrepancy between handbook and example hosts file for localhost configuration
Message-ID:  <20080807041839.6ae1fe2b.trhodes@FreeBSD.org>
In-Reply-To: <1218089269.4383.128.camel@predator-ii.buffyverse>
References:  <200808031632.m73GWU8H048418@freefall.freebsd.org> <1218089269.4383.128.camel@predator-ii.buffyverse>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 07 Aug 2008 15:37:49 +0930
Wayne Sierke <ws@au.dyndns.ws> wrote:

> On Sun, 2008-08-03 at 16:32 +0000, trhodes@FreeBSD.org wrote:
> > Synopsis: Discrepancy between handbook and example hosts file for localhost configuration
> > 
> > State-Changed-From-To: open->closed
> > State-Changed-By: trhodes
> > State-Changed-When: Sun Aug 3 16:31:00 UTC 2008
> > State-Changed-Why: 
> > I have updated the example in the handbook, thanks for
> > bringing this to our attention.
> 
> In fact I had hoped to elicit some discussion about whether the default
> localhost configuration should include the hostname or not.
> 
> As mentioned in the original PR I noticed the $SUBJECT while
> investigating a "slow SSH login" issue.
> 
> Looking at the CVS history for /src/etc/hosts seems to show that the
> addition (and removal) of hostname to localhost has been through a
> couple of iterations (starting Nov'95):
> 
>         Revision 1.11.2.2:
>         Mon Oct 8 09:32:08 2001 UTC (6 years, 9 months ago) by ru
>         Branches: RELENG_4
>         
>         MFC: 1.14: removed `myname.my.domain' as another alias for `localhost'.
> 
>         
>         Revision 1.14:
>         Sat Sep 29 12:20:08 2001 UTC (6 years, 10 months ago) by ru
>         Branches: MAIN
>         
>         Backout revision 1.9 that added `myname.my.domain' as another alias for
>         `localhost'.  If your /etc/nsswitch.conf has ``hosts: files dns'', and
>         you changed `myname.my.domain' in /etc/hosts to match hostname(1), and
>         you run inetd(8) with the -l option, any connect to `myname' using its
>         real IP address through inetd(8), e.g. `ftp -a myname', will spam your
>         /var/log/messages with:
>         
>         inetd[PID]: warning: /etc/hosts.allow, line 23: host name/name mismatch: myname.my.domain != localhost
>         
>         This is especially bad for -STABLE, where /etc/host.conf defaults to
>         "files first then DNS" resolution order.
>         
>         
>         Revision 1.9:
>         Thu Apr 16 14:37:19 1998 UTC (10 years, 3 months ago) by joerg
>         Branches: MAIN
>         
>         Add `myname.my.domain' as another alias for `localhost'.  We set this
>         as the initial generic hostname if the user didn't setup any NIC, but
>         failure to resolve this name results in XF86Setup not being able to
>         run.
> 
>         
>         Revision 1.5.4.1:
>         Sun Nov 19 17:53:28 1995 UTC (12 years, 8 months ago) by jkh
>         Branches: RELENG_2_1_0
>         
>         Put myname.my.domain by default on the loopback, resulting in less confusing
>         startup behavior for newly installed hosts not on a network.
>         
> 
> Google will also pull up suggestions to add hostname to the localhost
> config to solve various networking-related "issues".
> 
> I guess the upshot of all this is to consider whether it might be useful
> to add some text to the handbook discussing when adding (and removing)
> hostname to/from the localhost config might be prudent/needed?

I'll be out of town on vacation from 08-07 - 08-13.  If you
have some wording in mind, please suggest.  Otherwise, I'll
look more into this when I get back.  Thanks,

-- 
Tom Rhodes



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080807041839.6ae1fe2b.trhodes>