Score:0

Cannot reach DNS server when connected to VPN

in flag

When I connect to my work network over VPN, I gain access to the work network and can SSH to the servers, but lose access to the internet on my local machine.

I believe this to be an issue in finding the DNS server because I can ping both web addresses and IP addresses from the work server via SSH without issue, but from my local machine, I am unable to ping web addresses:

user@local_machine:~$ ping www.google.com
ping: www.google.com: Temporary failure in name resolution

but if I ping the IP address for www.google.com (172.217.169.36) it works without issue:

user@local_machine:~$ ping 172.217.169.36
PING 172.217.169.36 (172.217.169.36) 56(84) bytes of data.
64 bytes from 172.217.169.36: icmp_seq=1 ttl=114 time=34.1 ms
64 bytes from 172.217.169.36: icmp_seq=2 ttl=114 time=31.6 ms
64 bytes from 172.217.169.36: icmp_seq=3 ttl=114 time=30.7 ms

To fix this I have tried the following:

  • Checking/unchecking the box marked "use this connection only for settings on this network." in Settings>Network>VPN>VIA_VPN>IPV4 & Settings>Network>VPN>VIA_VPN>IPV4
  • Manually setting the DNS server in Settings>Network>VPN>VIA_VPN
  • Forcing the machine to use the DNS server provided by the VPN using sudo resolvectl domain via_vpn
  • updating/upgrading everything

The software versions I am using are:

The VPN is the one I have been instructed to use by work, though support seems limited.

ru flag
Is your DNS outside of the VPN's network? Is your VPN configured with specific routes, or does it simply pass all your data over the VPN connection? (`ip -4 route list` will answer that question when run while you're connected to the VPN)
FinleyGibson avatar
in flag
`ip -4 route list` show pretty much everyhting as `via_vpn proto static`, the exceptions being local (192.168..) and one or two others. So it looks to me like it is passing all data over the VPN connection? [Full output](https://pasteboard.co/KaQhniC.png)
ru flag
Yep, that's exactly what's happening. Which is why you can ping any IP but you can't get DNS. What DNS servers are you using, are they on your network or are they external to your network (i.e. Google DNS or such?)
FinleyGibson avatar
in flag
I don't actually know what the DNS servers I am using are. (Apologies I am not very network savvy). When installing the VPN following the instructions, the DNS is set to "automatic" by default but doesn't give the server information. Manually setting the DNS to google (8.8.8.8) produces the same output from `ip -4 route list` though.
ru flag
What's the output of `sudo systemd-resolve --status`? That'll tell us what DNS servers you're using.
FinleyGibson avatar
in flag
the output of `sudo systemd-resolve --status` while connected to the vpn is [this](https://pastebin.com/y14nUsMq). ex.ac.uk is the work domian
FinleyGibson avatar
in flag
So am i right in saying it is trying to use google DNS servers but on my work domain (seriously out of my depth here)? By changing the VPN DNS server to 144.173.6.71 I was able to gain access to google, but google only in my browser while connected to the vpn.
ru flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/127445/discussion-between-thomas-ward-and-finleygibson).
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.