0

With more and more devices and internet connections supporting IPv6, which allows you to reach every device behind a router directly without NAT, I plan on using the same domain for my devices whether I access them from inside my LAN or outside.

I am using Cloudflare DNS to add AAAA records for all of my machines to my domain so I can reach them with .example.com, from inside and outside of my LAN (with proper firewall rules)

However, using Cloudflare as my "internal" DNS would mean, that when my internet connection is gone, I can't reach my local devices as soon as they fall out of the nameserver cache of my local Bind server. I probably could add extremely long cache times for the domain but I do not want that.

But I also do not want DNS from outside having to rely on the internal DNS server working.

What I am looking for is a way to make the local Bind server cache every record of my *.example.com zone, but always look up requests at the real DNS server, i.e. perform a normal lookup like it would for google.com. Only if that nameserver doesn't respond or responds with an error, Bind should return the result from its cache. That way, I could host the DNS records at Cloudflare, using its API to manage my zone, having all requests use the up-to-date Cloudflare zone, but if the internet connection is gone, still have a cached copy on the local server.

Is that possible?

  • Is it possible to use zone transfers? – Esa Jokinen Jun 9 '18 at 22:24
  • I haven't found a way to configure Cloudflare DNS to allow zone transfers to a seconday, or to act as a secondary pulling from a master DNS; so, I guess, it is not. – Florian Bach Jun 9 '18 at 22:50
  • Or have your internal nameservers be slaves of the external ones? So that normally they are synchronized but if the connection is lost they are able to reply to queries for long time (you decide how long through the timers in the SOA records). – Patrick Mevzek Jun 11 '18 at 2:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.