Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DNS: define record subset for a domain and forward the rest
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 877

PostPosted: Mon Oct 17, 2022 10:48 am    Post subject: DNS: define record subset for a domain and forward the rest Reply with quote

Hi,

I'm wondering if I can define a zone in /etc/bind/pri, say, mydomain.org.zone.
I would set only a few A records there such as:

test A 10.0.0.1

I would like to forward every other DNS lookups for anything else *.mydomain.org to a public DNS server.

This is because I want some of my local DHCP WiFi clients to consult my local private DNS server (this Gentoo server) first so I can help them access a specific service "locally". If these clients (which may be BYODs) are out of the local network they will consult the public DNS and resolve "test.mydomain.org" with a public IP address.

I cannot duplicate the whole mydomain.org zone on my Gentoo server.

Regards
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3134

PostPosted: Mon Oct 17, 2022 12:07 pm    Post subject: Reply with quote

1) Bind supports views, you can filter queries by IP and provide one response or another based on who's asking, this way you'd only need 1 set of publicly available DNS servers.
2) Bind can act as a master server for particular zones and caching DNS for everything else. You can use this to override/shadow results for some particular hosts. Collecting those hosts under a single subdomain would make this setup easy to manage.

3) Finally, you _CAN_ delegate NS for * to the public server and NS for specific subdomains to your server and create the same zone (with the same delegations) on both sides, but should you?
I mean, I don't see a technical reason why it wouldn't work, but I still find this solution repulsive, so... While it certainly is an option, 1 or 2 are IMO way better.
Back to top
View user's profile Send private message
pa4wdh
l33t
l33t


Joined: 16 Dec 2005
Posts: 812

PostPosted: Mon Oct 17, 2022 3:34 pm    Post subject: Reply with quote

As far as i know this is the default behavior when using forwarders.

In that case you can set forwarders in the global options section, these will be used for all queries.
Next to that you can define local zones. When a local zone is defined it is preferred over forwarding.
_________________
The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world

My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
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