Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    pfBlockerNG, can't disable caching or purge certain cache entries?

    Scheduled Pinned Locked Moved pfBlockerNG
    6 Posts 3 Posters 235 Views 3 Watching
    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.
    • I Offline
      ipandast
      last edited by

      Hello,

      I have enabled DNSBL with some categories. And I noticed that there's no way to disable caching ( because I have other local forwarders ), nor can I use the command line shell to purge certain cache entries.

      unbound-control returns an error saying "remote control is set to no", but setting it in the custom options won't work because those options weren't loaded at all.

      Is there a way to either completely disable caching for pfBlockerNG either via pfblockerNG or unbound or use the command line shell? pfBlockerNG seems to take over the control when DNSBL is enabled.

      Thanks.

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG Offline
        Gertjan @ipandast
        last edited by

        @ipandast said in pfBlockerNG, can't disable caching or purge certain cache entries?:

        unbound-control returns an error saying "remote control is set to no"

        unbound-control works just fine (pfBlockerrng is using it ^^) : you have to use the config file, so it knows how to talk to unbound :

        [26.03.1-RELEASE][root@pfSense.bhf.tld]/root: unbound-control -c /var/unbound/unbound.conf status
        version: 1.25.2
        verbosity: 1
        threads: 2
        modules: 3 [ python validator iterator ]
        uptime: 55712 seconds
        options: control(ssl)
        unbound (pid 73469) is running...
        

        @ipandast said in pfBlockerNG, can't disable caching or purge certain cache entries?:

        Is there a way to either completely disable caching for pfBlockerNG either via pfblockerNG

        😖 How to say these carefully : pfBlockerng doesn't handle DNS traffic ( ! )

        Example : I've a windows PC, a device on the pfSense LAN.
        A long story short : when you activate / add DNSBL files, these are loaded, sorted and then prepared as a list that are handed over to 'unbound' the DNS resolver. pfBblockerng itself doesn't to do any 'DNS' related, and has no cache.

        To flush my local DNS cache, I type (sorry, no GUI equivalent available ):

        C:\Users\Gauche>ipconfig /flushdns
        
        Configuration IP de Windows
        
        Cache de résolution DNS vidé.
        

        Wiping unbounds cache ?

        unbound-control -c /var/unbound/unbound.conf
        

        and pick whatever you think is right ^^ (probably nothing)
        Important info : DNSBL info won't get flushed ...
        The ubound's cache info you can flush is the info it got from 'the outside world'.

        No "help me" PM's please. Use the forum, the community will thank you.

        I 1 Reply Last reply Reply Quote 0
        • I Offline
          ipandast @Gertjan
          last edited by

          @Gertjan
          Hello Gertjan,

          Thanks for your reply and clarification.

          I know that on local computer, there are command to flush dns caches. However, my observation is that if the entry is still cached on pfsense, and the record is wrong, then when client devices query that record again, it still returns the wrong one.

          Thanks for your information on the relationship between pfblockerNG and unbound. What I meant was that the default location of config files seems to be changed and now controlled by pfBlockerNG.

          Now you reminded me that I have to (can) specify the config path (/var/unbound/unbound.conf) and then check caches, and purge certain entries or all entries.

          Now I have what I need.

          Thank you very much.
          Ian

          GertjanG 1 Reply Last reply Reply Quote 0
          • GertjanG Offline
            Gertjan @ipandast
            last edited by

            @ipandast said in pfBlockerNG, can't disable caching or purge certain cache entries?:

            I know that on local computer, there are command to flush dns caches. However, my observation is that if the entry is still cached on pfsense, and the record is wrong, then when client devices query that record again, it still returns the wrong one.

            Can you give an example of what host name is 'wrong' ?
            Is it a local device ?
            A internet host that you control like a DynDNS host name ? => Make the TTL lower, like 60 seconds !

            When I want to block myself a host like :

            93eb8f79-f485-44ca-ae99-75b29da1010b-image.png

            by hitting the red padlock, that entry, "a-ring.msedge.net" will get entered into the unbound cache with a 'null' solution (something like ::0 because its an IPv6) and that will update an existing entry.
            As the popup states when pressing the red padlock : unbound's cache (pfSense) will be ok, but your local OS or browser cache will need to be flushed.

            My point in short : I never had to flush the pfSense DNS cache. Not that I recall.

            No "help me" PM's please. Use the forum, the community will thank you.

            I 1 Reply Last reply Reply Quote 0
            • I Offline
              ipandast @Gertjan
              last edited by

              @Gertjan

              Hi Gertjan,

              Thanks a lot for your information.

              I'm using pfsense in an environment where certain domains are blocked by returning wrong IPs, just like how pfBlockerNG can return a VIP to the client if a domain is blocked and then direct all the traffic to that site to the VIP interface.

              With that said, I have dns rules on another local dns forwarder to bypass the blocking of some domains. But sometimes, the rules are not perfect, so there's still a chance that pfsense will get the wrong ip for one of those blocked domains and then it would be cached and served to many users.

              Since the configuration file is located in /var/unbound/unbound.conf, I may still want to see if it's possible to completely disable the caching.

              Sorry if I wasn't wording it correctly and left you the impression that pfBlockerNG is returning the wrong address or causing the issue.

              Actually, the reason why I still want pfBlockerNG to be in the DNS path instead of not using pfBlockerNG for DNS is that I like the predefined sets and filtering features to protect LAN users.

              Therefore, if I can disable caching of unbound, it will be much easier to debug and correct the polluted DNS records.

              SteveITSS 1 Reply Last reply Reply Quote 0
              • SteveITSS Offline
                SteveITS Rebel Alliance @ipandast
                last edited by

                @ipandast If I'm understanding, you can just restart the DNS Resolver service to clear the cache.

                Each client (e.g. Windows) may cache answers as well.

                To upgrade, select your branch in System/Update/Update Settings. When upgrading, allow 10-15 minutes to reboot, or more depending on packages, CPU, and/or disk speed.
                Only install packages for your version of pfSense.
                Upvote 👍 helpful posts!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
                Privacy Policy · Cookie Policy