• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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 671 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 Jun 18, 2020, 2:38 AM

    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.

    V 1 Reply Last reply Jun 18, 2020, 5:25 AM Reply Quote 0
    • V
      viktor_g Netgate @chris.ett
      last edited by Jun 18, 2020, 5:25 AM

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

      server:
      cache-max-negative-ttl: 5
      
      C 1 Reply Last reply Jun 18, 2020, 5:07 PM Reply Quote 1
      • C
        chris.ett @viktor_g
        last edited by Jun 18, 2020, 5:07 PM

        @viktor_g Thanks, that works.

        1 Reply Last reply Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator
          last edited by Jun 18, 2020, 5:37 PM

          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
          4 out of 4
          • First post
            4/4
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received