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

    Taming the beasts… aka suricata blueprint

    Scheduled Pinned Locked Moved IDS/IPS
    504 Posts 64 Posters 307.5k 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.
    • ?
      A Former User
      last edited by

      Actually that's the exact rule that the guide is recommending not to use, for a reason or two ;-)

      Why spend CPU/RAM analyzing packets that you know you'll drop? Packets that by the time you've finished analyzing them, a small number will get through (suricata/snort doesn't work on the live traffic, but a copy of that traffic).
      A rule like that will take most of the RAM suricata is using. If you need a 2nd interface, double it. 3rd triple it and so on. A pfsense rule though will not take that much RAM.
      Blocking by countries is NOT as attractive as it sounds. Most hosting providers don't rent datacenter space/servers in the country their visitors are. Blocking the US for example (as you should, see NSA saga) will get rid of most of the "known internet". Admittedly not a bad thing to do, but.

      There is no date on the new guide. I need the pf guys to give me the OK to go ahead with the guide. It's their move now. I'm pretty much sitting around waiting for their answer.

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

        Yea I understand it should be at the firewall level, not at the IDS one in //, but still try it… with some decent hardware; pfSense & Suricata geoIp rule, try to visit a banned country site and tell me how much data was passed before the drop/block kicked in...Also compare the memory footprint of this option vs pfblocker or an alias list...

        Concerning the NSA, no need trying to fight it; they operate at a different layer...Imagine if they had to opperate at the "user" level...

        Just intercept/inject bigger hardware...you will never see them, they will always catch all...

        F.

        1 Reply Last reply Reply Quote 0
        • R
          raidflex
          last edited by

          Any news on progress with the guide?

          1 Reply Last reply Reply Quote 0
          • ?
            A Former User
            last edited by

            Still waiting for the pfsense crew's answer.

            1 Reply Last reply Reply Quote 0
            • R
              raidflex
              last edited by

              @jflsakfja:

              Still waiting for the pfsense crew's answer.

              Looking forward to your guide, I hope they respond soon.

              1 Reply Last reply Reply Quote 0
              • R
                Ramosel
                last edited by

                @raidflex:

                @jflsakfja:

                Still waiting for the pfsense crew's answer.

                Looking forward to your guide, I hope they respond soon.

                Yep, I second that!

                Rick

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

                  And I will third it  :)

                  I am in the process of installing a new pfsense firewall and v2.0 of the infamous guide would come just in handy :)

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

                    jflsakfja, I cannot thank you enough for this. Over the last week I read through this entire thread and I am going to have to go through and read at least the first few pages again before trying this for myself.

                    I am sure I am not alone in having set up Snort/Suricata piecemeal, tweaking based on the odd nugget of advice picked up here and there but always wondering "am I really doing this right?". I am looking forward to seeing the updated guide, thak you again for all your efforts.

                    pfSense AMD64 VGA - Assume latest version.
                    Suricata, pfBlockerNG, SquidGuard, squid3.

                    1 Reply Last reply Reply Quote 0
                    • R
                      Ramosel
                      last edited by

                      @MaXX99:

                      I am in the process of installing a new pfsense firewall and v2.0 of the infamous guide would come just in handy :)

                      Agreed :D

                      I have a matching hardware spare so I've started a 2.2.1 build and am just going to hold tight until the guide comes out.  I'm venturing into new territory with Suricata and would rather follow the knowledge.  Until then, my 2.1.5 with Snort is running just fine.

                      Curious though, is there any "school of thought" as to order of loading Squid3, PfBlockerNG and Suricata?

                      Rick

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

                        @jflsakfja any progress? I'm pretty sure you're probably done with the write up, but still waiting on the pfSense team to give the OK?

                        1 Reply Last reply Reply Quote 0
                        • ?
                          A Former User
                          last edited by

                          Negative on progress, since I still haven't got the OK. Patience is a virtue we all need  ;)

                          1 Reply Last reply Reply Quote 0
                          • R
                            Ramosel
                            last edited by

                            @jflsakfja:

                            Patience is a virtue we all need  ;)

                            I'll second that one too!

                            Rick

                            1 Reply Last reply Reply Quote 0
                            • N
                              n3by
                              last edited by

                              Hello,

                              On my home I use pfsense 2.1.5 and now I switched from Snort to Suricata, set it as recommended by jflsakfja instructions in this thread….

                              Looking at alert logs yesterday I found that China people try to probe/hack my home network ( probably they found that Lenovo tablet can't report home and want to see whats wrong... ) so I put them in an alias blocked and set them in firewall as permanent blocked traffic In ( WAN ) and Out ( LAN ) but I still get alert in Suricata from there IP.

                              And by the way I still have Pfblocker set up to block all incoming traffic from Asia, and other sources.

                              Isn't pfsense firewall blocking traffic before it arriving at Suricata  ?

                              Thank you.

                              edit:
                              security by obscurity ( pictures removed )

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

                                @jflsakfja:

                                Patience is a virtue we all need  ;)

                                After reading https://forum.pfsense.org/index.php?topic=88244 , I think we will need more then patience. I understand what you're doing/asking for.. I've seen many pfsense guides on the internet, and none of them have gotten in trouble.. They just put the standard trademark disclaimer.

                                I'll wait and see

                                1 Reply Last reply Reply Quote 0
                                • ?
                                  A Former User
                                  last edited by

                                  @n3by:

                                  Hello,

                                  On my home I use pfsense 2.1.5 and now I switched from Snort to Suricata, set it as recommended by jflsakfja instructions in this thread….

                                  Looking at alert logs yesterday I found that China people try to probe/hack my home network ( probably they found that Lenovo tablet can't report home and want to see whats wrong... ) so I put them in an alias blocked and set them in firewall as permanent blocked traffic In ( WAN ) and Out ( LAN ) but I still get alert in Suricata from there IP.

                                  And by the way I still have Pfblocker set up to block all incoming traffic from Asia, and other sources.

                                  Isn't pfsense firewall blocking traffic before it arriving at Suricata  ?

                                  Thank you.

                                  edit:
                                  security by obscurity ( pictures removed )

                                  Short answer is nope  :).
                                  Long answer is: Think of the way packets are processed as a realtime copy of the packet stream. pf processes the actual packets, while at the same time copying them and sending them to suricata (actually logging the stream as is, and suricata sniffing that copy, but that's contrary to my stupidly simple explanations, so ignore it).

                                  Here's what happens and why you still get alerts:
                                  A packet arrives from IP 1.1.1.1. That packet is copied and processed, sent on its way to your computer. At the exact time (relative, play along) that the packet is copied, suricata picks it up and starts processing the copy. The actual packet has long reached your computer, suricata is munching on a copy. After it decides that IP 1.1.1.1 is bad, it adds it to the blocked hosts. The next time a packet from that IP arrives, both pf and suricata will pick it up (original+copy). While pf is still deciding what to do with the packet (it will drop it, since the IP is known bad), suricata will still process a copy of it, and generate an alert.

                                  The downside: wasted processing. I tried working around with it with suricata's BPF (an exercise for the extremely stubborn out there) but could not, not without significant performance penalties. Basically BPF says "ignore packets from these IPs". There is no reason to analyze a packet that's known to be blocked anyway.

                                  The upside: each time the bad IP generates an alert, the alert timestamp is updated. If it keeps doing it while being inside the ban timeframe, then the IP is perpetually kept on blocked hosts (well, until something like a reboot kicks it (temporarily) out).

                                  All in all, don't worry if you are still seeing alerts from blocked IPs. As long as your rules are set up correctly (easy to test) then you are set  :)

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

                                    @n3by:

                                    On my home I use pfsense 2.1.5 and now I switched from Snort to Suricata, set it as recommended by jflsakfja instructions in this thread….

                                    Unless you are writing your own rules or you are an ISP dealing with 30k users, right now you are better with Snort than Suricata. Using ET open and Snort VRT rulesets, youll get more coverage of threat protection with Snort (All VRT rules compatible with the engine)

                                    I personnaly prefer Suricata for a few reasons. IP protocol detection is better tuned…it will actually alert on some IPv6, Hop-by-Hop, etc... And when writing rules and outputting to syslog, I get more info on why the rules didnt load... Plus, the loggin is more detailed with Suricata.

                                    But the Snort OpenAppID is promising and give you a good overlook of apps on your network/ports -do you know whats on your port TCP 443 ?- And the IP reputation with Snort is alot more user friendly than Suricata. Also, the host attribute table feature of Snort can be usefull depending on the size of your network and uniqueness of your users. Again, I find Snort better at detecting packet overlapping, while you could spend days fine tuning Surita Stream engine and end up just disabling the Stream rules ;)

                                    30$/year VRT with Snort is a great deal of protection for the money. ET Pro is more expensive…which they had a home user pricing...

                                    Then again, if you have time up your sleeve, try them both Suricata/Snort and find out for yourself their strengths. But honestly, on pfSense, for protecting a home or SOHO network w/o getting too much into technical stuff; go with the Snort package.

                                    F.

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

                                      @jflsakfja:

                                      …
                                      The upside: each time the bad IP generates an alert, the alert timestamp is updated. If it keeps doing it while being inside the ban timeframe, then the IP is perpetually kept on blocked hosts (well, until something like a reboot kicks it (temporarily) out).

                                      All in all, don't worry if you are still seeing alerts from blocked IPs. As long as your rules are set up correctly (easy to test) then you are set  :)

                                      Hi to all and thanks for creating this thread !
                                      I'm following your suggestion to set up a suricata ids,
                                      Can someone explain how can I check the list of "blocked hosts" and their timers?

                                      Thanks,
                                      Chris

                                      –-
                                      I figured it out: services -> suricata -> blocks gives me all the info I need.

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        Ramosel
                                        last edited by

                                        @fsansfil:

                                        Unless you are writing your own rules or you are an ISP dealing with 30k users, right now you are better with Snort than Suricata. Using ET open and Snort VRT rulesets, youll get more coverage of threat protection with Snort (All VRT rules compatible with the engine)

                                        There was talk (here and elsewhere) many months back that Snort as a long term product was dead… or dying... in the wake of Suricata and its resources.  Has there been a change to that thought?  New people involved?

                                        Just curious?

                                        Rick

                                        1 Reply Last reply Reply Quote 0
                                        • bmeeksB
                                          bmeeks
                                          last edited by

                                          @Ramosel:

                                          There was talk (here and elsewhere) many months back that Snort as a long term product was dead… or dying... in the wake of Suricata and its resources.  Has there been a change to that thought?  New people involved?

                                          Just curious?

                                          Rick

                                          I think a couple of things have happened.  First, thus far the Cisco purchase of Snort has not resulted in the open source project side being squashed.  That was a fear early on after the purchase.  Second, Snort 3.0-BETA supports multi-threading.  So once v3.0 goes from BETA to RELEASE, the argument about Suricata's performance advantages will lose some steam.

                                          I think both systems are fine.  Each has its own unique features.  Suricata can grab and log a lot more information than Snort can at the moment (all the JSON stuff, TLS cert exchanges, etc.), but Snort sports the new OpenAppID functionality.

                                          Bill

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

                                            New user here, bear with me.

                                            Following the first post and reading it over and over, I don't understand the part about floating rules.

                                            Here's what I did(also see screenshots)

                                            1. Created new interface called DMZ(did this to test on my current system)
                                            2. Created Floating Rule, as described, but ONLY for the interface DMZ
                                            3. Created allow rule for everything on the interface tab for DMZ(started out with DNS only, but nothing went through, so I changed it to any)

                                            Testing with ping = failed
                                            Testing NSLOOKUP = failed

                                            When disabling the floating rule, all traffic pass, as expected.

                                            I'm sure it's me messing this up in some way, but I don't see how/why.

                                            Assistance greatly appreciated.
                                            BR Jim

                                            interface_tab.png
                                            interface_tab.png_thumb
                                            floating.png
                                            floating.png_thumb
                                            host_timeout.png
                                            host_timeout.png_thumb
                                            floating_DISABLED.png
                                            floating_DISABLED.png_thumb
                                            logs.png
                                            logs.png_thumb

                                            Best regards
                                            Jim

                                            Still learning, correct me if I'm wrong please.

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