pfBlockerNG Cannot Allocate Memory errors

Hi all. New to the forums, but have been enjoying Tom’s videos for the last year+. I have a Netgate SG3100 running pfSense with pfBlockerNG. I periodically get errors like this one:

There were error(s) loading the rules: /tmp/rules.debug:31: cannot define table pfB_Europe_v4: Cannot allocate memory - The line in question reads [31]: table <pfB_Europe_v4> persist file “/var/db/aliastables/pfB_Europe_v4.txt”

Googling this, I found people recommend increasing “Firewall Maximum Table Entries” in System > Advanced > Firewall & NAT from its default to 400000 (or more). I’ve tried this. I even went as high as 900000 but the error still persists. Any ideas? Did I do something wrong?

Thanks in advance,
Mike

Try increasing it more, sounds like it is still exceeding the table size.

I’ve increased it 10x over the previous setting (its now 4000000). No difference. I would think at the very least, that this would change which file and line the system has a problem loading, but it still reports the same file and line. The problem has to be elsewhere, I would think. Or there is some kind of problem in that pfB_Europe_v4.txt file? I wonder if uninstalling and then reinstalling pfBlocker would delete that file?

The file should get updated automatically, but in case something is stuck you can try that.

1 Like

I had this same issue the other day after added 1 new rule manually. It appeared to have broken a lot of my things until I doubled the maximum table entries. I also increased the maximum states.

Finally, I ended up disabling all pfBlockerRules under the firewall section, applying, and then rebooting. Once it booted back up I turned them back on, applied, and rebooted again. Error went away.

Hope this helps you because it was driving me nuts that adding only one rule broke a bunch of my rules.

2 Likes

Thanks Mike. I will be giving this a try. The problem started for me after either adding or editing a rule. I can’t remember which. But it sounds like a similar issue. I will report back what I find out.

2 Likes