I'm scratching my head as to why my VPN-accessible DNS server is not being queried as I'd expect. I've tried using both Exclusive and Strict for the VPN DNS configuration. I'd swear this was working at one point, but perhaps it was just coincidental and my setup isn't really valid. All of the routing is working fine, but name resolution isn't. I searched and found some similar questions, but most people seem to be using "redirect internet traffic through tunnel" or policy rules, neither of which I am using.
Configuration:
Problem: The DNS server running on the VPN server side is not being queried for server.xyz.org queries from the clients in the satellite offices, so those clients can't access the internal servers by name. They can access the internal servers by IP address just fine, so all of the routing is working. Also, I can manually force a client to use the VPN DNS server to resolve an internal server IP address successfully, so I know the VPN DNS server is reachable from the clients and can respond to lookups.
I can see that the VPN is pushing the DNS server information to the routers when they connect and I see the internal DNS server IP address in each router's client.resolv file.
% cat /etc/openvpn/client1/client.resolv
server=10.8.0.1
Each compute client on the satellite subnet is correctly configured by DHCP to query the local RT-AC86U box, which is running vanilla Merlin dnsmasq. The /tmp/resolv.dnsmasq file on the router has the ISP dns servers listed first, followed by the one that I want it to use first (10.8.0.1).
% cat /tmp/resolv.dnsmasq
server=71.10.216.1
server=71.10.216.2
server=10.8.0.1
It feels like either I'm doing something stupid (likely) or I futzed a config setting somewhere along the way. Any pointers on what else to try are appreciated. I can envision a few work-arounds, so this isn't critical, but it's bugging me as to why I can't get it working.
Routers are configured as follows:
WAN
LAN (addresses removed)
VPN settings (address removed):
Configuration:
- Two satellite offices for xyz.org, each running an RT-AC86U to handle some arbitrary number of DHCP clients with each router acting as an independent DHCP server
- One OpenVPN server that also runs dnsmasq to serve DNS queries for a few internal server names with fixed IPs within the VPN
- Another web server (www.xyz.org) whose DNS records are stored on a 3rd-party DNS server since it is needs to be accessible from the internet
- The satellite offices are "loosely connected" to VPN... general internet traffic is not routed through the VPN server, only intranet traffic is. One satellite office is on another continent, so the latency penalty would be much too high to route all traffic through the VPN.
- Satellite offices need to be able to function if the VPN server goes offline. They won't be able to access to the internal servers (obviously), but should be able to find/access www.xyz.org.
- Clients are all "trusted" so I don't need any special filtering or strict limitations on what they can do.
Problem: The DNS server running on the VPN server side is not being queried for server.xyz.org queries from the clients in the satellite offices, so those clients can't access the internal servers by name. They can access the internal servers by IP address just fine, so all of the routing is working. Also, I can manually force a client to use the VPN DNS server to resolve an internal server IP address successfully, so I know the VPN DNS server is reachable from the clients and can respond to lookups.
I can see that the VPN is pushing the DNS server information to the routers when they connect and I see the internal DNS server IP address in each router's client.resolv file.
% cat /etc/openvpn/client1/client.resolv
server=10.8.0.1
Each compute client on the satellite subnet is correctly configured by DHCP to query the local RT-AC86U box, which is running vanilla Merlin dnsmasq. The /tmp/resolv.dnsmasq file on the router has the ISP dns servers listed first, followed by the one that I want it to use first (10.8.0.1).
% cat /tmp/resolv.dnsmasq
server=71.10.216.1
server=71.10.216.2
server=10.8.0.1
It feels like either I'm doing something stupid (likely) or I futzed a config setting somewhere along the way. Any pointers on what else to try are appreciated. I can envision a few work-arounds, so this isn't critical, but it's bugging me as to why I can't get it working.
Routers are configured as follows:
WAN
LAN (addresses removed)
VPN settings (address removed):