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

    PfBlockerNG

    Scheduled Pinned Locked Moved pfBlockerNG
    1.2k Posts 210 Posters 1.9m 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.
    • T
      thehasty
      last edited by

      @BBcan177:

      When you add IPs to a custom list, did you select "Update Custom List" at the bottom of the Alias Settings when you saved it (and ran a Force Update)?  If you don't select this option, then it will only update the alias as per the defined Frequency setting of the Alias.

      Its best to look at the Aliastable to see if the IP is actually in the table. You can view the table by hovering over the Alias in the Widget or Firewall Rules. You can also view the table in Diagnostics: Tables: in the pfSense GUI.

      I will also be submitting a PR for a small bug. The details of the workaround can be found in the following link:
      https://forum.pfsense.org/index.php?topic=86212.msg526272#msg526272

      I always run a Force Update after changes, however I did not have "Update Custom List" set. It is now set and I've changed the scope back to TCP/UDP. I'll report back with any issues.

      Thanks again for your help!

      1 Reply Last reply Reply Quote 0
      • M
        Marvho
        last edited by

        How can I suppress a IP for example 192.16.71.176:443 ?

        It's blocked by IBlock_ADS but it stops the twitch.tv Mobile App to work.

        Thanks!

        1 Reply Last reply Reply Quote 0
        • M
          Mr. Jingles
          last edited by

          @Marvho:

          How can I suppress a IP for example 192.16.71.176:443 ?

          It's blocked by IBlock_ADS but it stops the twitch.tv Mobile App to work.

          Thanks!

          Click on the suppress icon in the alerts?

          (I'm probably saying something stupid now  :-[ ).

          6 and a half billion people know that they are stupid, agressive, lower life forms.

          1 Reply Last reply Reply Quote 0
          • D
            doktornotor Banned
            last edited by

            Yeah, the suppress icon is there for a reason.

            1 Reply Last reply Reply Quote 0
            • M
              Marvho
              last edited by

              Thanks.

              Is there a way to see a list with the suppressed hosts?

              1 Reply Last reply Reply Quote 0
              • D
                doktornotor Banned
                last edited by

                It's in Firewall - Aliases.

                1 Reply Last reply Reply Quote 0
                • M
                  Marvho
                  last edited by

                  Do I have to add this alias manually to the specific interfaces?

                  Sorry for asking so many questions..

                  1 Reply Last reply Reply Quote 0
                  • D
                    doktornotor Banned
                    last edited by

                    No.

                    1 Reply Last reply Reply Quote 0
                    • M
                      Marvho
                      last edited by

                      Well then something is working wrong.

                      If I try to access "twitch.tv" the alert tab shows me this "IBlock_Ads 192.16.64.0/21" and the connection gets refused. (Tested in Firefox) (PfSense 2.2.3 amd64 full install)

                      Pressing the "+" button ends in this "Host IP address 192.16.71.176 already exists in the pfBlockerNG Suppress Table."

                      In the Interface rules, there is no auto created rule using the alias "pfBlockerNGSuppress".

                      I hope I provided enough information to figure this out.

                      Thanks for your help!

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

                        @Marvho:

                        Well then something is working wrong.

                        If I try to access "twitch.tv" the alert tab shows me this "IBlock_Ads 192.16.64.0/21" and the connection gets refused. (Tested in Firefox) (PfSense 2.2.3 amd64 full install)

                        Pressing the "+" button ends in this "Host IP address 192.16.71.176 already exists in the pfBlockerNG Suppress Table."

                        In the Interface rules, there is no auto created rule using the alias "pfBlockerNGSuppress".

                        I hope I provided enough information to figure this out.

                        Thanks for your help!

                        Please read the following post to answer your questions :
                        https://forum.pfsense.org/index.php?topic=86212.msg513676#msg513676

                        "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
                        • M
                          Marvho
                          last edited by

                          I read that posting but it doesn't helped really.

                          This is what I do:

                          Try to access "www.twitch.tv"

                          See that it's blocked by following Alias List "IBlock_Ads 192.16.64.0/21"

                          Try to supress it with the "+".

                          Message that it's already supressed pops up.

                          Checking the PfBlockerNGSupress alias and see this "pfBlockerNGSuppress 192.16.71.176/32, 192.16.71.176/24 "

                          Running a forced cron task.

                          Try to access "www.twitch.tv" again. It is still blocked.

                          There is something I'm doing wrong, but I can't figure it out.

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

                            You can't use suppression when the blocked IP is in a CIDR like /21.

                            Hover over the "+" or the List column in the Alerts tab and you are presented with instructions.

                            So to circumvent this, create a new "permit Outbound" alias in pfBNG and add the IP to the custom entry box. This will create a permit outbound firewall rule above the Block rules.

                            "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
                            • M
                              Marvho
                              last edited by

                              @BBcan177:

                              You can't use suppression when the blocked IP is in a CIDR like /21.

                              So to circumvent this, create a new "permit Outbound" alias in pfBNG and add the IP to the custom entry box. This will create a permit outbound firewall rule above the Block rules.

                              Ahh thats it! Thank you!

                              Just one last question, how can I delete hosts from the suppression list? I removed the the Alias but there are still 2 Hosts suppressed.

                              1 Reply Last reply Reply Quote 0
                              • A
                                abujammy
                                last edited by

                                Sorry if this has already been posted.  I did a search but the terms are too general. :(

                                @BBcan177 in your original script on Github, you have a local source for a list where you're pulling from the local Suricata 'rules' directory.  I looked in that directory and I see a bunch of policy rules, but I don't see any IP lists.

                                So my question is, is this still valid and, if so, how do I add it to pfBlockerNG?

                                Here's an easy link to the gist.

                                https://gist.github.com/BBcan177/3cbd01b5b39bb3ce216a

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

                                  Here is a link to a script that I wrote which will import blocklists into pfBNG.
                                  https://forum.pfsense.org/index.php?topic=86212.msg508975#msg508975

                                  The rules in Snort/Suricata that contain IPs are in the botnet, compromised, drop, dshield and port-grouped categories. The script above, has these lists already, so it might not be worth to use the Snort/Suricata files. However, I did notice that there are some discrepancies between the Original Lists vs Snort/Suricata rules for these IPs. I use the ET Pro rules, so maybe those rules have some IPs that are not in the free Open Rulesets.

                                  You can write a small script to pull those IPs and put them into a text file. Create a Cron task and then pull that into pfBNG if you wish:

                                  Just change the path to reflect the IDS type (Snort/Suricata) and either i386/amd64.

                                  find /usr/pbi/snort-amd64/etc/snort/rules/* -name '*bot*' -o -name '*ciarmy*' -o -name '*compromised*' -o -name '*drop*' -o -name '*dshield*' -o -name '*portgrouped*' | xargs cat | grep -aoEw -e "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?/[0-9]{2})" -e "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)" | sort | uniq > /tmp/ips.txt
                                  

                                  "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
                                  • A
                                    abujammy
                                    last edited by

                                    Thank you!  I'll give this a try.

                                    1 Reply Last reply Reply Quote 0
                                    • A
                                      abujammy
                                      last edited by

                                      @BBcan177 this worked amazingly!  Thank you!

                                      1 Reply Last reply Reply Quote 0
                                      • C
                                        cyberbot
                                        last edited by

                                        @fragged:

                                        @cyberbot:

                                        @f34rinc:

                                        Did that fix your problem Jamerson?

                                        no still waiting for some answers,
                                        whenever i activate the pfBlockerNG the internet stops working.

                                        We need to see rules.debug or a screenshot of the rules created to give you any information.

                                        what rules are referring to ? Firewall rules or the pfblocker NG rules ?

                                        1 Reply Last reply Reply Quote 0
                                        • F
                                          f34rinc
                                          last edited by

                                          what rules are referring to ? Firewall rules or the pfblocker NG rules ?

                                          Can you post both?

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

                                            I'm sorry by the "stupid question" but….

                                            If i have a DNS and SMTP server (to work my mail and domains) can i use pfblockerng to block all Africa and Asia ???  (i don't have any mail/relation with us)

                                            You will continue to run the dns?  or i have problems ???

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