I'm on Xubuntu 21.04. When I'm working from home, I connect using openvpn, and have a modified NetworkManager WiFi connection with an additional DNS server and additional search domains (everything else is identical). The thing is, DNS seems to ignore my local DNS server (my router) when I'm connected this way (everything works fine when I'm not). Of course, systemd-resolved is thrown in the mix to confuse things more. My /etc/resolve.conf looks like:
nameserver 127.0.0.53
options edns0 trust-ad
search here.example.com example.com
My /run/systemd/resolve/resolv.conf looks like:
nameserver 192.168.0.1
nameserver <my_work_dns_ip>
search here.example.com example.com
This all looks right to me. But if I try to do:
~$ ping raspberrypi
ping: raspberrypi: Temporary failure in name resolution
If I do:
dig raspberrypi
I get a SERVFAIL, but if I do:
dig @192.168.0.1 raspberrypi
It resolves correctly. I'm a bit stumped: the settings look correct, but it doesn't appear to do what it's supposed to. As you might have guessed, I'm a complete n00b at debugging DNS issues. The dig
command looks useful but I don't know how to make it do what I want. Where should I start?