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

PfBlockerNG

pfBlockerNG
210
1.2k
1.8m
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.
  • D
    doktornotor Banned
    last edited by Feb 9, 2015, 9:59 PM

    @BBcan177:

    PM me if you need to get it sooner.

    Noooo, definitely not urgent. Was just testing. :)

    1 Reply Last reply Reply Quote 0
    • B
      BBcan177 Moderator
      last edited by Feb 9, 2015, 10:04 PM

      @doktornotor:

      @BBcan177:

      PM me if you need to get it sooner.

      Noooo, definitely not urgent. Was just testing. :)

      Was kinda leading you to test it  ;D I did say I really Hate Regex! Right!

      You could edit pfblockerng.inc and replace the following (Starting at Line 1166)

      
              $pattern1 = '([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}';
              $pattern2 = '[A-Fa-f0-9]{1,4}::([A-Fa-f0-9]{1,4}:){0,5}[A-Fa-f0-9]{1,4}';
              $pattern3 = '([A-Fa-f0-9]{1,4}:){2}:([A-Fa-f0-9]{1,4}:){0,4}[A-Fa-f0-9]{1,4}';
              $pattern4 = '([A-Fa-f0-9]{1,4}:){3}:([A-Fa-f0-9]{1,4}:){0,3}[A-Fa-f0-9]{1,4}';
              $pattern5 = '([A-Fa-f0-9]{1,4}:){4}:([A-Fa-f0-9]{1,4}:){0,2}[A-Fa-f0-9]{1,4}';
              $pattern6 = '([A-Fa-f0-9]{1,4}:){5}:([A-Fa-f0-9]{1,4}:){0,1}[A-Fa-f0-9]{1,4}';
              $pattern7 = '([A-Fa-f0-9]{1,4}:){6}:[A-Fa-f0-9]{1,4}';
              $pattern8 = '[A-Fa-f0-9]{1,4}:([A-Fa-f0-9]{1,4}::)\/[0-9]{2}';
              $pattern9 = '[A-Fa-f0-9]{1,4}:([A-Fa-f0-9]{1,4}:[A-Fa-f0-9]{1,4}::)\/[0-9]{2}';
              $pattern10 = '[A-Fa-f0-9]{1,4}::\/[0-9]{2}';
              $pfb['ipv6'] = "/^($pattern1)$|^($pattern2)$|^($pattern3)$|^($pattern4)$|^($pattern5)$|^($pattern6)$|^($pattern7)$|^($pattern8)$|^($pattern9)$|^($pattern10)$/";
      
      

      "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
      • D
        doktornotor Banned
        last edited by Feb 9, 2015, 10:16 PM

        @BBcan177:

        edit pfblockerng.inc and replace the following (Starting at Line 1166)

        
                $pattern1 = '([A-Fa-f0-9]{1,4}:){7}[A-Fa-f0-9]{1,4}';
                $pattern2 = '[A-Fa-f0-9]{1,4}::([A-Fa-f0-9]{1,4}:){0,5}[A-Fa-f0-9]{1,4}';
                $pattern3 = '([A-Fa-f0-9]{1,4}:){2}:([A-Fa-f0-9]{1,4}:){0,4}[A-Fa-f0-9]{1,4}';
                $pattern4 = '([A-Fa-f0-9]{1,4}:){3}:([A-Fa-f0-9]{1,4}:){0,3}[A-Fa-f0-9]{1,4}';
                $pattern5 = '([A-Fa-f0-9]{1,4}:){4}:([A-Fa-f0-9]{1,4}:){0,2}[A-Fa-f0-9]{1,4}';
                $pattern6 = '([A-Fa-f0-9]{1,4}:){5}:([A-Fa-f0-9]{1,4}:){0,1}[A-Fa-f0-9]{1,4}';
                $pattern7 = '([A-Fa-f0-9]{1,4}:){6}:[A-Fa-f0-9]{1,4}';
                $pattern8 = '[A-Fa-f0-9]{1,4}:([A-Fa-f0-9]{1,4}::)\/[0-9]{2}';
                $pattern9 = '[A-Fa-f0-9]{1,4}:([A-Fa-f0-9]{1,4}:[A-Fa-f0-9]{1,4}::)\/[0-9]{2}';
                $pattern10 = '[A-Fa-f0-9]{1,4}::\/[0-9]{2}';
                $pfb['ipv6'] = "/^($pattern1)$|^($pattern2)$|^($pattern3)$|^($pattern4)$|^($pattern5)$|^($pattern6)$|^($pattern7)$|^($pattern8)$|^($pattern9)$|^($pattern10)$/";
        
        

        That works.  8)

        1 Reply Last reply Reply Quote 0
        • M
          McFuzz
          last edited by Feb 9, 2015, 10:57 PM

          @BBcan177:

          Hi McFuzz,

          These are IBlock lists. And they are in a range format. You need to select "gz" format. There is a chart below the URL entry section to indicate what each "Format" is for.

          I think the issue is with the "Ads" list. I will be doing some debugging today but try to toggle that list "off" and change all IBlock to "gz" then run a "Force Reload".

          If you see a "-" in the widget there are issues with pfctl and it's not going to block anything.

          Howdy,

          I actually changed it to gz_2 and it apparently works fine now; gz caused me to have the dashes (-). I'll disable ads and see if all others work with gz. I'll check out the BOGON settings :)

          1 Reply Last reply Reply Quote 0
          • T
            Topper727
            last edited by Feb 10, 2015, 7:45 AM

            Wonder if there is a problem with the lists.. I had that happen and I disabled with help from BBcan the bad apples.. Found out there is a 0.0.0.0 address in bad ones and that was a bug that he is fixing now.

            Dell 2950 g3 server
            Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
            Current: 2000 MHz, Max: 2667 MHz
            8 CPUs: 2 package(s) x 4 core(s)
            8152 MiB and 600meg 10k drive
            Pfsense 2.4 .. Hoping to get the phpvirtualbox going again.

            1 Reply Last reply Reply Quote 0
            • S
              SixXxShooTeR
              last edited by Feb 10, 2015, 7:49 AM

              deviantart is working now. Malwarebytes still saying unable to access server when updating. Only packets being blocked are from level1 and ads and tracker list.

              1 Reply Last reply Reply Quote 0
              • T
                Topper727
                last edited by Feb 10, 2015, 7:56 AM

                try

                https://www.iblocklist.com/lists.php

                [ https://blocklist.sigmaprojects.org/api.cfc?method=getList&lists=anti-infringement ]
                .

                [ https://blocklist.sigmaprojects.org/api.cfc?method=getList&lists=webexploit ]
                .

                [ https://blocklist.sigmaprojects.org/api.cfc?method=getList&lists=dshield ]
                .

                [ https://blocklist.sigmaprojects.org/api.cfc?method=getList&lists=spyware ]
                .

                [ https://blocklist.sigmaprojects.org/api.cfc?method=getList&lists=drop ]
                .

                [ https://blocklist.sigmaprojects.org/api.cfc?method=getList&lists=zeus ]
                .

                [ https://blocklist.sigmaprojects.org/api.cfc?method=getList&lists=china ]
                .

                [ https://blocklist.sigmaprojects.org/api.cfc?method=getList&lists=forumspam ]
                .

                [ https://blocklist.sigmaprojects.org/api.cfc?method=getList&lists=pedophiles ]
                .

                [ https://blocklist.sigmaprojects.org/api.cfc?method=getList&lists=northkorea ]
                .

                [ https://blocklist.sigmaprojects.org/api.cfc?method=getList&lists=russia ]
                .

                [ https://blocklist.sigmaprojects.org/api.cfc?method=getList&lists=atma ]
                .

                [ https://blocklist.sigmaprojects.org/api.cfc?method=getList&lists=spammers ]
                .

                Dell 2950 g3 server
                Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
                Current: 2000 MHz, Max: 2667 MHz
                8 CPUs: 2 package(s) x 4 core(s)
                8152 MiB and 600meg 10k drive
                Pfsense 2.4 .. Hoping to get the phpvirtualbox going again.

                1 Reply Last reply Reply Quote 0
                • D
                  doktornotor Banned
                  last edited by Feb 10, 2015, 7:59 AM

                  @Topper727:

                  Found out there is a 0.0.0.0 address in bad ones

                  Whoever puts 0.0.0.0 in a blocklist should not maintain one in the first place… WTF!  :o >:(

                  1 Reply Last reply Reply Quote 0
                  • T
                    Topper727
                    last edited by Feb 10, 2015, 8:02 AM

                    Agree.. but BBcan had code to remove it but now he has a file that I gave him from a list that he can test and debug that part of the code.  So in future if more of those 0.0.0.0 show up they will be ignored. Hence the list should work

                    Dell 2950 g3 server
                    Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
                    Current: 2000 MHz, Max: 2667 MHz
                    8 CPUs: 2 package(s) x 4 core(s)
                    8152 MiB and 600meg 10k drive
                    Pfsense 2.4 .. Hoping to get the phpvirtualbox going again.

                    1 Reply Last reply Reply Quote 0
                    • M
                      McFuzz
                      last edited by Feb 10, 2015, 8:03 AM

                      By the way - another interesting thing I've noticed between pfBlocker and pfBlockerNG is that with pfBlocker, it'd block A LOT of packets, but with pfBlockerNG - barely so:

                      What gives..?

                      1 Reply Last reply Reply Quote 0
                      • T
                        Topper727
                        last edited by Feb 10, 2015, 8:05 AM

                        Suggestion if not already done.  Put the block to block both for each list.

                        And I get a lot of blocks from it. Go surf around some bad sites and watch the numbers grow.

                        ![Snap 2015-02-10 at 03.03.26.jpg](/public/imported_attachments/1/Snap 2015-02-10 at 03.03.26.jpg)
                        ![Snap 2015-02-10 at 03.03.26.jpg_thumb](/public/imported_attachments/1/Snap 2015-02-10 at 03.03.26.jpg_thumb)

                        Dell 2950 g3 server
                        Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
                        Current: 2000 MHz, Max: 2667 MHz
                        8 CPUs: 2 package(s) x 4 core(s)
                        8152 MiB and 600meg 10k drive
                        Pfsense 2.4 .. Hoping to get the phpvirtualbox going again.

                        1 Reply Last reply Reply Quote 0
                        • T
                          Topper727
                          last edited by Feb 10, 2015, 8:53 AM

                          Also a suggestion from BBcan I was told about this.  Setup this page like I did and then force reload to get rid of bad nets not just 1 ip from it.

                          ![screencapture-192-168-1-1-pkg_edit-php (3).png](/public/imported_attachments/1/screencapture-192-168-1-1-pkg_edit-php (3).png)
                          ![screencapture-192-168-1-1-pkg_edit-php (3).png_thumb](/public/imported_attachments/1/screencapture-192-168-1-1-pkg_edit-php (3).png_thumb)

                          Dell 2950 g3 server
                          Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
                          Current: 2000 MHz, Max: 2667 MHz
                          8 CPUs: 2 package(s) x 4 core(s)
                          8152 MiB and 600meg 10k drive
                          Pfsense 2.4 .. Hoping to get the phpvirtualbox going again.

                          1 Reply Last reply Reply Quote 0
                          • S
                            SixXxShooTeR
                            last edited by Feb 10, 2015, 9:03 AM

                            @Topper727:

                            try
                            .

                            [ https://blocklist.sigmaprojects.org/api.cfc?method=getList&lists=spyware ]
                            .

                            Just added this list, it's only showing a Count of 1 tho.

                            1 Reply Last reply Reply Quote 0
                            • T
                              Topper727
                              last edited by Feb 10, 2015, 9:06 AM

                              add them all in a group is what I did so I not see how many each have.  But I have them all and I get pretty good amount of blocks from those lists.. I also have deduplication on so all my lists are stripped of duplicates making them smaller too

                              Dell 2950 g3 server
                              Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
                              Current: 2000 MHz, Max: 2667 MHz
                              8 CPUs: 2 package(s) x 4 core(s)
                              8152 MiB and 600meg 10k drive
                              Pfsense 2.4 .. Hoping to get the phpvirtualbox going again.

                              1 Reply Last reply Reply Quote 0
                              • S
                                SixXxShooTeR
                                last edited by Feb 10, 2015, 9:13 AM

                                Okay, ill give it a try. Tho I have been able to find out what lists are blocking what, like malwarebytes or deviantart.com, by having them displayed individually and not in groups. Once you visit a site you can see which lists are denying or blocking packets.

                                I also have de-duplication enabled.

                                Question, I see that you've selected "Unknown" in the ET IQRISK BLOCK LISTS and ET IQRISK Match LISTS. What does that do?

                                1 Reply Last reply Reply Quote 0
                                • T
                                  Topper727
                                  last edited by Feb 10, 2015, 9:30 AM

                                  I made mistake when first setting that up. That is a paid subscription so it does nothing for me.  I do not pay for it.

                                  Click the thanks at top right of my message if I helped you

                                  Dell 2950 g3 server
                                  Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
                                  Current: 2000 MHz, Max: 2667 MHz
                                  8 CPUs: 2 package(s) x 4 core(s)
                                  8152 MiB and 600meg 10k drive
                                  Pfsense 2.4 .. Hoping to get the phpvirtualbox going again.

                                  1 Reply Last reply Reply Quote 0
                                  • C
                                    ch1ll1man
                                    last edited by Feb 10, 2015, 3:03 PM

                                    We've started using PFBlockerNG on a couple of our firewalls and are using the country block to keep some countries out.    However there are a few IP ranges we would like to let through within those blocked countries and these IP ranges change weekly so we're pulling a txt file into an IPV4 alias via PFBlocker daily updates.

                                    Everything so far is working great but the permit rule created by PFBlockerNG is

                                    IPv4 * pfB_Cloudflare * * * * none pfB_Cloudflare auto rule

                                    What we'd like that rule to say is

                                    IPv4 * pfB_Cloudflare * AN_IP 80 * none pfB_Cloudflare auto rule
                                    IPv4 * pfB_Cloudflare * AN_IP 443 * none pfB_Cloudflare auto rule

                                    AN_IP = an internal IP of a server we have

                                    What's the best advice on this for achieving that?  If I edit the rule PFBlockerNG just destroys it on the Update.

                                    1 Reply Last reply Reply Quote 0
                                    • M
                                      marcelloc
                                      last edited by Feb 10, 2015, 3:20 PM

                                      @wavetune:

                                      What's the best advice on this for achieving that?  If I edit the rule PFBlockerNG just destroys it on the Update.

                                      Did you tried alias only and then create a manual rule?

                                      Treinamentos de Elite: http://sys-squad.com

                                      Help a community developer! ;D

                                      1 Reply Last reply Reply Quote 0
                                      • C
                                        Cino
                                        last edited by Feb 10, 2015, 5:10 PM

                                        @marcelloc:

                                        @wavetune:

                                        What's the best advice on this for achieving that?  If I edit the rule PFBlockerNG just destroys it on the Update.

                                        Did you tried alias only and then create a manual rule?

                                        I think that would be the best way to approach this. pfBlockerNG is meant to block all ports, if you need specific ports opened; then alias with a manual rule

                                        1 Reply Last reply Reply Quote 0
                                        • M
                                          McFuzz
                                          last edited by Feb 10, 2015, 5:59 PM

                                          I left it running overnight - plenty of blocks now :D

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