New pfblockerNG install Database Sanity check Failed
-
@tinfoilmatt Is there a fix or patch being published for this? Still waiting.
-
@madmaxpr I'm sure there will be, but @BBcan177's manual patch can be applied in the meantime.
File to edit is
/usr/local/pkg/pfblockerng/pfblockerng.sh
, Line 1232 on my 2.8 CE/package version 3.2.8 system. -
@tinfoilmatt There are a few things that are not quite right in there... but the short version is that this has always been broken, it seems, but the check doesn't actually do anything apart from display the alert anyway.
In pfSense 2.7.2, pfBlockerNG and devel were at versions 3.2.0_8 and 3.2.0_20, respectively. In pfSense 2.8.0, they are both at v3.2.8.
Note that 3.2.0_8 ≠ 3.2.8
Versions 3.2.0_8 (and 3.2.0_20?) had two issues with the Database Sanity check. The first one broke the check entirely and it always showed PASSED no matter what. The second one was that the check was checking against "masterfile" instead of "mastercat"
The first problem was fixed in v3.2.8, which exposed the second problem. The second problem is fixed by the change BBcan177 described above.
And for those worrying about a patch - Since BBcan177 created the fix himself, I assume it'll be fixed in the next release. Also, this issue is strictly cosmetic, so there's not an urgent need for a new release to fix it. But if your OCD can't let it go (and I can relate lol) then just apply BBcan177's fix manually while we wait.
-
@Maltz said in New pfblockerNG install Database Sanity check Failed:
Versions 3.2.0_8 (and 3.2.0_20?) had two issues with the Database Sanity check. The first one broke the check entirely and it always showed PASSED no matter what. The second one was that the check was checking against "masterfile" instead of "mastercat"
The first problem was fixed in v3.2.8, which exposed the second problem. The second problem is fixed by the change BBcan177 described above.
Solid recap. So when all is said and patched, two relevant lines of
/usr/local/pkg/pfblockerng/pfblockerng.sh
should read...Line 1232 (needs manual change until patch released):
s1="$(grep -cv ^${ip_placeholder2}$ ${mastercat})"
Line 1281 (should already be present in package version 3.2.8):
if [ "${s1}" == "${s2}" ]; then
-
here: running pfSense 2.8.0-RELEASE and pfBlockerNG 3.2.8-dev
Made the suggested change to line 1232.
Still same issue showing DNSBL (unbound mode) out of sync.
Should I revert the channge to ensure that the patch when available works correctly?
Thanks for nay help.
-
I had the same issue
make the suggested change on line 1232
then go to general
uncheck- pfBlockerNG Enable
- Keep Settings Enable
save
wait for it to save
then
check
- pfBlockerNG Enable
- Keep Settings Enable
save
wait for it to save
then
force reload all
-
-
@Laxarus This worked for me as well. Though I had to search the web how to edit the file (the easiest way).
Therefore:
Addition for anyone struggling to find where to edit files on your pfsense system.
Go to Diagnostics --> Edit File --> insert the location of the file:
/usr/local/pkg/pfblockerng/pfblockerng.sh
Go to line number 1232 by filling it in the Go to line field.
That line should read:
s1="$(grep -cv ^${ip_placeholder2}$ ${masterfile})"
replace only (leave the rest intact):
masterfile
to
mastercat
Then follow the above instructions from @Laxarus https://forum.netgate.com/post/1219635
-
-
Ran into this issue today as well running on 25.07.1 with pfblockerNG-devel 3.2.7. Followed the steps outlined in this thread to edit the
pfblockerng.sh
file, then deleted/force reloaded all the lists, and all was well again. Thank you everyone in this thread for your your help and great instructions. -
@BBcan177 said in New pfblockerNG install Database Sanity check Failed:
From:
s1="$(grep -cv ^${ip_placeholder2}$ ${masterfile})"To:
s1="$(grep -cv ^${ip_placeholder2}$ ${mastercat})"Is it possible to update the pfSense package with a bug fix version?
-
FYI, this bug is still present on pfSense v2.8.1-RC and pfBlockerNG-devel v3.2.8