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

RFC (make up a number not in use) - Blueprint for setting up snort + pfblocker

Scheduled Pinned Locked Moved pfSense Packages
171 Posts 26 Posters 186.7k 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.
  • F
    fearnothing
    last edited by Jun 9, 2014, 6:04 PM

    Actually, AC-STD. However I seem to have solved it with the following process:

    • Set the search method to AC-BNFA - this brought memory usage down to 10%
    • Enable the desired rules - memory usage 13%
    • Change search method back to AC-STD - memory usage 14%.
      Voila!
    1 Reply Last reply Reply Quote 0
    • ?
      A Former User
      last edited by Jun 9, 2014, 6:07 PM

      And it will choke on the next rule update. Please use AC-BNFA-NQ. AC-BNFA-NQ replaced AC-BNFA, which in turn replaced AC*. Trust me, I was running AC-BNFA-NQ on multiple production networks, and I haven't created a black hole while doing so.

      1 Reply Last reply Reply Quote 0
      • B
        bmeeks
        last edited by Jun 10, 2014, 1:38 AM

        @jflsakfja:

        And it will choke on the next rule update. Please use AC-BNFA-NQ. AC-BNFA-NQ replaced AC-BNFA, which in turn replaced AC*. Trust me, I was running AC-BNFA-NQ on multiple production networks, and I haven't created a black hole while doing so.

        jflsakfja is correct.  AC-BNFA-NQ is the best these days.  Some of the other pattern matchers can gobble memory like crazy.  And Suricata can be worse than Snort in this regard.

        Bill

        1 Reply Last reply Reply Quote 0
        • B
          BBcan177 Moderator
          last edited by Jun 10, 2014, 3:21 AM Jun 10, 2014, 2:48 AM

          @bmeeks:

          @jflsakfja:

          And it will choke on the next rule update. Please use AC-BNFA-NQ. AC-BNFA-NQ replaced AC-BNFA, which in turn replaced AC*. Trust me, I was running AC-BNFA-NQ on multiple production networks, and I haven't created a black hole while doing so.

          jflsakfja is correct.  AC-BNFA-NQ is the best these days.  Some of the other pattern matchers can gobble memory like crazy.  And Suricata can be worse than Snort in this regard.

          Bill

          Not if you have a lot of RAM lol…

          EDIT:

          I have been using "AC" on a 32GB box and "AC-SPLIT" on all others.

          I will try to see if changing the "AC-SPLIT" to "AC-BNFA-NQ" fixes the crashing at rule updates sometimes.

          "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 Former User
            last edited by Jun 10, 2014, 8:38 PM

            AC-BNFA-NQ.

            AC-NQ is about 30% more ram efficient than AC-SPLIT, with an increased CPU usage.

            AC (plain) is like killing a fly with a deathstar. AC-NQ replaced it, as in AC (plain) is now obsolete, you get no added benefits from AC over AC-NQ.

            The best balance between RAM usage (more interfaces/more rules) and CPU is AC-BNFA-NQ. It's a single dropdown change, and an interface restart. Just try it, it will not bite.

            On a side note, 32GB RAM is suricata's 10Gbps territory.

            1 Reply Last reply Reply Quote 0
            • B
              BBcan177 Moderator
              last edited by Jun 10, 2014, 11:55 PM

              Not that I don't believe you, but Its hard to find some good docs on this.. Do you have any links?

              "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 Former User
                last edited by Jun 11, 2014, 12:41 PM

                If memory serves right, ac-bnfa-nq is the default if no method is specified. In order to be the default, it's probably the best, unless pushing snort to its limits, which unless you are in multiple-1Gbps territory, is nowhere near close to them.

                A quick search gives this: http://sourceforge.net/p/snort/mailman/message/27113364/

                A quick re-read of the entire thread will show that there are persons that think this topic is the absolute best way to set up snort on the entire internet. It might even give the hint to a certain group of people that want to build a statue of me, thinking I'm the messiah or something. A quick search around the forums will show others even going out of their way and lying that an i3 is faster than a p4 for a regular home connection while running snort.

                If it meant completely tearing down your existing system and rebuilding it from scratch, then I understand the skepticism. As I said, it's a simple dropdown selection. Just try it, if you see that under your use case it chokes  then try another method.

                1 Reply Last reply Reply Quote 0
                • R
                  Ramosel
                  last edited by Jun 11, 2014, 2:33 PM

                  @jflsakfja:

                  A quick re-read of the entire thread will show that there are persons that think this topic is the absolute best way to set up snort on the entire internet. It might even give the hint to a certain group of people that want to build a statue of me, thinking I'm the messiah or something. A quick search around the forums will show others even going out of their way and lying that an i3 is faster than a p4 for a regular home connection while running snort.

                  I guess I am one of those people who sing your praise here… on my home system using your methodology and cookbook to get there, I cut my memory usage by more than half and CPU usage rarely comes off idle (AMD athlon 64 x2 with 4GB).  I'm retired now but I spent enough years in the IT community (I was around before IT was IT) both as a worker bee and GOD that I can spot those who get it... vs. those who really understand it, live it, breathe it.  I also learned not to argue with success until the next bright boy comes up with something better - and I've been on both sides of that coin.      So yeah, I'd chip in a few coins towards your statue....BUT, considering you are still holding out on some of the rules that would be pretty helpful to us home users… we're talking "Winged Victory" here, not "David"  (hint, one is missing their head)  <wink>Rick</wink>

                  1 Reply Last reply Reply Quote 0
                  • ?
                    A Former User
                    last edited by Jun 11, 2014, 2:39 PM

                    The upcoming suricata topic will include a long section dedicated to creating suricata rules specific to a network gateway. There is no need to release my custom rules, since it will be explained how to create those rules on your own.

                    If most of the stuff I've written so far is considered short by me, then you'll realize what long means when you see the topic ;)

                    I'm actually putting the finishing touches (writing entire paragraphs here and there) on the first part, the firewalling part right now.

                    1 Reply Last reply Reply Quote 0
                    • M
                      Mr. Jingles
                      last edited by Jun 11, 2014, 3:28 PM

                      @jflsakfja:

                      that want to build a statue of me, thinking I'm the messiah or something.

                      ;D ;D ;D

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

                      1 Reply Last reply Reply Quote 0
                      • S
                        Soloam
                        last edited by Nov 26, 2014, 10:47 AM

                        Hello all, I tried Suricata, but it's not yet compatible with my system, so back again to Snort. Just a quick question that I can't seem to find the answer in the topic. What should we do with the rules that are disabled by default? In the Suricata guide I see that it's recommended to activate all first and then disable the unwanted rules. Should we take the same approach in snort?

                        I tried once this and Snort would not boot on the interface, probably some rule that should not be set on. I looked on the system log and no error. I uninstalled all and started from scratch.

                        Thank you
                        Best Regards

                        1 Reply Last reply Reply Quote 0
                        • ?
                          A Former User
                          last edited by Nov 26, 2014, 1:54 PM

                          Yes, the recommended way to set snort/suricata is to enable all then disable the rules suggested in the topics/list.

                          1 Reply Last reply Reply Quote 0
                          • S
                            Soloam
                            last edited by Nov 26, 2014, 10:58 PM

                            Thank you!

                            Any one had problems with rule  "ET POLICY SSLv3 outbound connection from client vulnerable to POODLE attack
                            suppress"  1:2019416? I looked at both this tutorial and the suricata version, and both have this rule enabled! The problem is that if I leave this rule several google ip's are blocked, including play store and hangouts!

                            Best regards
                            soloam

                            1 Reply Last reply Reply Quote 0
                            • ?
                              A Former User
                              last edited by Nov 27, 2014, 12:57 PM

                              The rule is valid, you just need to completely disable SSLv3 (and v2 and v1). See your browser's documentation on how to do it.

                              1 Reply Last reply Reply Quote 0
                              • W
                                Wepee
                                last edited by Jan 15, 2015, 5:18 PM

                                Sorry if I ask a silly question here, as I very new to SNORT.

                                I have been reading a lot, some I do understand but most I don't here.

                                Ok, here I begin the silly question ;D

                                Let take an example here, let's look the ET rules shown below:

                                
                                emerging-botcc > all
                                
                                emerging-chat > all except:
                                2010784 ET CHAT Facebook Chat (send message)
                                2010785 ET CHAT Facebook Chat (buddy list)
                                2010786 ET CHAT Facebook Chat (settings)
                                2010819 ET CHAT Facebook Chat using XMPP
                                2002327 ET CHAT Google Talk (Jabber) Client Login
                                2002334 ET CHAT Google IM traffic Jabber client sign-on
                                2001241 ET CHAT MSN file transfer request
                                2001242 ET CHAT MSN file transfer accept
                                2001243 ET CHAT MSN file transfer reject
                                2001682 ET CHAT MSN IM Poll via HTTP
                                2002192 ET CHAT MSN status change
                                2008289 ET CHAT Possible MSN Messenger File Transfer
                                2009375 ET CHAT General MSN Chat Activity
                                2009376 ET CHAT MSN User-Agent Activity
                                
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                
                                Question here is the exception rules that I need to disable,
                                for example: 2010784 ET CHAT Facebook Chat (send message)
                                
                                For the above rule if I need to do the exception, I need search the Signature ID
                                which shown above = 2010784, I need to a search on this rule and disable it
                                
                                As you know this is a PAINSTAKING task of finding each and every Signature ID
                                2009376, 2009375…...etc and disable each and every one.
                                
                                Question:
                                
                                1) Is there a short-cut method of doing this mundane task faster? :(
                                
                                2) This process of disabling each exception will start all over again since,
                                whenever there a new updated Snort package is released, and if updated,
                                then snort is completely unassigned to the WAN interface, and I have to
                                manually reassign snort to run on my WAN interface, and hence I need
                                to do the exception rules ALL over again, right? :(
                                
                                Thank you.
                                1 Reply Last reply Reply Quote 0
                                • ?
                                  A Former User
                                  last edited by Jan 15, 2015, 7:20 PM

                                  1. there is a new guide coming (work in progress) which should greatly simplify initial setup. For now I'm afraid that it's the clickety-click process :-)

                                  2. That's not expected behavior. Did you contact bmeeks about it? I've never had to redo a setup, even after removing the package (keep settings on removal MUST be ticked) and reinstalling

                                  1 Reply Last reply Reply Quote 0
                                  • B
                                    bmeeks
                                    last edited by Jan 15, 2015, 11:33 PM

                                    @Wepee:

                                    Sorry if I ask a silly question here, as I very new to SNORT.

                                    I have been reading a lot, some I do understand but most I don't here.

                                    Ok, here I begin the silly question ;D

                                    Let take an example here, let's look the ET rules shown below:

                                    
                                    emerging-botcc > all
                                    
                                    emerging-chat > all except:
                                    2010784 ET CHAT Facebook Chat (send message)
                                    2010785 ET CHAT Facebook Chat (buddy list)
                                    2010786 ET CHAT Facebook Chat (settings)
                                    2010819 ET CHAT Facebook Chat using XMPP
                                    2002327 ET CHAT Google Talk (Jabber) Client Login
                                    2002334 ET CHAT Google IM traffic Jabber client sign-on
                                    2001241 ET CHAT MSN file transfer request
                                    2001242 ET CHAT MSN file transfer accept
                                    2001243 ET CHAT MSN file transfer reject
                                    2001682 ET CHAT MSN IM Poll via HTTP
                                    2002192 ET CHAT MSN status change
                                    2008289 ET CHAT Possible MSN Messenger File Transfer
                                    2009375 ET CHAT General MSN Chat Activity
                                    2009376 ET CHAT MSN User-Agent Activity
                                    
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                    
                                    Question here is the exception rules that I need to disable,
                                    for example: 2010784 ET CHAT Facebook Chat (send message)
                                    
                                    For the above rule if I need to do the exception, I need search the Signature ID
                                    which shown above = 2010784, I need to a search on this rule and disable it
                                    
                                    As you know this is a PAINSTAKING task of finding each and every Signature ID
                                    2009376, 2009375…...etc and disable each and every one.
                                    
                                    Question:
                                    
                                    1) Is there a short-cut method of doing this mundane task faster? :(
                                    
                                    2) This process of disabling each exception will start all over again since,
                                    whenever there a new updated Snort package is released, and if updated,
                                    then snort is completely unassigned to the WAN interface, and I have to
                                    manually reassign snort to run on my WAN interface, and hence I need
                                    to do the exception rules ALL over again, right? :(
                                    
                                    Thank you.
                                    

                                    Snort should never lose settings on an update if you have checked the "keep settings on uninstall" checkbox on the GLOBAL SETTINGS tab.  If that is checked and you are still losing settings, then something extremely weird is happening, like maybe some older config.xml file getting auto-restored or something (just a wild guess).

                                    If you want to "mass enable/disable" rule SIDS, the new SID MGMT tab is tailor-made for this.  It uses the same syntax as PulledPork or Oinkmaster conf files.  There are examples described within the included sample files installed with the Snort package now.

                                    Bill

                                    1 Reply Last reply Reply Quote 0
                                    • W
                                      Wepee
                                      last edited by Jan 16, 2015, 9:50 AM

                                      @jflsakfja:

                                      1. there is a new guide coming (work in progress) which should greatly simplify initial setup. For now I'm afraid that it's the clickety-click process :-)

                                      2. That's not expected behavior. Did you contact bmeeks about it? I've never had to redo a setup, even after removing the package (keep settings on removal MUST be ticked) and reinstalling

                                      jflsakfja and bmeeks, first of all, you all have done a commendable contribution to the community.
                                      WELL DONE & KEEP UP THE GOOD WORK!!!! :)
                                      many people like me need your volunteered advice and written guide in getting things working!!!

                                      1. Great!!! :)I hope the guide will be finished soon, that will assist in me / anyone for that matter, in doing the job of
                                        disabling exception rules faster. Otherwise is a real tedious boring job ;D

                                      2. I have enabled the setting: Keep Snort Setting after deinstallation,
                                        the pic attached. I must have disabled it previously, I think? ::)

                                      Keep_Snort_Settings_After_Deinstallation(After_upgraded_package).jpg
                                      Keep_Snort_Settings_After_Deinstallation(After_upgraded_package).jpg_thumb

                                      1 Reply Last reply Reply Quote 0
                                      • ?
                                        A Former User
                                        last edited by Jan 16, 2015, 10:11 AM

                                        That should take care of keeping the settings. If they are still lost, then report it to bmeeks.

                                        You forgot to thank BBcan177  ;)

                                        1 Reply Last reply Reply Quote 0
                                        • W
                                          Wepee
                                          last edited by Jan 17, 2015, 9:07 AM

                                          Hi

                                          BBcan177 :)

                                          Thank for everything! Cheers! :D

                                          Keep up the good effort! ;D

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received