localhost or LAN addresses in /etc/hosts



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

This is all very well until one runs something like dnsmasq and get
localhost addresses when asking for the address of isbd.

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? Why does it get put
there, maybe it's there for use when the machine gets its IP via DHCP
and thus it isn't fixed.

--
Chris Green

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: localhost or LAN addresses in /etc/hosts
    ... I still have the localhost entries in /etc/hosts, ... chris$ ping localhost ... PING localhost.localdomain 56bytes of data. ... In fact I'm not at all convinced that a connection to isbd from isbd ...
    (Ubuntu)
  • Re: localhost or LAN addresses in /etc/hosts
    ... My ubuntu server machine's name is isbd, ... isbd localhost.localdomain localhost ... Modify to: ...
    (Ubuntu)
  • Re: localhost or LAN addresses in /etc/hosts
    ... address or an actual LAN address in /etc/hosts? ... My ubuntu server machine's name is isbd, ... This is all very well until one runs something like dnsmasq and get ... localhost addresses when asking for the address of isbd. ...
    (Ubuntu)
  • Re: localhost or LAN addresses in /etc/hosts
    ... My ubuntu server machine's name is isbd, ... localhost addresses when asking for the address of isbd. ... isbd is, by definition, your local machine, therefore a DNS ...
    (Ubuntu)
  • Re: localhost or LAN addresses in /etc/hosts
    ... address or an actual LAN address in /etc/hosts? ... isbd localhost.localdomain localhost ... Having multiple IP addresses for one name in /etc/hosts is usually a bad idea. ...
    (Ubuntu)