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

    PfBlockerNG 2.1.1_5 / Pfsense 2.4

    Scheduled Pinned Locked Moved pfBlockerNG
    43 Posts 7 Posters 48.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.
    • AhnHELA
      AhnHEL
      last edited by

      I've confirmed that it was deleted, Force Updated and confirmed that it get recreated.

      Recreates the same type of format of key with just Begin and End Private Key.

      Comes up with the same couldnt read x509 certificate error as before when trying to restart

      AhnHEL (Angel)

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

        Can you try to use the pem from another 2.3.2 system an test with it.

        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
        • AhnHELA
          AhnHEL
          last edited by

          Progress!!

          Yup, that let me start the service and its showing up green now, but I'm not seeing any packets being blocked though.

          ****Disregard that, I see some packet drops, its working.  Sweet, thank you.

          AhnHEL (Angel)

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

            Try http://10.10.10.1

            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
            • AhnHELA
              AhnHEL
              last edited by

              Blank page and the browser title bar says 10.10.10.1 (1x1)

              That correct?

              AhnHEL (Angel)

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

                Yes

                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
                • AhnHELA
                  AhnHEL
                  last edited by

                  Thanks again, Ron.  Is this easily resolved for a permanent fix?

                  2.1.1_6?

                  AhnHEL (Angel)

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

                    Can't tell,
                    maybe we will get a patch, or another release, or back to 2.1.1_4, only BBcan177 can tell.

                    But now we know where the problem is.

                    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
                    • BBcan177B
                      BBcan177 Moderator
                      last edited by

                      @RonpfS:

                      Can't tell,
                      maybe we will get a patch, or another release, or back to 2.1.1_4, only BBcan177 can tell.

                      But now we know where the problem is.

                      Testing a patch now… Will update in a day or so...

                      "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
                      • AhnHELA
                        AhnHEL
                        last edited by

                        PM sent, code changes seem to fix the problem perfectly.

                        AhnHEL (Angel)

                        1 Reply Last reply Reply Quote 0
                        • S
                          spartasolutions
                          last edited by

                          Just wanted to chime in for the people trying to get this to work before the patch and wanted a code solution.

                          I at least solved this by modifying pfblockerng.inc to use a created config file. Modification were around ln 937 of pfblockerng.inc in /usr/local/pkg/pfblockerng:

                          before
                          –--------------------

                          exec("/usr/bin/openssl req -new -x509 -keyout {$pfb['dnsbl_cert']} -out {$pfb['dnsbl_cert']} -days 3650 -nodes");
                          

                          after
                          –--------------------

                          		        exec("echo '[req]' > request.cfg");
                          			exec("echo 'default_bits=3072' >> request.cfg");
                          			exec("echo 'default_md=sha256' >> request.cfg");
                          			exec("echo 'prompt=no' >> request.cfg");
                          			exec("echo 'distinguished_name=req_distinguished_name' >> request.cfg");
                          			exec("echo '' >> request.cfg");
                          			exec("echo '[req_distinguished_name]' >> request.cfg");
                          			exec("echo 'commonName=unbound' >> request.cfg");
                          			exec("/usr/bin/openssl req -new -x509 -config request.cfg -keyout {$pfb['dnsbl_cert']} -out {$pfb['dnsbl_cert']} -days 3650 -nodes");
                          			exec("rm -f request.cfg");
                          

                          I'm sure your patch does this far more gracefully however

                          1 Reply Last reply Reply Quote 0
                          • AhnHELA
                            AhnHEL
                            last edited by

                            I failed to post the manual fix by BBcan177 because I thought the patch would have been out relatively quickly but just realized it has been over 2 weeks since the last correspondence involving this.  The following is the instructions BBcan177 gave me to test that worked perfectly.

                            1. Backup file:

                            cp /usr/local/pkg/pfblockerng/pfblockerng.inc /tmp/pfblockerng.inc.bk

                            1. Edit:

                            /usr/local/pkg/pfblockerng/pfblockerng.inc  and remove line 937

                            exec("/usr/bin/openssl req -new -x509 -keyout {$pfb['dnsbl_cert']} -out {$pfb['dnsbl_cert']} -days 3650 -nodes");

                            Here is what Line 937 looks like:
                            https://github.com/pfsense/FreeBSD-ports/blob/devel/net/pfSense-pkg-pfBlockerNG/files/usr/local/pkg/pfblockerng/pfblockerng.inc#L937

                            1. Then at line 937 add the following code:

                            $dn = array (  'countryName'          => 'CA',
                                                                    'stateOrProvinceName'  => 'ST_DNSBL',
                                                                    'localityName'          => 'LN_DNSBL',
                                                                    'organizationName'      => 'ON_DNSBL',
                                                                    'organizationalUnitName'=> 'OU_DNSBL',
                                                                    'commonName'            => 'CN_DNSBL',
                                                                    'emailAddress'          => 'dnsbl@dnsbl.com'
                                                                    );

                            $pkey  = openssl_pkey_new();
                                                    $csr    = openssl_csr_new($dn, $pkey);
                                                    $cert  = openssl_csr_sign($csr, NULL, $pkey, 3650);

                            openssl_pkey_export($pkey, $privatekey);
                                                    openssl_x509_export($cert, $publickey);
                                                    @file_put_contents("{$pfb['dnsbl_cert']}", "{$privatekey}{$publickey}", LOCK_EX);

                            The final changes should look like this:

                            // Create DNSBL SSL certificate
                                            if (!file_exists ("{$pfb['dnsbl_cert']}")) {
                                                    $log = "\nNew DNSBL cert created";
                                                    pfb_logger("{$log}", 1);

                            //exec("/usr/bin/openssl req -new -x509 -keyout {$pfb['dnsbl_cert']} -out {$pfb['dnsbl_cert']} -days 3650 -nodes");

                            $dn = array (  'countryName'          => 'CA',
                                                                    'stateOrProvinceName'  => 'ST_DNSBL',
                                                                    'localityName'          => 'LN_DNSBL',
                                                                    'organizationName'      => 'ON_DNSBL',
                                                                    'organizationalUnitName'=> 'OU_DNSBL',
                                                                    'commonName'            => 'CN_DNSBL',
                                                                    'emailAddress'          => 'dnsbl@dnsbl.com'
                                                                    );

                            $pkey  = openssl_pkey_new();
                                                    $csr    = openssl_csr_new($dn, $pkey);
                                                    $cert  = openssl_csr_sign($csr, NULL, $pkey, 3650);

                            openssl_pkey_export($pkey, $privatekey);
                                                    openssl_x509_export($cert, $publickey);
                                                    @file_put_contents("{$pfb['dnsbl_cert']}", "{$privatekey}{$publickey}", LOCK_EX);
                                            }

                            1. Delete the old PEM file

                            rm /var/unbound/dnsbl_cert.pem

                            1. Goto Update Tab and run a "Force Update" which should rebuild the PEM file

                            2. Check to see if the service is running and that the DNBSL Logs are still working (Alerts Tab)

                            3. Manually try to restart the DNSBL Service to see if its working as expected

                            /usr/local/etc/rc.d/dnsbl.sh restart

                            AhnHEL (Angel)

                            1 Reply Last reply Reply Quote 0
                            • J
                              jase
                              last edited by

                              Thank you this has now worked for me
                              Which I have also added to the page https://www.facebook.com/groups/pfsense.official/ to help others…

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