Directing requests from primary DNS to secondary DNS

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
SinCalChewy
DD-WRT User


Joined: 09 Nov 2014
Posts: 296
Location: Bakersfield, CA

PostPosted: Mon Jun 24, 2019 8:30    Post subject: Directing requests from primary DNS to secondary DNS Reply with quote
Hey all,
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.

Thanks in advance! Smile
TIA

_________________

Deployed Routers:
Netgear R7000 - 3x build 41517M (Gateway: Entware, Stubby DoT & DoH, CAKE)
Linksys E3000 - 2x build 41517M (Client Bridges)

Spares/Backups/Collection:
Too many to list. I have old routers, bricked routers, weird routers. You name it.
Sponsor
foz111
DD-WRT User


Joined: 01 Oct 2017
Posts: 204
Location: Earth

PostPosted: Tue Jun 25, 2019 10:35    Post subject: Reply with quote
I am no expert but i think you'll need to look at VLAN
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 8034

PostPosted: Tue Jun 25, 2019 14:12    Post subject: Reply with quote
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.

Code:
server=/servers/10.0.0.1


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.

Code:
rebind-domain-ok=servers

_________________
DD-WRT: DNS Leak Detection w/ VPNs (updated 6/5/19)
NEW SCRIPT!: ddwrt-mount-usb-drives.sh
NEW SCRIPT!: ddwrt-blacklist-domains.sh
NEW SCRIPT!: ddwrt-ovpn-remote-access.sh
NEW SCRIPT!: ddwrt-pptp-policy-based-routing.sh
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum