[Bug 1015030] Re: Use nss-myhostname to provide default IP address of UNIX hostname
Launchpad Bug Tracker
1015030 at bugs.launchpad.net
Mon Dec 31 09:47:20 UTC 2012
Status changed to 'Confirmed' because the bug affects multiple users.
** Changed in: netcfg (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netcfg in Ubuntu.
https://bugs.launchpad.net/bugs/1015030
Title:
Use nss-myhostname to provide default IP address of UNIX hostname
Status in “netcfg” package in Ubuntu:
Confirmed
Bug description:
Currently the installer creates this /etc/hosts for a machine named
'foo':
127.0.0.1 localhost
127.0.1.1 foo
If foo is connected to a LAN with domain name 'bar.com' then it's
generally the case that 'foo.bar.com' resolves to the machine's
external IP address. But 'foo' continues to resolve to 127.0.1.1
because nsswitch.conf contains
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
where 'files' is given first. Hence "ping foo" pings 127.0.1.1 but
"host foo" returns the external IP address.
To eliminate this inconsistency the line
127.0.1.1 foo
could be eliminated from /etc/hosts and the "myhostname" NSS provider
(suitably modified so that it returns 127.0.1.1 for the UNIX hostname)
added to nsswitch.conf at the end of the "hosts" line. That way,
127.0.1.1 is still returned for the name 'foo' but only if other
methods of name resolution have failed to resolve the name 'foo'.
The Myhostname NSS provider is another fine product brought to you by
supercoder Lennart Poettering.
http://0pointer.de/lennart/projects/nss-myhostname/
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netcfg/+bug/1015030/+subscriptions
More information about the foundations-bugs
mailing list