'Why doesn't DNS forwarding work out of the box on Ubuntu 20.04?
We have a hub-spoke network model where a DNS forwarder is placed in spoke ID and a Ubuntu VM is placed in spoke WORKLOAD.
The VNET in the WORKLOAD spoke is configured with DNS towards the DNS forwarder and Azure Public DNS as a fallback.
When we try to resolve domains on the UBUNTU VM it defaults to the public Azure provided DNS server and is not able to resolve private DNS records. I have tried both RHEL and Windows VM in the same spoke, with the same NSG, and that works out of the box. This points to something specific with Ubuntu and how Ubuntu manage DNS.
I can manually set the DNS on the Ubuntu VM to use the forwarder IP and then I'm able to resolve private DNS records, but why does it not use the forward DNS server out of the box?
The Ubuntu VM shows that the public DNS server is used as the current:
$ systemd-resolve --status | grep 'DNS Server'
Current DNS Server: 168.63.129.16
DNS Servers: 10.xx.xx.xx
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
