[CentOS] /etc/hosts - hostname alias for 127.0.0.1

Tue Mar 8 17:39:46 UTC 2011
m.roth at 5-cent.us <m.roth at 5-cent.us>

Johnny Hughes wrote:
> On 03/07/2011 02:22 PM, m.roth at 5-cent.us wrote:
>> Keith Keller wrote:
>>> On Mon, Mar 07, 2011 at 10:34:24AM -0600, Sean Carolan wrote:
>>>> Can anyone point out reasons why it might be a bad idea to put this
>>>> sort of line in your /etc/hosts file, eg, pointing the FQDN at the
>>>> loopback address?
>>>>
>>>> 127.0.0.1    hostname.domain.com hostname   localhost
>>>> localhost.localdomain
>>>
>>> Would the application work with a hosts entry like this?
>>>
>>> 127.0.0.1    hostname.dummy   localhost localhost.localdomain
>>
>> And giving it 127.0.0.1 would tell it others to ignore it, I think.

>> Where did your user come up with this idea - clearly, they have *no*
clue what
>> they're doing, and need at least a brown bag lunch about TCP/IP, and
>> they should not be allowed to dictate this. Their "idea" is a bug, and
needs
>> to be fixed.
<snip>
> You guys do know that the names in your host file only apply to YOU on
> that machine right?  It does not matter if you connect to 127.0.0.1 or
> something else UNLESS you specifically listen on a specific IP address
> on that machine AND you need to connect to that address from the machine
> itself.
<snip>
Let me expand on the above: if anyone on *any* other machine is trying to
connect to that, it won't work. If they try to point a browser to it,
unless they've done ssh -X to the server, they'll talk to their *own*
machine, and it won't be found.

         mark