Score:0

Can't resolve local hosts when VPN connected

jp flag

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?

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.