[Nix-dev] [NixOS] 127.0.0.1 in /etc/hosts

Eelco Dolstra eelco.dolstra at logicblox.com
Sun Oct 7 06:24:02 CEST 2012


Hi,

On 05/10/12 13:11, Rickard Nilsson wrote:

> Is there some particular motivation behind the /etc/hosts generation? Why  
> should the hostname always be mapped to 127.0.0.1? I think it is wrong,  
> simply.

The reason is that some software assumes that the hostname resolves to a valid
IP address.  However, a better solution is to use nss-myhostname [1], which I'm
currently testing.  It makes the hostname resolve to the IP addresses of your
network interfaces, or ::1 / 127.0.0.2 as a fallback.

[1] http://0pointer.de/lennart/projects/nss-myhostname/

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list