localhost or LAN addresses in /etc/hosts
Florian Diesch
diesch at spamfence.net
Sat Dec 13 01:04:42 UTC 2008
Chris G <cl at isbd.net> wrote:
> How does one decide whether to put a machine's name as a localhost
> address or an actual LAN address in /etc/hosts?
> My ubuntu server machine's name is isbd, this appears in three places
> in /etc/hosts at the moment:-
>
> 127.0.0.1 isbd localhost.localdomain localhost
> 127.0.1.1 isbd
>
> 192.168.1.4 home.isbd.net isbd 84-45-228-40.no-dns-yet.enta.net chris.isbd.net
Having multiple IP addresses for one name in /etc/hosts is usually a bad idea.
> I think the 127.0.1.1 is redundant and should be removed, can I also
> remove the isbd from the 127.0.0.1 line as well?
Think about what you want 'isbd' to resolve to.
Usually you want to have a FQDN for a name, too, so most likely the
127.0.1.1 isn't what you want.
Florian
--
<http://www.florian-diesch.de/>
-----------------------------------------------------------------------
** Hi! I'm a signature virus! Copy me into your signature, please! **
-----------------------------------------------------------------------
More information about the ubuntu-users
mailing list