Disable named dns server from caching

Posted on 2005-05-09
Last Modified: 2010-03-18
Is there any way to disable caching of hostname lookups when using a local named cache-only server. I know that sounds counterintuative, but I would like to have lookup requests hit the authoriative DNS servers and not use local cache. Is this possible?

If it isn't possible to configure the local nameserver to do this, is there a way to tell 'dig' or 'host' or 'nslookup' to not use the local cache, to basically ignore the TTL, and make the request directly to the authoritative nameservers?

Thanks in advance
Question by:timdr
    LVL 18

    Expert Comment

    dig @nameserver host
    LVL 40

    Expert Comment

    Or with host:

    chaos> host -t ns name server name server name server
    chaos> host
    Using domain server:
 has address
    LVL 1

    Author Comment

    Is there any way without specifiyinga nameserver to use? So that it finds this out on its own from the root servers?
    LVL 18

    Accepted Solution

    $ chmod 750
    $ cat
    dig @`host -t ns $1|sed '1s/.*name server //;2,$d'` $1
    $ ./

    ; <<>> DiG 9.2.5 <<>>
    ; (1 server found)
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24655
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3

    ;                    IN      A

    ;; ANSWER SECTION:             60      IN      A

    ;; AUTHORITY SECTION:             600     IN      NS             600     IN      NS             600     IN      NS

    ;; ADDITIONAL SECTION:         600     IN      A         600     IN      A         600     IN      A

    ;; Query time: 38 msec
    ;; SERVER:
    ;; WHEN: Tue May 10 12:50:46 2005
    ;; MSG SIZE  rcvd: 146

    (Yes the 3rd and 4th line above are the contents of the actual file, a small shell script)

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now