Enabling DNSBL in pfBlockerNG with logging turned on breaks DNS resolution
-
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:
-
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.
-
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.
-
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 -
Can you post a screencap of your Unbound settings (i.e.,
Services > DNS Resolver > General Settings)? -
-
I've been trying to post the other half, but it keeps getting flagged as spam.
-
Try editing your post (and without including of this page in the capture area).
-

-
That all looks fine.
You've tried a package reinstall without "Keep Settings" (i.e.,
Firewall > pfBlockerNG > General > General Settings > Keep Settingsunchecked, click "Save" at the bottom, prior to uninstall/reinstall)? -
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.
-
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.
-
@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 directoryYou 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.logNo 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.loglooks 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/" -
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.
