FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 08-26-2011, 02:02 AM
Craig White
 
Default telnet on local LAN question (progress?)

On Thu, 2011-08-25 at 14:31 +0930, Tim wrote:
> Tim:
> >> No matter what anybody says, and despite the setup of Fedora doing
> >> it, it's a bad bad BAD idea to bodge *anything* else into those two
> >> local lines. Sure, you can get away with it under *some*
> >> circumstances. But you can run into a hell of a lot of pain under
> >> other circumstances.
>
> Craig White:
> > I'm not a fan of it either but that is indeed the way things are done.
> > I'm sort of old school on this myself but Ubuntu does things
> > similarly...
> >
> > 127.0.0.1 localhost
> > 127.0.1.1 srv2.azapple.com srv2
>
> Probably *less* of an issue, since they've not used 127.0.0.1. Although
> it can behave the same, the names and numbers are different, and
> shouldn't resolve back to each other. But if anything needs the machine
> name's IP to resolve to an IP that something else will find it at, then
> problems may still arise.
>
> > I sort of decided to stop fighting it and go with the flow. It works
> > fine.
>
> I've always found it to be a problem with servers. Mail servers being
> one of them. It seems less of an issue with clients, and I've just let
> clients automatically set themselves up.
----
that IS my server and it uses postfix & cyrus-imapd - absolutely no
problems.

Craig


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-26-2011, 06:33 AM
Paul Allen Newell
 
Default telnet on local LAN question (progress?)

On 8/22/2011 9:51 PM, Tim wrote:
>
> Have a look at a virgin hosts file, and it'll be like this:
>
> cat /etc/hosts
> # Do not remove the following line, or various programs
> # that require network functionality will fail.
> 127.0.0.1 localhost.localdomain localhost
> ::1 localhost6.localdomain6 localhost6
>
Tim:

I said I was ending the thread, but I went back through archives of my
installs and found a sufficiently different factory-install of
/etc/hosts that I wanted to post it for comment given your "bad idea to
bodge (sic?) anything else into those two lines. I checked 3 machines
and they are the same, so I submit only one:
+++
cat /etc/hosts
127.0.0.1 chalupa.localdomain chalupa localhost.localdomain
localhost localhost4
::1 chalupa.localdomain chalupa localhost6.localdomain6
localhost6
+++

This was snapped after I had installed F14 and before I edited hosts to
know about the other machines. No comment about "Do not remove" (that
vanished a couple of releases ago if my memory is correct) and it makes
sense that /etc/hosts would have both the machine name as defined during
the install and the "generic" localhost.

You might be using "virgin" to imply an earlier state than my snapshot,
but somehow that seems like you are looking at "pristine" before
knowledge of the machine is available?

There is a small chance that my notes during install might be wrong, but
once I figured out how to get network working under F9, I've been pretty
careful to capture original of all files related (hosts and ifcfg-eth0)
before modifying.

Cheers,
Paul
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-26-2011, 10:19 AM
Tim
 
Default telnet on local LAN question (progress?)

On Thu, 2011-08-25 at 23:33 -0700, Paul Allen Newell wrote:
> I went back through archives of my installs and found a sufficiently
> different factory-install of /etc/hosts that I wanted to post it for
> comment given your "bad idea to bodge (sic?) anything else into those
> two lines. I checked 3 machines and they are the same, so I submit
> only one:
> +++
> cat /etc/hosts
> 127.0.0.1 chalupa.localdomain chalupa localhost.localdomain localhost localhost4
> ::1 chalupa.localdomain chalupa localhost6.localdomain6 localhost6
> +++

Yes, it's a common thing to see (Fedora's install routine shoving them
in there). And *can* be a common problem. Not always, but when you
start having weird name resolution issues with some servers, it's the
first thing to sanitize.

The format of the hosts file is the IP address, the (full) named address
for that IP, and a list of optional aliases. Any lookup for the name to
go with an IP will return the first name in the list. Any lookup for
the IP will match any name in the list.

So, using your list, anything that wants to find the name to go with
127.0.0.1 will be told chalupa.localdomain. Traditionally, it ought to
be localhost.

Conversely, it would be traditional that any lookup to find the IP
address for the machine name (chalupa.localdomain) would find the IP it
uses on the network (192.168.2.10), but yours would return 127.0.0.1,
because it's the first answer that matches. You could counter that by
putting the 192.168... lines above the local lines.

I seem to recall one reason why machine names were bodged into the local
loopback lines harking back to people insisting their machine name was
applied (in some other configuration file), rather than letting the
machine work it out for itself, and trying to start up their machine
when not connected to the network, and some service complaining that it
couldn't connect so it wouldn't start. I seem to recall X refusing to
start, at one point (it's been a very long time since I've seen that,
though, maybe before Red Hat Linux became Fedora). I've certainly seen
the GDM login screen change from using my hostname.domain name to
localhost.localdomain, at times that the ethernet interface wasn't up at
the time (though it's been a long time since I saw that behaviour, many
releases ago).

It's probably not going to cause most people any problems. But you were
having some strange names in your mail headers. Whether that *really*
makes any problems other than an issue for you trying to work out where
your mail has been through, I don't know. Since your mail tests were
going up the spout, I'd have tweaked things to work in the traditional
way, to minimise any chance of this being a part of the problem, and to
make debugging mail headers much easier.


> This was snapped after I had installed F14 and before I edited hosts
> to know about the other machines. No comment about "Do not
> remove" (that vanished a couple of releases ago if my memory is
> correct) and it makes sense that /etc/hosts would have both the
> machine name as defined during the install and the "generic"
> localhost.

There's some logic to it, the idea being that your machine stays named
the same, even if it can't connect to a network.

The "do not modify the file" warning was always badly worded. It told
you not to modify a file that had already been modified, few people
would have seen the contents before that happened.

But, it has been known to cause some people problems. And putting non-
local loopback addresses into the local loopback lines has been debated
many times in the past. And not just with Linux boxes.

--
[tim@localhost ~]$ uname -r
2.6.27.25-78.2.56.fc9.i686

Don't send private replies to my address, the mailbox is ignored. I
read messages from the public lists.



--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-27-2011, 02:52 AM
Craig White
 
Default telnet on local LAN question (progress?)

On Fri, 2011-08-26 at 19:49 +0930, Tim wrote:
> On Thu, 2011-08-25 at 23:33 -0700, Paul Allen Newell wrote:
> > I went back through archives of my installs and found a sufficiently
> > different factory-install of /etc/hosts that I wanted to post it for
> > comment given your "bad idea to bodge (sic?) anything else into those
> > two lines. I checked 3 machines and they are the same, so I submit
> > only one:
> > +++
> > cat /etc/hosts
> > 127.0.0.1 chalupa.localdomain chalupa localhost.localdomain localhost localhost4
> > ::1 chalupa.localdomain chalupa localhost6.localdomain6 localhost6
> > +++
>
> Yes, it's a common thing to see (Fedora's install routine shoving them
> in there). And *can* be a common problem. Not always, but when you
> start having weird name resolution issues with some servers, it's the
> first thing to sanitize.
>
> The format of the hosts file is the IP address, the (full) named address
> for that IP, and a list of optional aliases. Any lookup for the name to
> go with an IP will return the first name in the list. Any lookup for
> the IP will match any name in the list.
>
> So, using your list, anything that wants to find the name to go with
> 127.0.0.1 will be told chalupa.localdomain. Traditionally, it ought to
> be localhost.
>
> Conversely, it would be traditional that any lookup to find the IP
> address for the machine name (chalupa.localdomain) would find the IP it
> uses on the network (192.168.2.10), but yours would return 127.0.0.1,
> because it's the first answer that matches. You could counter that by
> putting the 192.168... lines above the local lines.
>
> I seem to recall one reason why machine names were bodged into the local
> loopback lines harking back to people insisting their machine name was
> applied (in some other configuration file), rather than letting the
> machine work it out for itself, and trying to start up their machine
> when not connected to the network, and some service complaining that it
> couldn't connect so it wouldn't start. I seem to recall X refusing to
> start, at one point (it's been a very long time since I've seen that,
> though, maybe before Red Hat Linux became Fedora). I've certainly seen
> the GDM login screen change from using my hostname.domain name to
> localhost.localdomain, at times that the ethernet interface wasn't up at
> the time (though it's been a long time since I saw that behaviour, many
> releases ago).
>
> It's probably not going to cause most people any problems. But you were
> having some strange names in your mail headers. Whether that *really*
> makes any problems other than an issue for you trying to work out where
> your mail has been through, I don't know. Since your mail tests were
> going up the spout, I'd have tweaked things to work in the traditional
> way, to minimise any chance of this being a part of the problem, and to
> make debugging mail headers much easier.
>
>
> > This was snapped after I had installed F14 and before I edited hosts
> > to know about the other machines. No comment about "Do not
> > remove" (that vanished a couple of releases ago if my memory is
> > correct) and it makes sense that /etc/hosts would have both the
> > machine name as defined during the install and the "generic"
> > localhost.
>
> There's some logic to it, the idea being that your machine stays named
> the same, even if it can't connect to a network.
>
> The "do not modify the file" warning was always badly worded. It told
> you not to modify a file that had already been modified, few people
> would have seen the contents before that happened.
>
> But, it has been known to cause some people problems. And putting non-
> local loopback addresses into the local loopback lines has been debated
> many times in the past. And not just with Linux boxes.
----
many words but nothing substantive

I'm not an expert on this by any means but I gather that for many years,
UNIX & Linux systems all had fixed IP addresses and software developers
relied upon matching the system hostname to the addresses in /etc/hosts
to decide which interfaces they should start their daemons on.

Those that serviced the loopback address as well as external addresses
worked find when the hostname was entered on the 127.0.0.1 line but some
were terribly confused thus begging to the administrator of the system
to move real hostnames off the 127.0.0.1 address and onto the lines that
listed the actual ethernet interfaces.

As Linux became mainstream and dhcp-client became a normal for many
linux systems, software developers had to resort to other methods for
determining which interfaces to operate with. For dhcp systems, the only
real place to put the actual hostname is on the 127.0.0.1 line.

Now if you turn off NM, turn on 'network' and manually configure the IP
addresses for your ethernet interface(s), then by all means put the real
hostnames on lines other than 127.0.0.1

In reality, it shouldn't much matter though unless you are dealing with
uncooperative software.

Craig


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 08:17 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org