pfSense with pfBlockerNG: "Starting dns resolver" slow/hang boot: fix

Logging this one here. I had a good last few days of setup progress. Then sudden a reboot of pfsense and the boot stalled at “starting DNS resolver”.

After disabling packages and reverting to an old backup, the problem was still there. Eventually I realized before I had improperly shut down pfSense about 3 days ago when I powered off the rack and forgetting to shut down the firewall, it created an issue with /var/unbound/pfb_dnsbl.conf

Ultimately, the solution was to remove it and create an empty file, probably corrupted during hard-power off:

cp /var/unbound/pfb_dnsbl.conf /root/ && rm /var/unbound/pfb_dnsbl.conf && touch /var/unbound/pfb_dnsbl.conf

Then reboot.

Then also switch to “unbound python mode” which uses SQLite instead of text file:

Disable the DNS relay logging (extra disk IO/CPU)

Ref:

I also found today that sometimes when you restore from a backup, it creates a slow boot that does not go away. In my case, it would spend about 30 seconds on slow starting package system patches.

To fix: Head to package manager:

And instead of using the “reinstall package” option. Manually “remove” (click the trashcan icon) and then install all packages again.

ALL your settings will remain. Then reboot. The blocking during boot when loading packages starts should now be gone!

This does not happen every time I restore, but sometimes, not sure why.