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

    pfBlockerNG-devel v3.0.0 - No longer bound by Unbound!

    Scheduled Pinned Locked Moved pfBlockerNG
    94 Posts 27 Posters 78.3k 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.
    • provelsP
      provels @BBcan177
      last edited by

      @bbcan177
      Must have been a personal problem. Rebooted the FW, GUI still offered upgrade to _2 when _3 was already installed. Did pkg upgrade from shell, offered _2 to _3. Went ahead and installed, seems fine now. Go figure.

      Peder

      MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
      BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

      1 Reply Last reply Reply Quote 0
      • BBcan177B
        BBcan177 Moderator @asmodeus
        last edited by

        @asmodeus said in pfBlockerNG-devel v3.0.0 - No longer bound by Unbound!:

        @bbcan177 After upgrading to 3.0.0_3 whitelisting domains from the list of blocked domains (e.g. /pfblockerng/pfblockerng_alerts.php?filterdnsbl=DNSBL_Malicious2) no longer worked - getting 504 Gateway Time-out errors after selecting the domain to whitelist and providing the options (wildcard or not etc.)
        The entire UI is unresponsive after that and I can get it back up again via ssh with /etc/rc.php-fpm_restart. I have rolled back to 3.0.0_2 but I still have this issue.
        Any ideas on what the issue might be?

        There are two different things here.

        1. Whitelisting
        2. Filtering the Alerts tab.

        The URL that you posted is for Filtering events, not whitelisting? Write out the steps you took so I can try to reproduce.
        It could just be a browser timeout issue if you are trying to view a lot of events? In Alert Settings, what did you set the DNSBL Events number to?

        "Experience is something you don't get until just after you need it."

        Website: http://pfBlockerNG.com
        Twitter: @BBcan177  #pfBlockerNG
        Reddit: https://www.reddit.com/r/pfBlockerNG/new/

        A 1 Reply Last reply Reply Quote 0
        • F
          fmroeira86 @BBcan177
          last edited by

          @bbcan177 said in pfBlockerNG-devel v3.0.0 - No longer bound by Unbound!:

          @fmroeira86 said in pfBlockerNG-devel v3.0.0 - No longer bound by Unbound!:

          Thank you for your effort!
          Everytime I do a RELOAD the skew on the backup CARP gets its value set to 0.
          This causes the backup machine holding as CARP master when the Master machine comes online again.
          I'm running 3.0.0_2

          Did you update the package on all Nodes?
          Did you set the SKEW on all nodes correctly?

          The package should not be syncing the SKEW to the other nodes.

          See the relevant code here:
          https://github.com/pfsense/FreeBSD-ports/blob/devel/net/pfSense-pkg-pfBlockerNG-devel/files/usr/local/pkg/pfblockerng/pfblockerng.inc#L9349-L9352

          Yes.

          I'm running the latest version and My main node ovewrites the skew to the secondary one.

          BBcan177B 1 Reply Last reply Reply Quote 0
          • BBcan177B
            BBcan177 Moderator @fmroeira86
            last edited by

            @fmroeira86

            Ok I see the issue.

            As reference:
            https://github.com/pfsense/FreeBSD-ports/blob/devel/net/pfSense-pkg-pfBlockerNG-devel/files/usr/local/pkg/pfblockerng/pfblockerng.inc#L9350-L9351

            Can you edit the file: /usr/local/pkg/pfblockerng/pfblockerng.inc, Lines 9350 and 9351

            From:

            // Remove CARP Advskew setting, if found
            if (isset($xml['pfblockerngdnsblsettings']['pfb_dnsvip_skew'])) {
                unset($xml['pfblockerngdnsblsettings']['pfb_dnsvip_skew']);
            }
            

            To:

            // Remove CARP Advskew setting, if found
            if (isset($xml['pfblockerngdnsblsettings' ]['config'][0]['pfb_dnsvip_skew'])) {
               unset($xml['pfblockerngdnsblsettings']['config'][0]['pfb_dnsvip_skew']);
            }
            

            I missed adding ['config'][0] to each of those two lines... Sorry about that...

            "Experience is something you don't get until just after you need it."

            Website: http://pfBlockerNG.com
            Twitter: @BBcan177  #pfBlockerNG
            Reddit: https://www.reddit.com/r/pfBlockerNG/new/

            F 1 Reply Last reply Reply Quote 0
            • A
              asmodeus @BBcan177
              last edited by asmodeus

              @bbcan177 said in pfBlockerNG-devel v3.0.0 - No longer bound by Unbound!:

              The URL that you posted is for Filtering events, not whitelisting? Write out the steps you took so I can try to reproduce.

              Sure:

              1. Coming from the pfBlockerNG dashboard on my Status/Dashboard page, I use the alerts link to review blocked domains in a list. The link points to /pfblockerng/pfblockerng_alerts.php?filterdnsbl=DNSBL_Malicious2
              2. Using this list (which takes a while to load) I want to whitelist a domain, so I click on the 'plus' sign to start the process.
              3. I specify wildcard no, add description no.
              4. Page loads for a while and ultimately I am getting the nginx timeout. (Even when this worked it takes 110 seconds or more to complete)
              5. The page I attempted to whitelist is NOT whitelisted.
              6. The entire pfsense UI is unresponsive at this point and I resolve by restarting php-fpm via ssh

              The Log Settings are set to default (20000 lines), and the Alert Settings are set to default:1000 Stat Table entries and 100 Filter Limit. Are these the Alert Settings you were asking about?

              BBcan177B 1 Reply Last reply Reply Quote 0
              • BBcan177B
                BBcan177 Moderator @asmodeus
                last edited by

                @asmodeus said in pfBlockerNG-devel v3.0.0 - No longer bound by Unbound!:

                and the Alert Settings are set to default:1000 Stat Table entries and 100 Filter Limit. Are these the Alert Settings you were asking about?

                From the Reports/Alerts tab, click the "+" on the right side of the page to open the "Alert Settings", the default for "Filter Limit Entries" is 100.

                If you set it too high, you need to wait for the whole page to finish loading before trying to Whitelist.

                There is also a new option in the Reports tab to "Pause" the auto page refresh. Its at the left side of each table heading.

                "Experience is something you don't get until just after you need it."

                Website: http://pfBlockerNG.com
                Twitter: @BBcan177  #pfBlockerNG
                Reddit: https://www.reddit.com/r/pfBlockerNG/new/

                A 1 Reply Last reply Reply Quote 0
                • A
                  asmodeus @BBcan177
                  last edited by

                  @bbcan177 said in pfBlockerNG-devel v3.0.0 - No longer bound by Unbound!:

                  From the Reports/Alerts tab, click the "+" on the right side of the page to open the "Alert Settings", the default for "Filter Limit Entries" is 100.

                  Got it, that's what Filter Limit Entres is set to for me - 100. Is there a chance to speed up loading of this page before/after whitelisting?

                  1 Reply Last reply Reply Quote 0
                  • F
                    fmroeira86 @BBcan177
                    last edited by

                    @bbcan177 said in pfBlockerNG-devel v3.0.0 - No longer bound by Unbound!:

                    @fmroeira86

                    Ok I see the issue.

                    As reference:
                    https://github.com/pfsense/FreeBSD-ports/blob/devel/net/pfSense-pkg-pfBlockerNG-devel/files/usr/local/pkg/pfblockerng/pfblockerng.inc#L9350-L9351

                    Can you edit the file: /usr/local/pkg/pfblockerng/pfblockerng.inc, Lines 9350 and 9351

                    From:

                    // Remove CARP Advskew setting, if found
                    if (isset($xml['pfblockerngdnsblsettings']['pfb_dnsvip_skew'])) {
                        unset($xml['pfblockerngdnsblsettings']['pfb_dnsvip_skew']);
                    }
                    

                    To:

                    // Remove CARP Advskew setting, if found
                    if (isset($xml['pfblockerngdnsblsettings' ]['config'][0]['pfb_dnsvip_skew'])) {
                       unset($xml['pfblockerngdnsblsettings']['config'][0]['pfb_dnsvip_skew']);
                    }
                    

                    I missed adding ['config'][0] to each of those two lines... Sorry about that...

                    Thank you.

                    Is this fix going to be released in the next version?

                    BBcan177B F 2 Replies Last reply Reply Quote 0
                    • BBcan177B
                      BBcan177 Moderator @fmroeira86
                      last edited by

                      @fmroeira86 said in pfBlockerNG-devel v3.0.0 - No longer bound by Unbound!:

                      Thank you.
                      Is this fix going to be released in the next version?

                      Once you confirm that it works :)

                      "Experience is something you don't get until just after you need it."

                      Website: http://pfBlockerNG.com
                      Twitter: @BBcan177  #pfBlockerNG
                      Reddit: https://www.reddit.com/r/pfBlockerNG/new/

                      1 Reply Last reply Reply Quote 0
                      • F
                        fmroeira86 @fmroeira86
                        last edited by

                        @fmroeira86 said in pfBlockerNG-devel v3.0.0 - No longer bound by Unbound!:

                        if (isset($xml['pfblockerngdnsblsettings' ]['config'][0]['pfb_dnsvip_skew'])) {
                        unset($xml['pfblockerngdnsblsettings']['config'][0]['pfb_dnsvip_skew']);

                        Made the changes you suggested but it is not working.
                        Skew still gets to 0 on the secondary machine.

                        1 Reply Last reply Reply Quote 0
                        • Bob.DigB
                          Bob.Dig LAYER 8
                          last edited by Bob.Dig

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • M
                            mcury
                            last edited by

                            Since the update to 3.0, cpu usage went down considerable, also the sg-3100 temps.
                            Really nice work..

                            2d8e7a57-2223-4b70-9ff7-8075faba87f6-image.png

                            dead on arrival, nowhere to be found.

                            1 Reply Last reply Reply Quote 2
                            • A
                              axellarsson
                              last edited by

                              Hi BBcan177,

                              Thanks for the 3.0 release!

                              I'm currently not using the Python module since I have unbound views set up to only include the DNSBL configuration for certain subnets. However, I also have a custom Python module loaded to filter out AAAA responses from a number of Netflix domains and subdomains (works around an issue with IPv6 tunnelbrokers being blocked by Netflix as proxies).

                              Presently, when pfBlockerNG-devel is set to Unbound mode it resets my Unbound Python module settings every hour when it refreshes. Is there any way to get it to coexist with my own Python module and remain in Unbound mode? (I understand that this will preclude me from using the pfBlockerNG Python module in the future since pfSense's unbound configuration only supports one Python module, but for the moment I'd rather live with that limitation and use pfBlockerNG in Unbound mode while maintaining my current custom Python configuration).

                              Thanks!

                              GertjanG RonpfSR 2 Replies Last reply Reply Quote 0
                              • GertjanG
                                Gertjan @axellarsson
                                last edited by Gertjan

                                @axellarsson

                                This is what you can do : edit : /usr/local/pkg/pfblockerng/pfblockerng.inc : lines 2025 and up :

                                		// Remove python settings from DNS Resolver configuration
                                		if (isset($config['unbound']['python'])) {
                                //			unset($config['unbound']['python']);
                                //			$config['unbound']['python_order']	= '';
                                //			$config['unbound']['python_script']	= '';
                                
                                			$log = 'KEEPING DNSBL Unbound admin added python script';
                                

                                Add in front of lines 2027 - 2028 - 2029 the "//"
                                Change line 2031 so it shows a text in the update log what it is doing.

                                So, 4 lines need minor editing. The last one is even not strictly needed.

                                Now your unbound python settings like :

                                d44b7395-ecb2-43c9-bfd7-53e4e41c3ab9-image.png

                                persists when pfBlockerNG 'does it things'.

                                Your own no-aaaa script gets loaded by unbound as before :

                                f8fe3e99-f760-42ea-980a-d915162dd4e9-image.png

                                This line shows in the log because I modified the original no-aaaa script to show this line at init/start of the script.

                                When "views" gets integrated into pfBlockerNG, you should be able to switch to the new Python mode, uses views and use the build in 'no-aaaa' facility.

                                See this as a temporary patch that gives you the possibility to use your own no-aaaa script while you use pfBlockerNG in unbound mode != python mode.
                                Right now, true, if pfBlockerNG is put in unbound mode, it removes / deactivates unbound own python settings.

                                No "help me" PM's please. Use the forum, the community will thank you.
                                Edit : and where are the logs ??

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

                                  @axellarsson Or use the Python mode with no AAAA setting  Screenshot_2020-12-22 pf100se ici - Firewall pfBlockerNG DNSBL.png

                                  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
                                  • J
                                    j.koopmann
                                    last edited by

                                    @BBcan177 thanks for this release. I just installed it. Looks like it is working BUT in the reports tab suddenly Source and IF is "unknown" which was not the case before the upgrade. Any idea?

                                    I am on pfsense 2.4.5 and pfblocker-ng 3.0.0_7

                                    BBcan177B 1 Reply Last reply Reply Quote 0
                                    • BBcan177B
                                      BBcan177 Moderator @j.koopmann
                                      last edited by

                                      @j-koopmann

                                      pfSense 2.4.5 uses Unbound v1.10.1 which has a regression that fails to pass some information to the python modules. It has been fixed, but there is no way to upgrade Unbound to v.1.12.0 in pfSense 2.4.5.

                                      In pfSense 2.5, it has Unbound v1.13.0.

                                      For the DNSBL Blocking part, you can enable the checkbox in the DNSBL Tab > DNSBL Event Logging , and that will stop the python integration from logging, and use the DNSBL Webserver to log the events. Unfortunately, that is only limited to HTTP events.

                                      And for DNS Reply logging, there is no other workaround.

                                      Not much I can do unfortunately.

                                      "Experience is something you don't get until just after you need it."

                                      Website: http://pfBlockerNG.com
                                      Twitter: @BBcan177  #pfBlockerNG
                                      Reddit: https://www.reddit.com/r/pfBlockerNG/new/

                                      J JeGrJ 2 Replies Last reply Reply Quote 0
                                      • J
                                        j.koopmann @BBcan177
                                        last edited by

                                        @bbcan177 Thanks for the prompt reply.

                                        I am willing to experiment but from what I just read 2.5 is not that close to be production ready (or is your experience different?).

                                        Sad that no solution exists for upgrading unbound but that is not you fault of course. I changed to DNSBL Event Logging. What are typical "non http events" and am I missing them completely then (which would make debugging quit interesting).

                                        What do you mean with DNS Reply logging?

                                        Sorry for the stupid questions.

                                        BBcan177B 1 Reply Last reply Reply Quote 0
                                        • BBcan177B
                                          BBcan177 Moderator @j.koopmann
                                          last edited by

                                          @j-koopmann said in pfBlockerNG-devel v3.0.0 - No longer bound by Unbound!:

                                          I am willing to experiment but from what I just read 2.5 is not that close to be production ready (or is your experience different?).

                                          pfSense 2.5 is nearing RC status.

                                          Sad that no solution exists for upgrading unbound but that is not you fault of course. I changed to DNSBL Event Logging. What are typical "non http events" and am I missing them completely then (which would make debugging quit interesting).
                                          What do you mean with DNS Reply logging?
                                          Sorry for the stupid questions.

                                          DNS Reply logging will not show the Source IP/Hostname in pfSense < 2.5 as there is a regression in Unbound.

                                          "Experience is something you don't get until just after you need it."

                                          Website: http://pfBlockerNG.com
                                          Twitter: @BBcan177  #pfBlockerNG
                                          Reddit: https://www.reddit.com/r/pfBlockerNG/new/

                                          B 1 Reply Last reply Reply Quote 1
                                          • B
                                            bruor @BBcan177
                                            last edited by

                                            @bbcan177 I might have found a bug with IPv6 DNSBL. When I have it enabled, it creates a VIP on the LAN interface, but it seems to block the ability for "track interface" to work. If I disable IPv6 DNSBL, the LAN gets an IPv6 address as expected.

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