Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    PfBlockerNG v2.0 w/DNSBL

    Scheduled Pinned Locked Moved pfBlockerNG
    1.1k Posts 192 Posters 1.7m Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • QinnQ
      Qinn
      last edited by

      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_vga

      Crash 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:728

      Filename: /var/crash/minfree
      2048

      Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
      Firmware: Latest-stable-pfSense CE (amd64)
      Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

      1 Reply Last reply Reply Quote 0
      • RonpfSR
        RonpfS
        last edited by

        @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

        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.

        2.4.5-RELEASE-p1 (amd64)
        Intel Core2 Quad CPU Q8400 @ 2.66GHz 8GB
        Backup 0.5_5, Bandwidthd 0.7.4_4, Cron 0.3.7_5, pfBlockerNG-devel 3.0.0_16, Status_Traffic_Totals 2.3.1_1, System_Patches 1.2_5

        1 Reply Last reply Reply Quote 0
        • QinnQ
          Qinn
          last edited by

          @RonpfS:

          @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

          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 Europe

          Fatal 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:728

          PHP 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

          Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
          Firmware: Latest-stable-pfSense CE (amd64)
          Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

          1 Reply Last reply Reply Quote 0
          • ?
            Guest
            last edited by

            @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_vga

            Crash 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:728

            Filename: /var/crash/minfree
            2048

            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.

            1 Reply Last reply Reply Quote 0
            • RonpfSR
              RonpfS
              last edited by

              @Qinn:

              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.

              2.4.5-RELEASE-p1 (amd64)
              Intel Core2 Quad CPU Q8400 @ 2.66GHz 8GB
              Backup 0.5_5, Bandwidthd 0.7.4_4, Cron 0.3.7_5, pfBlockerNG-devel 3.0.0_16, Status_Traffic_Totals 2.3.1_1, System_Patches 1.2_5

              1 Reply Last reply Reply Quote 0
              • RonpfSR
                RonpfS
                last edited by

                @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?

                2.4.5-RELEASE-p1 (amd64)
                Intel Core2 Quad CPU Q8400 @ 2.66GHz 8GB
                Backup 0.5_5, Bandwidthd 0.7.4_4, Cron 0.3.7_5, pfBlockerNG-devel 3.0.0_16, Status_Traffic_Totals 2.3.1_1, System_Patches 1.2_5

                1 Reply Last reply Reply Quote 0
                • QinnQ
                  Qinn
                  last edited by

                  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.

                  Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
                  Firmware: Latest-stable-pfSense CE (amd64)
                  Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

                  1 Reply Last reply Reply Quote 0
                  • QinnQ
                    Qinn
                    last edited by

                    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

                    Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
                    Firmware: Latest-stable-pfSense CE (amd64)
                    Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

                    1 Reply Last reply Reply Quote 0
                    • RonpfSR
                      RonpfS
                      last edited by

                      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 ?

                      2.4.5-RELEASE-p1 (amd64)
                      Intel Core2 Quad CPU Q8400 @ 2.66GHz 8GB
                      Backup 0.5_5, Bandwidthd 0.7.4_4, Cron 0.3.7_5, pfBlockerNG-devel 3.0.0_16, Status_Traffic_Totals 2.3.1_1, System_Patches 1.2_5

                      1 Reply Last reply Reply Quote 0
                      • QinnQ
                        Qinn
                        last edited by

                        https://forum.pfsense.org/index.php?topic=116305.0

                        https://forum.pfsense.org/index.php?topic=116307.0

                        Problem seems to be spreading…

                        Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
                        Firmware: Latest-stable-pfSense CE (amd64)
                        Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

                        1 Reply Last reply Reply Quote 0
                        • V
                          vbentley
                          last edited by

                          @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.

                          Trademark Attribution and Credit
                          pfSense® and pfSense Certified® are registered trademarks of Electric Sheep Fencing, LLC in the United States and other countries.

                          1 Reply Last reply Reply Quote 0
                          • G
                            Gerard64
                            last edited by

                            Same here with 4gb ram.

                            I tried to reinstall Pfblocker but no luck now it doesn't even show up anymore under Firewall menu item.
                            Before I reinstalled it hanged constantly on update the lists.

                            1 Reply Last reply Reply Quote 0
                            • RonpfSR
                              RonpfS
                              last edited by

                              Well during installation pfBlockerNG download the MaxMind GeoIP database … it probably crashes and the installation doesn't complete.  :o

                              2.4.5-RELEASE-p1 (amd64)
                              Intel Core2 Quad CPU Q8400 @ 2.66GHz 8GB
                              Backup 0.5_5, Bandwidthd 0.7.4_4, Cron 0.3.7_5, pfBlockerNG-devel 3.0.0_16, Status_Traffic_Totals 2.3.1_1, System_Patches 1.2_5

                              1 Reply Last reply Reply Quote 0
                              • Q
                                q54e3w
                                last edited by

                                do you see stability if you reduce the number of lists you have active? My 16GB runs along fine at 40% utilisation with a fair few lists thrown at it and I recall from my casual observation it uses more whilst it processes them too.

                                1 Reply Last reply Reply Quote 0
                                • ?
                                  Guest
                                  last edited by

                                  @RonpfS:

                                  @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?

                                  No, there was no error messages during the reinstall, removal or installation. But, the weird thing is that although pfSense said the installation (or the reinstallation) was a success, pfBlockerNG was nowhere to be found; in the menus nor in the service status, watchdog, etc. So, I  assume that it didn't install properly. But the dashboard says that only 20% of the RAM is used, so I doubt that this is a memory issue. Plus, I have been using pfBlockerNG on this same hardware for some time, so unless the last version has changed something drastically 1GB has been fine.
                                  Meanwhile, I restored a raw copy backup of my system prior to 2.3.2 upgrade. That works like a charm. It has pfBlockerNG 2.0.17 on pfSense 2.3.1-p5 (i386). PfBlocker definitely works as it blocks access to and from China, Russia, etc.
                                  So, until the dust settles oldies are the best way to go for me.

                                  1 Reply Last reply Reply Quote 0
                                  • G
                                    Gerard64
                                    last edited by

                                    Here is always worked fine with my 4GB of ram but since the last update it started to give problems i disbaled PFblocker for now and wait maybe it get fixed if not then i gave to sadly uninstall uninstall.

                                    1 Reply Last reply Reply Quote 0
                                    • RonpfSR
                                      RonpfS
                                      last edited by

                                      Here is a fix for the MaxMind errors https://forum.pfsense.org/index.php?topic=116307.msg644910#msg644910
                                      please use that thread for this issue

                                      2.4.5-RELEASE-p1 (amd64)
                                      Intel Core2 Quad CPU Q8400 @ 2.66GHz 8GB
                                      Backup 0.5_5, Bandwidthd 0.7.4_4, Cron 0.3.7_5, pfBlockerNG-devel 3.0.0_16, Status_Traffic_Totals 2.3.1_1, System_Patches 1.2_5

                                      1 Reply Last reply Reply Quote 0
                                      • G
                                        Gerard64
                                        last edited by

                                        Above tip of Ronpfs worked.
                                        But after the last re-install of pfblocker it didn't reinstall correct. It doesn't show up in the menu and it gives a error at the end of the reinstall.

                                        pkg: POST-INSTALL script failed

                                        Is there a way i can install a previous version of pfblocker?

                                        1 Reply Last reply Reply Quote 0
                                        • RonpfSR
                                          RonpfS
                                          last edited by

                                          @Gé:

                                          Above tip of Ronpfs worked.
                                          But after the last re-install of pfblocker it didn't reinstall correct. It doesn't show up in the menu and it gives a error at the end of the reinstall.

                                          pkg: POST-INSTALL script failed

                                          Is there a way i can install a previous version of pfblocker?

                                          I do not think you can revert to a previous version  :(
                                          And even with the previous version it would be the same as the change comes from MaxMind GeoIP change, not from pfblockerNG code.

                                          Can you try https://forum.pfsense.org/index.php?topic=115966.0

                                          2.4.5-RELEASE-p1 (amd64)
                                          Intel Core2 Quad CPU Q8400 @ 2.66GHz 8GB
                                          Backup 0.5_5, Bandwidthd 0.7.4_4, Cron 0.3.7_5, pfBlockerNG-devel 3.0.0_16, Status_Traffic_Totals 2.3.1_1, System_Patches 1.2_5

                                          1 Reply Last reply Reply Quote 0
                                          • G
                                            Gerard64
                                            last edited by

                                            Thank you again Ronpfs.
                                            I did what you suggested on that other thread it did not work. I increased to 750M but no joy :(

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.