I am searching for possible solutions for splitted DNS for internal/external worlds. Thing is, those two "worlds" (in reality different sets of nameservers) are partialy overlaping.
Here is example for domain example.com
.
External world zone data:
@ IN SOA ns01.example.com. hostmaster.example.com. (
2022082908 ; Serial
10800 ; Refresh
3600 ; Retry
864000 ; Expire
10800 ) ; Minimum
@ IN NS ns01.example.com.
@ IN NS ns02.example.com.
@ IN MX 50 smtp01.example.com.
@ IN MX 20 smtp02.example.com.
www IN A 90.80.70.60
portal IN A 90.80.70.60
Internal world zone data:
@ IN SOA ins01.example.com. hostmaster.example.com. (
2022082908 ; Serial
10800 ; Refresh
3600 ; Retry
864000 ; Expire
10800 ) ; Minimum
@ IN NS ins01.example.com.
@ IN NS ins02.example.com.
@ IN MX 50 exchange.example.com.
portal IN A 192.168.10.100
What is a purpose is to have some "resolver" (IP address) which can resolve both worlds for internal clients. So when internal client is accessing portal.example.com
he needs to go to internal website. But he also needs to have access to www.example.com
.
Are there any possible solution for this situation?
Current solution is some very old software on internal side, which is doing (from cron) AXFR from external nameserver and then do some modifications for a zone based on data in internal world. Which produces it's own set of problems. (for example ignoring TTL in internal world)
The best solution that I can imagine could be some resolver/dns-proxy which is able to query internal nameserver first (which would contain only internal DNS records). If internal NS returns NXDOMAIN or just anything besides answer with value, it should try to resolve query like resolver (or just forward query to some real resolver). Does something like that exists?
Another kinda obvious solution is to update/rewrite that internal DNS management software for modern OS's. And get rid of it's known problems (but some of them just cannot be solved I believe).
Or is there any other way that just does not come to my mind?
www
internally then it solves it, but you get lots of maintenance issues. Plus possible breakage of DNSSEC. Besidesdnsmasq
that is good enough for simple needs as @larsks answered,dnsdist
is a also a swiss-knife kind of DNS utility, and should be able to do your logic of retries... but honestly it feels as the wrong solution for your problem.dnsdist
. This seemed like most promising possible solution. But I think it is not possible to send query to another pool inaddResponseAction
. I am able to drop packet when I do not recieve some data in ANSWER section, or return a SERVFAIL code. But it does not allow me to run query again to different servers pool. Maybe it's just impossible, or I am just missing some option how to do that.