Joined: 09 Nov 2014 Posts: 298 Location: Bakersfield, CA
Posted: Mon Jun 24, 2019 8:30 Post subject: Directing requests from primary DNS to secondary DNS
I'm using dnsmasq on my R7000s, and all is working well and such. However, I have a domain named "Clients" and a secondary subnet with a domain named "Servers".
My questions: Is there a way that I could forward requests (or even the ability to ping between domains) for the Servers domain from the Clients domain? If I try to ping something in the Server subnet from the Primary subnet, it goes to some random IP that isn't on my network.
Adding a "host-record" for each computer on the subnet works, but I'm hoping there's a wildcard way so that ANY requests to the Server domain would work, not just the ones I setup with host-records.
You can add a server directive in the Additional DNSMasq Options field on the Services page to tell it to use specific DNS servers for specific domains.
So let's say the "clients" domain (192.168.1.x) wants to access devices, by name, in the "servers" domain (10.0.0.x). Assuming 10.0.0.1 is the local DNS server for the "servers" domain, you would add the following to DNSMasq in the "clients" domain.
Of course, this requires a FQDN (fully-qualified domain name) when making the request or else any unqualified name will likely expand to the local domain (if you use the expand-hosts directive). And it assumes the "servers" domain is making available its own local DNS server to the "clients" domain. IOW, if there's a WAN separating the two domains, you need to update the firewall on the "servers" domain to allow DNS requests. Also, since by default, DNSMasq prevents DNS rebinding, you'll probably have to make an exception on the "clients" domain to allow a private IP to be returned from the "servers" domain.