I have been researching and trying stuff out all morning and I can't seem to wrap my head around it. Bear with me, in case I am missing something basic here.
The Scenario:
I have configured interfaces with netplan (ubuntu server 18.04), and everything is working perfectly, except for the DNS part. When i do a "nslookup local-domain-name " i get an answer by 8.8.8.8 Instead, i want an answer by, say, 10.12.101.101
My Goal:
Get the system (i.e. nslookup) to use the local nameserver, that I have configured via a netplan config file, when looking up local domain-names.
Current config:
For a specific interface eth0 i have configured local nameservers that are to be used, when querying local IPs / a local network.
The /etc/resolv.conf contains a nameserver entry for 8.8.8.8
The netplan.conf looks like this:
network:
ethernets:
eth0:
addresses:
- 10.205.10.16/24
match:
macaddress: "xxxxxxxx"
nameservers: {
addresses: [10.12.101.101, 10.12.101.102, 10.12.101.103]
}
routes:
- xxxxxxxxxx
eth1:
addresses:
- xxxx/28
match:
macaddress: "xxxxx"
gateway4: xxxxxx
version: 2
And this is the output of "systemd-resolve --status"
Global
DNS Servers: 8.8.8.8
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
17.172.in-addr.arpa
18.172.in-addr.arpa
19.172.in-addr.arpa
20.172.in-addr.arpa
21.172.in-addr.arpa
22.172.in-addr.arpa
23.172.in-addr.arpa
24.172.in-addr.arpa
25.172.in-addr.arpa
26.172.in-addr.arpa
27.172.in-addr.arpa
28.172.in-addr.arpa
29.172.in-addr.arpa
30.172.in-addr.arpa
31.172.in-addr.arpa
corp
d.f.ip6.arpa
home
internal
intranet
lan
local
private
test
Link 3 (eth1)
Current Scopes: none
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
Link 2 (eth0)
Current Scopes: DNS
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNS Servers: 10.12.101.101
10.12.101.102
10.12.101.103
What else have i configured:
- systemd-networkd is enabled and running.
- systemd-resolved is enabled and running.
- networking.service is disabled.
- resolvconf, dnsmasq, dnsmasq-base - packages are not installed.
- /etc/nsswitch.conf looks like this: "hosts: files resolve [!UNAVAIL=return] dns".
- rebooted System after every change i made.
Thanks in advance for any advice. I hope, this is a reasonable question.