How do I flush or delete incorrect records from my recursive server cache?

August 18, 2020 at 11:48 am Leave a comment

Sometimes a recursive server may have incorrect records in its cache.  These may be as a result of an error made by a zone administrator, or as a result of a deliberately engineered cache poisoning attack.

To identify the faulty records, by dumping and inspecting cache:

rndc dumpdb -all
grep problem.domain /var/named/data/cache_dump.db

(The location of the cache_dump.db may be varied based on the bind configuration)

Or you may be able to identify which records are incorrect by querying your server directly.

dig +norec <ip address of nameserver> <name> <type>

How to solve the problem?

rndc flushname name
  • Use the name of a domain if there are problems with the NS or MX records associated with it.
  • Use the server name, if there are problems with the addresses associated with that server name (for example a nameserver, a webserver or a mailserver).

Flush the cache for a specific name as well as all records below that name

rndc flushtree name
  • This will clear the cache, but it will not clear any names out of ADB, so may not be sufficient for some needs.

If you are not sure where the problem lies, or there are too many records to delete them individually, then you might prefer to:Flush the entire named cache

rndc flush && rndc reload


Entry filed under: DNS and Bind. Tags: , , , .

How I passed the CASP+ How to fix the disk usage warning when /home partition or /home/nutanix directory is full

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trackback this post  |  Subscribe to the comments via RSS Feed



Follow Hope you like it.. on

Blog Stats

  • 68,230 hits

%d bloggers like this: