Set hostname from dns.