3

I have a BIND server (CentOS 6) on my local subnet handing my DNS requests. I also have a domain which points to my GoDaddy VPS. I would like to configure my BIND server so that it won't cache any requests for my domain. This is so when I update my domain's DNS records I don't have to flush the DNS cache on my server each time to see if my changes are working.

Basically each time I request my domain, I would like my BIND server to request the IP from the GoDaddy DNS servers. Requests for any other domain I would like it to cache normally.

Thanks for any help.

1

Set the TTL on all your records to 5 seconds. Or even 1 second if you like. Then they won't be cached for very long at all. Just don't use 0 for the TTL, it causes strange behavior with some resolver code.

  • Thats a good idea. I wonder if it is possible to do per-domain TTL. I'll look into this. – Brack May 22 '14 at 14:22
  • There is a default TTL per zone (per-domain as you say) that all record added to the zone inherit if they are not added with a specific TTL. – milli May 31 '14 at 14:49
0

If you have 9.3 or greater you can use rndc to flush the cache for a single domain.

From DNS and Bind:

BIND 9.3.0 will support flushing all of the records attached to a particular domain name with rndc flushname. For example:

rndc flushname google.com
  • Thanks for the reply. This would work but I'd have to run it each time, or set up a task to run it automatically, right? It wouldn't work automatically each time I request the domain? – Brack May 21 '14 at 21:21

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.