Change DNS resolver to ignore hostnames longer than 39 symbols and
prefer IP/IPv6 addresses instead;  substitute "localhost" with
"unknown".