Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Setting max TTL for negative cache

    Scheduled Pinned Locked Moved DHCP and DNS
    4 Posts 3 Posters 688 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      chris.ett
      last edited by

      I would like to cache negative (NXDOMAIN) responses for only 5 seconds, regardless of what is set in SOA. I tried adding the following to the DNS Resolver's Custom options:

      cache-max-negative-ttl: 5
      

      But this gave me a syntax error. Am I doing it wrong? Is pfsense using an old version of unbound?

      I found the documentation for this setting here.

      viktor_gV 1 Reply Last reply Reply Quote 0
      • viktor_gV
        viktor_g Netgate @chris.ett
        last edited by

        @chris-ett use such syntax in the custom options field:

        server:
        cache-max-negative-ttl: 5
        
        C 1 Reply Last reply Reply Quote 1
        • C
          chris.ett @viktor_g
          last edited by

          @viktor_g Thanks, that works.

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            Out of curiosity on my part, why would you want to do this?

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.