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

    Enabling DNSBL in pfBlockerNG with logging turned on breaks DNS resolution

    Scheduled Pinned Locked Moved pfBlockerNG
    14 Posts 3 Posters 409 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.
    • S Offline
      smacdoug1
      last edited by

      I'm using pfBlockerNG-devel 3.2.14_1 on pfSense 2.8.1, but the same issue exists in pfBlockerNG 3.2.8. If I have 'DNS Reply Logging' enabled, DNS resolution breaks. The log shows this:

      Apr 14 08:24:40 unbound 20418 [20418:0] error: pythonmod: python error: Traceback (most recent call last): File "pfb_unbound.py", line 803, in log_entry with open(log, 'a') as append_log: ^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory:

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        smacdoug1 @smacdoug1
        last edited by

        In fact, resolver doesn't work reliably unless I have the logging set to 'Null Blocking (no logging)' on the DNBL gropu or global settings.

        1 Reply Last reply Reply Quote 0
        • tinfoilmattT Offline
          tinfoilmatt LAYER 8
          last edited by

          Sounds like (at least) an attempted package reinstall scenario.

          resolver doesn't work reliably

          Not clear what this could mean or that it has anything to do with pfBlockerNG.

          1 Reply Last reply Reply Quote 0
          • S Offline
            smacdoug1
            last edited by

            based on some of my own googling, resolver is crashing because the DNBL log files don't exist in /var/log/pfblockerng.

            In fact they do, but there's another directory I was eventually pointed to:

            /var/unbound/var/log/pfblockerng

            evidently sym links are supposed to be created here by DNSBL that point to /var/log/pfblockerng, but it's not happening no matter how many times I reinstall pfblockerng, or reload/restart it.

            It's also impossible to manually create the links in this directory for some reason:

            /var/unbound/var/log/pfblockerng: touch dns_reply.log
            touch: dns_reply.log: No such file or directory

            tinfoilmattT GertjanG 2 Replies Last reply Reply Quote 0
            • tinfoilmattT Offline
              tinfoilmatt LAYER 8 @smacdoug1
              last edited by

              Can you post a screencap of your Unbound settings (i.e., Services > DNS Resolver > General Settings)?

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                smacdoug1 @tinfoilmatt
                last edited by

                @tinfoilmatt

                Screenshot from 2026-04-14 11-32-55.png Screenshot from 2026-04-14 11-32-27.png

                1 Reply Last reply Reply Quote 0
                • S Offline
                  smacdoug1
                  last edited by

                  I've been trying to post the other half, but it keeps getting flagged as spam.

                  tinfoilmattT 1 Reply Last reply Reply Quote 0
                  • tinfoilmattT Offline
                    tinfoilmatt LAYER 8 @smacdoug1
                    last edited by

                    Try editing your post (and without including of this page in the capture area).

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      smacdoug1 @tinfoilmatt
                      last edited by

                      Screenshot from 2026-04-14 11-54-05.png

                      tinfoilmattT 1 Reply Last reply Reply Quote 1
                      • tinfoilmattT Offline
                        tinfoilmatt LAYER 8 @smacdoug1
                        last edited by

                        That all looks fine.

                        You've tried a package reinstall without "Keep Settings" (i.e., Firewall > pfBlockerNG > General > General Settings > Keep Settings unchecked, click "Save" at the bottom, prior to uninstall/reinstall)?

                        S 1 Reply Last reply Reply Quote 0
                        • S Offline
                          smacdoug1 @tinfoilmatt
                          last edited by

                          @tinfoilmatt

                          Not recently, early on I tried switching between the dev and non dev versions with the 'Keep Settings' unchecked and rebuilt the config from scratch. I had the same resolver issue with both versions. I only figured out recently it was due to logging and I could get it working again by changing to 'Null Block (no logging)' but haven't tried a reinstall since then.

                          tinfoilmattT 1 Reply Last reply Reply Quote 0
                          • tinfoilmattT Offline
                            tinfoilmatt LAYER 8 @smacdoug1
                            last edited by

                            I would, again with "Keep Settings" unchecked (and saved) in-between.

                            Something is borked and not worth troubleshooting nor manually 'massaging' even if you do drill down on it.

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

                              @smacdoug1 said in Enabling DNSBL in pfBlockerNG with logging turned on breaks DNS resolution:

                              /var/unbound/var/log/pfblockerng: touch dns_reply.log
                              touch: dns_reply.log: No such file or directory

                              You mean :

                              [26.03-RELEASE][root@pfSense.bhf.tld]root: ls -al  /var/unbound/var/log/pfblockerng/
                              total 4210
                              drwxr-xr-x  2 unbound unbound      12 Apr 15 00:45 .
                              drwxr-xr-x  3 root    unbound       3 Nov 19  2023 ..
                              -rw-------  1 unbound unbound 6319943 Apr 15 08:39 dns_reply.log
                              -rw-------  1 unbound unbound 2496785 Apr 15 08:34 dnsbl.log
                              -rw-------  1 root    wheel      3058 Apr 15 00:45 dnsbl_parsed_error.log
                              -rw-------  1 root    wheel      8437 Apr 15 06:00 error.log
                              -rw-------  1 root    wheel    146157 Apr 15 06:01 extras.log
                              -rw-------  1 root    wheel     43232 Apr 15 00:45 ip_permit.log
                              -rw-r--r--  1 root    unbound     121 Apr 15 06:00 maxmind_ver
                              -rw-------  1 root    wheel   3486322 Apr 15 06:00 pfblockerng.log
                              -rw-r--r--  1 unbound unbound       0 Feb 17  2025 py_error.log
                              -rw-------  1 unbound unbound 6347723 Apr 15 08:39 unified.log
                              

                              No files are there ??

                              This folder :
                              [26.03-RELEASE][root@pfSense.brit-hotel-fumel.net]/root: ll /var/log/pfblockerng/
                              total 4209
                              -rw------- 1 unbound unbound 6341700 Apr 15 08:41 dns_reply.log
                              -rw------- 1 unbound unbound 2496785 Apr 15 08:34 dnsbl.log
                              -rw------- 1 root wheel 3058 Apr 15 00:45 dnsbl_parsed_error.log
                              -rw------- 1 root wheel 8437 Apr 15 06:00 error.log
                              -rw------- 1 root wheel 146157 Apr 15 06:01 extras.log
                              -rw------- 1 root wheel 43232 Apr 15 00:45 ip_permit.log
                              -rw-r--r-- 1 root unbound 121 Apr 15 06:00 maxmind_ver
                              -rw------- 1 root wheel 3486322 Apr 15 06:00 pfblockerng.log
                              -rw-r--r-- 1 unbound unbound 0 Feb 17 2025 py_error.log
                              -rw------- 1 unbound unbound 6369480 Apr 15 08:41 unified.log

                              looks identical, and is identical.
                              unbound runs 'chrooted' in /var/bound, which means it can't access anything outside - above of /var/unbound so it mounts several folders into its own folder.
                              "/var/log/pfblockerng/" is mounted into /var/unbound"/var/log/pfblockerng/"

                              It's pfBlockernf that creates the logs files.

                              Something goes wrong during the start of Unbound ? (see resolver log)
                              File system ok ?
                              "/var/log/pfblockerng/" is mounted into /var/unbound"/var/log/pfblockerng/"

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

                              S 1 Reply Last reply Reply Quote 0
                              • S Offline
                                smacdoug1 @Gertjan
                                last edited by

                                @Gertjan

                                I followed an earlier suggestion to reinstall with 'keep settings' disabled. Although I had tried that already, for some reason this time it worked.

                                DNSBL is functioning correctly now.

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