Score:0

ubuntu 22 does not resolve hostnames without domainname

mg flag

We've got a bunch of ub20 VM's

where the resolv.conf looks like

nameserver 127.0.0.53
options edns0 trust-ad
search domain.nl

both ping to machine tooling and tooling.domain.nl works, ip address resolved

nameserver 127.0.0.53
options edns0 trust-ad
search .

on these machines a ping to machine tooling.domain.nl works but without domain name it says "Temporary failure in name resolution"

manually changing resolv.conf to search domain.nl does not work, the dot is replaced automatically

How to setup name resolution without domain name?

Thirumal avatar
br flag
Having same issue, found any solution?
Serve Laurijssen avatar
mg flag
it seems to have something to do with /etc/netplan/00-installer-config.yaml which is automatically overwitten
Score:0
mg flag

Fixed by updating the netplan yaml in "/etc/netplan" with search: domain.nl

network:
  version: 2
  renderer: networkd
  ethernets:
    ens160:
      routes:
      - to: default
        via: 10.203.32.254
      dhcp4: no
      dhcp6: no
      addresses:
        - 10.203.32.131/24
      nameservers:
        addresses:
          - 10.203.32.2
          - 10.203.32.3
        search:
        - domain.nl

Now after netplan apply, resolv.conf contains the line "search domain.nl" and it works

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.