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.

2 Answers 2

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.

2
  • Thats a good idea. I wonder if it is possible to do per-domain TTL. I'll look into this.
    – Brack
    Commented May 22, 2014 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
    Commented May 31, 2014 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
1
  • 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
    Commented May 21, 2014 at 21:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .