Document and stop using util.ldd.
Replace hardcoded IP by unresolved hostname.

Makes this solution more universal.  When `nslookup` fails for some reason,
we just default to the unresolved hostname, which may be different from
ndcms.