PfBlockerNG v2.0 w/DNSBL
-
https://forum.pfsense.org/index.php?topic=115357.msg643944#msg643944
@lpallard:
There were error(s) loading the rules: /tmp/rules.debug:37: cannot define table pfB_Europe_v6: Cannot allocate memory - The line in question reads [37]: table <pfB_Europe_v6> persist file "/var/db/aliastables/pfB_Europe_v6.txt" @ 2016-07-31 14:55:00 There were error(s) loading the rules: /tmp/rules.debug:37: cannot define table pfB_Europe_v6: Cannot allocate memory - The line in question reads [37]: table <pfB_Europe_v6> persist file "/var/db/aliastables/pfB_Europe_v6.txt" @ 2016-07-31 14:55:11 There were error(s) loading the rules: /tap/rules.debug:37: cannot define table pfB_Europe_v6: Cannot allocate memory - The line in question reads [37]: table <pfB_Europe_v6> persist file "/var/db/aliastables/pfB_Europe_v6.txt" @ 2016-07-31 14:55:20
These all seem to be related to the MaxMind IPv6 database. Looks like you will need to bump the pfSense max aliastable entries limit from 2M to 4M. If you enable aggregation in the general tab, it should condense the CIDRs and reduce the overall IP count. This changed due to using the new MaxMind Geolite2 database which seems to have smaller subsets of the data listed causing more IP entries to be added.
-
https://forum.pfsense.org/index.php?topic=115357.msg643944#msg643944
@lpallard:
There were error(s) loading the rules: /tmp/rules.debug:37: cannot define table pfB_Europe_v6: Cannot allocate memory - The line in question reads [37]: table <pfB_Europe_v6> persist file "/var/db/aliastables/pfB_Europe_v6.txt" @ 2016-07-31 14:55:00 There were error(s) loading the rules: /tmp/rules.debug:37: cannot define table pfB_Europe_v6: Cannot allocate memory - The line in question reads [37]: table <pfB_Europe_v6> persist file "/var/db/aliastables/pfB_Europe_v6.txt" @ 2016-07-31 14:55:11 There were error(s) loading the rules: /tap/rules.debug:37: cannot define table pfB_Europe_v6: Cannot allocate memory - The line in question reads [37]: table <pfB_Europe_v6> persist file "/var/db/aliastables/pfB_Europe_v6.txt" @ 2016-07-31 14:55:20
These all seem to be related to the MaxMind IPv6 database. Looks like you will need to bump the pfSense max aliastable entries limit from 2M to 4M. If you enable aggregation in the general tab, it should condense the CIDRs and reduce the overall IP count. This changed due to using the new MaxMind Geolite2 database which seems to have smaller subsets of the data listed causing more IP entries to be added.
Thanks for the response. Are you saying that I should change the…
Firewall Maximum Table Entries: 2000000
to
Firewall Maximum Table Entries: 4000000
I just wanted to make sure I'm changing the right thing. Also, when the cron jobs were running, I saw something with some large numbers of maybe the 200000 and I was at something like 150000... Sorry I didn't make note of it.
Thanks!
-
Thanks for the response. Are you saying that I should change the…
Firewall Maximum Table Entries: 2000000
to
Firewall Maximum Table Entries: 4000000
I just wanted to make sure I'm changing the right thing.
This looks like it ;)
Firewall Maximum Table Entries : Maximum number of table entries for systems such as aliases, sshlockout, snort, etc, combined.Also, when the cron jobs were running, I saw something with some large numbers of maybe the 200000 and I was at something like 150000… Sorry I didn't make note of it.
Thanks!
You can review the log file by going to the Firewall/pfBlockerNG/Log Browser tab
-
Thanks for the response. Are you saying that I should change the…
Firewall Maximum Table Entries: 2000000
to
Firewall Maximum Table Entries: 4000000
I just wanted to make sure I'm changing the right thing.
This looks like it ;)
Firewall Maximum Table Entries : Maximum number of table entries for systems such as aliases, sshlockout, snort, etc, combined.Also, when the cron jobs were running, I saw something with some large numbers of maybe the 200000 and I was at something like 150000… Sorry I didn't make note of it.
Thanks!
You can review the log file by going to the Firewall/pfBlockerNG/Log Browser tab
Thanks. I saw that 20000 number get changed to 40000-something so I think it's working. Hopefully this will fix it!
I've been having some issues lately so I'm hoping that maybe this clears up some of the problems. I think it's snort related, as the problems ceased when I stopped snort for a few days.
-
Hi there is it possible to save and restore the pfBlockerNG settings at a certain phase, so when you mess up you can return to a previous setup?
Every change in pfBlockerNG is saved in the config file.
You can save the config with Diagnostics/Backup & Restore/Backup & Restore and do a restore of the config at a later time.
Thanks for the reply, but I was hoping for a separate config file, as far as I can see there is none.
-
I just updated the pfBlockerNG package and I'm now receiving these errors when I reboot…
There were error(s) loading the rules: /tmp/rules.debug:47: cannot define table pfB_Europe_v6: Cannot allocate memory - The line in question reads [47]: table <pfB_Europe_v6> persist file "/var/db/aliastables/pfB_Europe_v6.txt" @ 2016-07-31 12:37:54 There were error(s) loading the rules: /tmp/rules.debug:47: cannot define table pfB_Europe_v6: Cannot allocate memory - The line in question reads [47]: table <pfB_Europe_v6> persist file "/var/db/aliastables/pfB_Europe_v6.txt" @ 2016-07-31 12:39:58 There were error(s) loading the rules: /tmp/rules.debug:47: cannot define table pfB_Europe_v6: Cannot allocate memory - The line in question reads [47]: table <pfB_Europe_v6> persist file "/var/db/aliastables/pfB_Europe_v6.txt" @ 2016-07-31 12:40:37
I'm running pfBlockerNG 2.1.1_2 with PfSense 2.3.2-RELEASE (amd64). I have 2gb of memory and 34% in use with a 2gb swap and 0% in use (for the swap).
I'm assuming it's not a memory issue and possibly something else. I was wondering if anybody else had this issue and what a possible fix may be.
Thanks!
I have a huge issue with the last update as well. It eats memory like a banshee in a matter of minutes! I have 16Gb and it fills it to the brim then gives me the same errors, can't load rules.
-
I have a huge issue with the last update as well. It eats memory like a banshee in a matter of minutes!
Are you using the new DNSBL TLD feature?
-
Did you raise the Firewall Maximum Table Entries?
How many IPs are blocked ? Did you enabled De-Duplication? CIDR Aggregation? Suppression?If you are using DNSBL, how many domains does it reports after a Force Reload?
Suppressing a Domain in the Alert Tab will consume memory.What do you see in the log file during Update ?
Provide more info on you setup so we can pinpoint the issue. -
I used DNSBL before but have disabled it at the moment.
Is it correct I can still ping the virtual IP address (default: 10.10.10.1) even after disabling DNSBL?[UPDATE]
I uninstalled pfBlockerNG and unticked the box that says "keep settings".
After that I re-installed pfBlockerNG and configured everything without enabling DNSBL.
The virtual IP assigned to DNSBL is not pingable now. I "fixed" the problem myself. 8) -
Got a crash report running on 2.3.2-RELEASE (i386) with pfBlockerNG 2.1.1_2 with only DNSBL setup according to advise #18 (https://forum.pfsense.org/index.php?topic=102470.15), btw having enabled Alexa with 1K set.
Thanks for any help/advise cheers Qinn
Crash report begins. Anonymous machine information:
i386
10.3-RELEASE-p5
FreeBSD 10.3-RELEASE-p5 #0 7307492(RELENG_2_3_2): Tue Jul 19 14:11:41 CDT 2016 root@ce23-i386-builder:/builder/pfsense-232/tmp/obj/builder/pfsense-232/tmp/FreeBSD-src/sys/pfSense_wrap_vgaCrash report details:
PHP Errors:
[03-Aug-2016 05:06:13] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20 bytes) in /usr/local/www/pfblockerng/pfblockerng.php on line 728
[03-Aug-2016 05:06:13] PHP Stack trace:
[03-Aug-2016 05:06:13] PHP 1. {main}() /usr/local/www/pfblockerng/pfblockerng.php:0
[03-Aug-2016 05:06:13] PHP 2. pfblockerng_get_countries() /usr/local/www/pfblockerng/pfblockerng.php:105
[03-Aug-2016 05:06:13] PHP 3. explode() /usr/local/www/pfblockerng/pfblockerng.php:728Filename: /var/crash/minfree
2048 -
Got a crash report running on 2.3.2-RELEASE (i386) with pfBlockerNG 2.1.1_2 with only DNSBL setup according to advise #18 (https://forum.pfsense.org/index.php?topic=102470.15), btw having enabled Alexa with 1K set.
Thanks for any help/advise cheers Qinn
Can you run from Shell
php /usr/local/www/pfblockerng/pfblockerng.php dc
That will download the latest MaxMind as it did that yesterday (first tue of each month). Looks like you may have ran out of memory. How much memory do you have in the box?
You can also look in the Firewall/pfBlockerNG/Log Browser at the extra.log or pfBlockerNG.log file.
-
Got a crash report running on 2.3.2-RELEASE (i386) with pfBlockerNG 2.1.1_2 with only DNSBL setup according to advise #18 (https://forum.pfsense.org/index.php?topic=102470.15), btw having enabled Alexa with 1K set.
Thanks for any help/advise cheers Qinn
Can you run from Shell
php /usr/local/www/pfblockerng/pfblockerng.php dc
That will download the latest MaxMind as it did that yesterday (first tue of each month). Looks like you may have ran out of memory. How much memory do you have in the box?
You can also look in the Firewall/pfBlockerNG/Log Browser at the geoip.log or pfBlockerNG.log file.
Took a look at the code with:
sed -n '720,740p' /usr/local/pkg/pfblockerng/pfblockerng.inc
but can't see anything strange?
Second, I followed your advise, here are the results, btw Memory size = 1Gb (1024) usage 18%, during the process below I noticed that Memory usage rose from 16% to 28% and dropped to 17% after the error occurred, as shown below. It seems the process eats RAM and somehow there is a max set for the process.
[2.3.2-RELEASE][root@pfSense.localdomain]/root: php /usr/local/www/pfblockerng/pfblockerng.php dc
Country code update Start [ 08/03/16 13:17:48 ]
Converting MaxMind Country databases for pfBlockerNG.
Processing ISO IPv4 Continent/Country Data
Processing ISO IPv6 Continent/Country Data
Creating pfBlockerNG Continent XML files
IPv4 Africa
IPv6 Africa
IPv4 Antarctica
IPv6 Antarctica
IPv4 Asia
IPv6 Asia
IPv4 Europe
IPv6 EuropeFatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 23 bytes) in /usr/local/www/pfblockerng/pfblockerng.php on line 728
Call Stack:
0.0043 233872 1. {main}() /usr/local/www/pfblockerng/pfblockerng.php:0
397.0779 6345188 2. pfblockerng_get_countries() /usr/local/www/pfblockerng/pfblockerng.php:105
404.0040 38288884 3. explode() /usr/local/www/pfblockerng/pfblockerng.php:728PHP ERROR: Type: 1, File: /usr/local/www/pfblockerng/pfblockerng.php, Line: 728, Message: Allowed memory size of 134217728 bytes exhausted (tried to allocate 23 bytes)
[2.3.2-RELEASE][root@pfSense.localdomain]/root:any advice is welcome,
cheers, Qinn
-
Got a crash report running on 2.3.2-RELEASE (i386) with pfBlockerNG 2.1.1_2 with only DNSBL setup according to advise #18 (https://forum.pfsense.org/index.php?topic=102470.15), btw having enabled Alexa with 1K set.
Thanks for any help/advise cheers Qinn
Crash report begins. Anonymous machine information:
i386
10.3-RELEASE-p5
FreeBSD 10.3-RELEASE-p5 #0 7307492(RELENG_2_3_2): Tue Jul 19 14:11:41 CDT 2016 root@ce23-i386-builder:/builder/pfsense-232/tmp/obj/builder/pfsense-232/tmp/FreeBSD-src/sys/pfSense_wrap_vgaCrash report details:
PHP Errors:
[03-Aug-2016 05:06:13] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20 bytes) in /usr/local/www/pfblockerng/pfblockerng.php on line 728
[03-Aug-2016 05:06:13] PHP Stack trace:
[03-Aug-2016 05:06:13] PHP 1. {main}() /usr/local/www/pfblockerng/pfblockerng.php:0
[03-Aug-2016 05:06:13] PHP 2. pfblockerng_get_countries() /usr/local/www/pfblockerng/pfblockerng.php:105
[03-Aug-2016 05:06:13] PHP 3. explode() /usr/local/www/pfblockerng/pfblockerng.php:728Filename: /var/crash/minfree
2048I have an identical situation except the line "(tried to allocate 20 bytes)" reads 27 bytes. Also, the PHP Errors block repeats itself a few times.
I tried to reinstall pfBlockerNG through the package manager, it claimed to have reinstalled but it no longer shows under the Firewall menu of pfSense. I uninstalled and reinstalled in two steps, again using the package manager, same result. For now I removed the package. My hardware is based on 32 bit N270 and I have 1GB of RAM, tons of HD space.
Prior to upgrading pfSense to 2.3.2 everything worked flawlessly for over a month so I assume that it has something to do with pfSense upgrade. I don't recall when I got pfBlockerNG upgraded.
I hope mine is not an isolated case. -
Second, I followed your advise, here are the results, btw Memory size = 1Gb (1024) usage 18%, during the process below I noticed that Memory usage rose from 16% to 28% and dropped to 17% after the error occurred, as shown below. It seems the process eats RAM and somehow there is a max set for the process.
any advice is welcome,
cheers, Qinn
1GB might be too small since the last MaxMind database change. Can you put more RAM in the box?
I have 2.5GB on my pfsense and I got a crash report :o
This looks like a change at some point in the MaxMind db. So be patient until BBcan177 take a looks at this. -
@haleakalas:
I have an identical situation except the line "(tried to allocate 20 bytes)" reads 27 bytes. Also, the PHP Errors block repeats itself a few times.
I tried to reinstall pfBlockerNG through the package manager, it claimed to have reinstalled but it no longer shows under the Firewall menu of pfSense. I uninstalled and reinstalled in two steps, again using the package manager, same result. For now I removed the package. My hardware is based on 32 bit N270 and I have 1GB of RAM, tons of HD space.
Prior to upgrading pfSense to 2.3.2 everything worked flawlessly for over a month so I assume that it has something to do with pfSense upgrade. I don't recall when I got pfBlockerNG upgraded.
I hope mine is not an isolated case.Maybe it is too late, but did you get any errors while removing or installing pfBlockerNG?
-
Although today 1GB Memory isn't much, maybe the dev's (BBcan177) could be encouraged ;) to find a solution as the pfSense recommended requirements are (https://www.pfsense.org/hardware/) RAM - 1 GB. So I put in a extra 512MB (so now 1,5GB), but I am shit out of luck, again error. Should have guessed it, as even your 2,5GB wasn't enough.
-
Hmmm, I have searched the forum and this error has occurred many times, and never the solution was to increase memory:
https://forum.pfsense.org/index.php?topic=87994.0
https://forum.pfsense.org/index.php?topic=113483.0
https://forum.pfsense.org/index.php?topic=102904.0
https://forum.pfsense.org/index.php?topic=76981.0
-
I get these messages Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 36 bytes)
from time to time with other function in pfsense, when viewing big file or with backup.
And I never found a solution for these.I disabled pfBlockerNG, DSNBL, surricata, reboot, close all pfsense tabs.
This gives me around 1.8GB of free memory, and the pfblockerng.php dc still crashes.Is there someone with more than 2.5GB of memory that doesn't have crash when updating the MaxMind GeoIP db ?
-
https://forum.pfsense.org/index.php?topic=116305.0
https://forum.pfsense.org/index.php?topic=116307.0
Problem seems to be spreading…
-
@oswoldy:
Hi,
I get the crash with 8GB of RAM :(I guess I won't bother installing any more than the 4GB that I currently have installed. I have disabled pfBlockerNG for the time being.