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

Quick Snort Setup Instructions for New Users

IDS/IPS
46
147
253.6k
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.
  • S
    Supermule Banned
    last edited by Jul 4, 2013, 5:13 PM

    I have named it Snort Friendly IP :D

    1 Reply Last reply Reply Quote 0
    • B
      bmeeks
      last edited by Jul 4, 2013, 8:08 PM

      @vipermy:

      First of all, sorry if it's a noob question. We use pfSense as inter-department firewall within private network. We could install snort package through pfSense proxy setting. However, we couldn't perform the snort rule update. Is there anyway we could set the proxy snort update and how? or how to perform snort rule update manually?

      FYR, we are using pfSense 2.0.3 with Snort 2.9.4.6 pkg v. 2.5.9

      Thank you in advance.

      Sent you a PM with my e-mail address.  Reply back to the address and I will send you a patched file I would like for you to test for me.  I think it will allow Snort rule updates through the pfSense system proxy.

      Bill

      1 Reply Last reply Reply Quote 0
      • M
        Mr. Jingles
        last edited by Jul 7, 2013, 7:06 AM

        Thank you both for the explanations, I learned something valuable  ;D

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

        1 Reply Last reply Reply Quote 0
        • M
          Mr. Jingles
          last edited by Jul 10, 2013, 4:55 PM

          Could I ask a question about the oinkcode?

          I purchased a subscription, but I am not quite sure if I understand the GUI correctly now.

          Before, the last couple of months, when I didn't have a subscription, I flagged 'install snort community rules' (obviously, since they are free  ;D) and also enabled them on both interfaces (for/ex: WAN-categories -> Select the rulesets Snort will load at startup -> Snort GPLv2 Community Rules (VRT certified)).

          But now that my oinkcode stands for a paid subscription, do I still have to select 'install snort community rules', or is just selecting the right 'IPS-policy' sufficient? I ask, since specifically now I don't see any alerts in my Snort-log anymore.

          Thank you for your answer  ;D

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

          1 Reply Last reply Reply Quote 0
          • B
            bmeeks
            last edited by Jul 15, 2013, 9:40 PM

            @Hollander:

            Could I ask a question about the oinkcode?

            I purchased a subscription, but I am not quite sure if I understand the GUI correctly now.

            Before, the last couple of months, when I didn't have a subscription, I flagged 'install snort community rules' (obviously, since they are free  ;D) and also enabled them on both interfaces (for/ex: WAN-categories -> Select the rulesets Snort will load at startup -> Snort GPLv2 Community Rules (VRT certified)).

            But now that my oinkcode stands for a paid subscription, do I still have to select 'install snort community rules', or is just selecting the right 'IPS-policy' sufficient? I ask, since specifically now I don't see any alerts in my Snort-log anymore.

            Thank you for your answer  ;D

            The paid subscription Oinkcode automatically includes the "Snort Community Rules" in the downloaded rule set, so you do not need to manually select those anymore.

            Just check the Snort VRT rules (and optionally Emerging Threats if you want some of those), then choose an IPS Policy.  You will get the Community Rules this way.

            Bill

            1 Reply Last reply Reply Quote 0
            • J
              jdsilva
              last edited by Oct 4, 2013, 3:00 AM

              I have snort up and running. I subscribed to the VRT rules. However when I added my oinkcode, it doesn't seem to download the latest subscriber rules. For example I ran the update today, and it downloaded snortrules-snapshot-2946.tar.gz Sept 3. It should have downloaded snortrules-snapshot-2950.tar.gz

              1 Reply Last reply Reply Quote 0
              • B
                bmeeks
                last edited by Oct 8, 2013, 3:14 PM

                @jdsilva:

                I have snort up and running. I subscribed to the VRT rules. However when I added my oinkcode, it doesn't seem to download the latest subscriber rules. For example I ran the update today, and it downloaded snortrules-snapshot-2946.tar.gz Sept 3. It should have downloaded snortrules-snapshot-2950.tar.gz

                No, the binary version of Snort is considered when downloading rule updates.  The rules are coded for the different binary versions.  Snort on pfSense is currently version 2.9.4.6, so you will download the 2.9.4.6 rules snapshot.  The rules usually update on Tuesday and Thursday over at Snort.org.

                An update to the 2.9.5.5 Snort binary for the pfSense Snort package should come out late this month or early in November.  Testing it now.

                Bill

                1 Reply Last reply Reply Quote 1
                • C
                  coolcat1975
                  last edited by Oct 16, 2013, 12:48 PM

                  Hi!

                  I am using policy connectivity.
                  I am getting false positives for ssp_ssl: Invalid Client HELLO after Server HELLO Detected.

                  How can i disable this policy when using policy?

                  best regards

                  Karl

                  1 Reply Last reply Reply Quote 0
                  • B
                    bmeeks
                    last edited by Oct 16, 2013, 3:05 PM

                    @coolcat1975:

                    Hi!

                    I am using policy connectivity.
                    I am getting false positives for ssp_ssl: Invalid Client HELLO after Server HELLO Detected.

                    How can i disable this policy when using policy?

                    best regards

                    Karl

                    You can't easily disable this directly because it is a preprocessor alert.  I've seen some traffic about this alert on the Snort mailing list that indicates it is a potential bug in the preprocesor code.

                    The best workaround for now is to create a Suppress List entry for this alert.  On the ALERTS tab, click the little plus sign (+) next to the alert's GID:SID.  This will automatically add it to the Suppress List and you won't get blocks on those IPs.  You will still see the alert in the ALERTS tab, but it will not block the offending IP.

                    After adding the Suppress entry, restart Snort on the affect interface.

                    Bill

                    1 Reply Last reply Reply Quote 0
                    • C
                      coolcat1975
                      last edited by Oct 16, 2013, 4:33 PM

                      hi!

                      thanks for your answer.

                      i am aware about the supress function but best practice says that you should disable the rule.

                      anyway: i will test supressing as all alerts are forwarded to icinga. i hope this will also be supressed

                      greetings

                      karl

                      1 Reply Last reply Reply Quote 0
                      • B
                        bmeeks
                        last edited by Oct 17, 2013, 1:28 AM

                        @coolcat1975:

                        hi!

                        thanks for your answer.

                        i am aware about the supress function but best practice says that you should disable the rule.

                        anyway: i will test supressing as all alerts are forwarded to icinga. i hope this will also be supressed

                        greetings

                        karl

                        Disabling is the best, but with today's hardware capability just suppressing is fine.  That's the answer you generally get from the Snort VRT folks as well.  Maybe if you are inspecting 1 Gbit/sec plus traffic loads, the distinction between disabling and suppressing matters; but for most folks with modern hardware there is no meaning difference.

                        Bill

                        1 Reply Last reply Reply Quote 0
                        • C
                          coolcat1975
                          last edited by Oct 17, 2013, 12:11 PM

                          Just another question:

                          If snort is bound to Interface WAN and pfsense is in transparent mode, how is snort working when blocking is activated?

                          does snort drop the packet and blocks the ip or is the packet passed and then the ip is blocked?

                          regards

                          karl

                          1 Reply Last reply Reply Quote 0
                          • B
                            bmeeks
                            last edited by Oct 17, 2013, 2:43 PM

                            @coolcat1975:

                            Just another question:

                            If snort is bound to Interface WAN and pfsense is in transparent mode, how is snort working when blocking is activated?

                            does snort drop the packet and blocks the ip or is the packet passed and then the ip is blocked?

                            regards

                            karl

                            I honestly don't know the answer to that question.  I've never tested Snort on pfSense in Transparent Mode.  I suspect the traffic will still get blocked because Snort actually uses the packet filter engine and its tables to insert blocks.  In that sense it operates just like the firewall module itself.

                            Where Snort might get tripped up in Transparent Mode is with the defintion of $HOME_NET and $EXTERNAL_NET variables.

                            Bill

                            1 Reply Last reply Reply Quote 0
                            • S
                              sebna
                              last edited by Oct 17, 2013, 10:24 PM Oct 17, 2013, 10:21 PM

                              Hi,

                              Thanks for great guide.

                              Before I found it I just went through all the options and configured as I thought it makes sense to my limited knowledge and I did one thing differently.

                              I went to my defined WAN interface in snort -> Wan Rules -> selected from drop down GPLv2 rules and pressed on enable all rules in the current category as they were all greyed out before that and seemed inactive - is this necessary step and what it actually means if I leave all of them greyed out and what it means if I enable them.

                              Also in point

                              20.  If you followed my advice for Snort VRT rules, this page is easy.  Just click the check box for "Use IPS Policy" and then select "Connectivity" in the drop-down.  Click Save and you're done!  Once you gain some experience with Snort, you can come back and choose one of the other two more restrictive policies.  I personally run "Balanced", but it will require some tuning if run in blocking mode.

                              If I only registered an account (without a paid subscription) to get access to GPL rules should I tick or leave the "Use IPS Policy" box unticked?

                              If I have mail server, DNS, DHCP and SQL server on my LAN should I define the names in WAN Variables and if yes what is the correct syntax? Can it be IP or is it a FQN

                              Thank you for explaining any of the above.

                              seb

                              1 Reply Last reply Reply Quote 0
                              • B
                                bmeeks
                                last edited by Oct 18, 2013, 2:19 AM Oct 18, 2013, 2:17 AM

                                @sebna:

                                I went to my defined WAN interface in snort -> Wan Rules -> selected from drop down GPLv2 rules and pressed on enable all rules in the current category as they were all greyed out before that and seemed inactive - is this necessary step and what it actually means if I leave all of them greyed out and what it means if I enable them.

                                Also in point

                                20.  If you followed my advice for Snort VRT rules, this page is easy.  Just click the check box for "Use IPS Policy" and then select "Connectivity" in the drop-down.  Click Save and you're done!  Once you gain some experience with Snort, you can come back and choose one of the other two more restrictive policies.  I personally run "Balanced", but it will require some tuning if run in blocking mode.

                                If I only registered an account (without a paid subscription) to get access to GPL rules should I tick or leave the "Use IPS Policy" box unticked?

                                If I have mail server, DNS, DHCP and SQL server on my LAN should I define the names in WAN Variables and if yes what is the correct syntax? Can it be IP or is it a FQN

                                Thank you for explaining any of the above.

                                seb

                                If you registered at Snort.org for the free account, that entitles you to the full Snort VRT rules download.  The only caveat is they are 30 days older than the rules the paid subscribers get.  As for the GPLv2 Community Rules, generally only a few of them will be enabled by default.  You can turn on the ones of interest to you.  If you don't want the headache of figuring out which Community Rules you want or need, then an easier approach in my view is to enable and use the Emerging Threats rules instead.  They stay pretty current and are arranged in categories that give clues as to what the rules are doing.

                                You can use the IPS Policy with the Snort VRT rules whether you have a paid or free account.  The only difference in paid versus free is the age of the rules.  As I mentioned, the paid subscribers get current updates.  The free account registered users get the new rules 30 days after the paid users.  It's a 30-day rolling sort of thing.  But the same IPS policies are available in both sets of rules.

                                If you have Mail, DNS and other specific servers on your network, you can certainly define their IP addresses for Snort. This makes Snort's job a bit easier.  By default, it assumes all the IP addresses in your network are all of the potential servers.  So this means it sort of inspects all traffic for all IPs for everything.  You can narrow this down by defining where some services are located (that is, which IP addresses host those services on your HOME_NET networks).  Armed with that information, Snort won't waste time looking for HTTP web exploits against a DNS or DHCP server.  It does this by matching the IP address in the target to the values you define in the variables.

                                To define servers or ports on the VARIABLES tab, you must first create a corresponding Alias under Firewall…Alias from the pfSense menu.  Type a descriptive name for the Alias, such as DNS_Servers, and then enter the IP addresses of all of your DNS servers.  Repeat the process to create Aliases for any other servers.  Now go to the VARIABLES tab in Snort and scroll down to the server description.  Start typing the name of the Alias you defined earlier.  It should auto-complete in the Alias form field.  Click SAVE when done.

                                1 Reply Last reply Reply Quote 1
                                • S
                                  sebna
                                  last edited by Oct 18, 2013, 6:13 PM

                                  Thank you Bill,

                                  It was late and I was tried yesterday :) I found the cause of the problem and basically I just need a restart for my OINK to work and to be able to download the definitions…

                                  Thank you for clarifying other things and advice. Much appreciated as the whole guide :)

                                  Seb

                                  1 Reply Last reply Reply Quote 0
                                  • C
                                    coolcat1975
                                    last edited by Oct 18, 2013, 10:26 PM Oct 18, 2013, 9:54 PM

                                    hi!

                                    is it possible to run snort-inline?

                                    actually if not then i wouldnt call it an IPS.

                                    regards

                                    Karl

                                    1 Reply Last reply Reply Quote 0
                                    • B
                                      bmeeks
                                      last edited by Oct 19, 2013, 12:39 AM

                                      @coolcat1975:

                                      hi!

                                      is it possible to run snort-inline?

                                      actually if not then i wouldnt call it an IPS.

                                      regards

                                      Karl

                                      Snort is kinda-sorta "inline" on pfSense.  It can insert blocks into the firewall.  It is not 100% technically inline like it would be in a classic pure IPS.

                                      Bill

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        sebna
                                        last edited by Oct 20, 2013, 3:09 AM

                                        My SNORT will produce a lot alerts but only few blocks (ATM it runs only on WAN interface). Before adding pfblocker and running Snort in "Use IPS Policy" (I run it in security mode) it was blocking a lot more.

                                        I dont have any custom whitelist and my Suppress contains only of google ip(s).

                                        Any ideas?

                                        Thanks

                                        1 Reply Last reply Reply Quote 0
                                        • B
                                          bmeeks
                                          last edited by Oct 20, 2013, 2:53 PM

                                          @sebna:

                                          … Before adding pfblocker and running Snort in "Use IPS Policy" (I run it in security mode) it was blocking a lot more.

                                          I dont have any custom whitelist and my Suppress contains only of google ip(s).

                                          Any ideas?

                                          Thanks

                                          It could be that pfBlocker is preempting Snort and putting blocks in place.  I don't think the blocks of a particular IP address will be duplicated.

                                          Also, you did not post the version of pfSense you are running.  If it is 2.1, then a problem with the filter_reload() function within that version of pfSense periodically clears the Snort block table.  So Snort is possibly blocking the IP, then the pfSense filter_reload() function comes along and clears the table.  When you look at the BLOCKED tab in Snort, it is actually reading the current entries from the snort2c block table that pfSense maintains.  The table may have been recently cleansed by the filter_reload() routine.

                                          However, even considering the above, protection afforded by Snort is still there.  On the next offending packet from one of those formerly blocked IP addresses, Snort will insert a fresh block.

                                          Bill

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