I'm trying to configure the nameservers in my
Ubuntu 18.04 with netplan.
I got a DNS server which is running on my localhost (
My configuration looks like this:
network: ethernets: ens160: addresses: [172.16.0.1/16] dhcp4: 'no' dhcp6: 'no' gateway4: 172.16.100.1 nameservers: addresses: [10.0.0.8, 18.104.22.168, 10.15.0.18, 127.0.0.1] version: 2
And when I'm doing an
nslookup on some DNS name in my env it fails.
dig command is failing too with the
But, when I change the order of the
addresses in the
nameservers section to
[127.0.0.1, 10.0.0.8, 22.214.171.124, 10.15.0.18], after applying the configuration with
netplan apply the
nslookup query works and the
dig outputs correctly with
My question is: why there is any significance to the order of the DNS servers? How can I force the netplan conf to look always in the
127.0.0.1 regarding all\specific domain?
netplan apply are successful without any errors.