On Thu, Feb 11, 2021 at 02:16:19PM -0700, Bob Proulx wrote: > Chris Green wrote: > > Matus UHLAR - fantomas wrote: > > > > chris@isbdGandi$ more /etc/hosts > > > > 127.0.0.1 isbdGandi.isbd.uk isbdGandi isbd localhost > > > > > > no no no. > > > 127.0.0.1 is always supposed to resolve to "localhost". > > > If those hosts don't have their assigned IP, Debian uses "127.0.1.1" for > > > their hostnames. > > +1. Strong agreement. > > > Given that some of my systems have their IP address allocated > > dynamically there's not really much alternative except to put the > > system's name against 127.0.0.1. Lots of things *do* rely on the name > > being there. (or for 127.0.1.1). > > If you are already going to edit /etc/hosts then you have already > committed to having a unique file on each system. > > But instead of abusing the 127.0.0.1 entry use a different loopback > address such as the typical 127.0.1.1 address which provides an always > available address and avoids the problems created by diverting > localhost. > Yes, you're absolutely right, 127.0.0.1 should be only localhost. Other names, if required, can go against 127.0.1.1 or similar. This was actually how all my systems except for one (the one I took the example from, typical) were configured. I've never noticed any problems with the one that was misconfigured though (I have corrected it now).
-- Chris Green