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

    Rule Behavior Check Please!

    IDS/IPS
    4
    7
    603
    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.
    • U
      uplink
      last edited by uplink

      Hi All,

      I've been running Suricata now for a while (in IDS mode) and would like to enable blocking (legacy mode) on the LAN interface. However, I was wondering about the behavior for an alert that pops up once and a while (see screenshot below). In this case, an alert is thrown because a client made a suspicious DNS request to the router. So, if I enabled blocking, would this block the client, the router, both or neither?

      Any insight would be super helpful. I really don't want to accidently lock myself out or something. 😢

      screen_shot.jpg

      NogBadTheBadN Bob.DigB bmeeksB 3 Replies Last reply Reply Quote 0
      • NogBadTheBadN
        NogBadTheBad @uplink
        last edited by

        @uplink said in Rule Behavior Check Please!:

        I've been running Suricata now for a whi

        If its anything like snort, you define if you block the source, destination or both.

        Andy

        1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

        1 Reply Last reply Reply Quote 0
        • Bob.DigB
          Bob.Dig LAYER 8 @uplink
          last edited by

          @uplink Local addresses never will be blocked, at least in theory. 😉
          But in any way, you should disable rules that don't fit your needs.

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

            @uplink said in Rule Behavior Check Please!:

            Hi All,

            I've been running Suricata now for a while (in IDS mode) and would like to enable blocking (legacy mode) on the LAN interface. However, I was wondering about the behavior for an alert that pops up once and a while (see screenshot below). In this case, an alert is thrown because a client made a suspicious DNS request to the router. So, if I enabled blocking, would this block the client, the router, both or neither?

            Any insight would be super helpful. I really don't want to accidently lock myself out or something. 😢

            screen_shot.jpg

            There is an automatic default pass list that is created and honored to prevent blocking of any direct firewall interface IP addresses (meaning the actual /32 IP address assigned to the firewall interface). Additionally, the default Pass List contains all locally defined IP subnets. IP addresses contained in a Pass List (including the default one) are not blocked.

            1 Reply Last reply Reply Quote 0
            • U
              uplink
              last edited by

              Hey @bmeeks ,

              Sounds like those default lists you are talking about are maybe those "Home_Net" and "External_Net" lists? So in my example, it sounds like I will see this alert, but neither of these internal IPs will actually be blocked (even though blocking is enabled).

              I think I understand. Thank you all so much for the quick response!

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

                @uplink said in Rule Behavior Check Please!:

                Hey @bmeeks ,

                Sounds like those default lists you are talking about are maybe those "Home_Net" and "External_Net" lists? So in my example, it sounds like I will see this alert, but neither of these internal IPs will actually be blocked (even though blocking is enabled).

                I think I understand. Thank you all so much for the quick response!

                Well, that's not totally correct for HOME_NET and EXTERNAL_NET. Those are specialized variables that serve another purpose related to how rules are triggered. More on that in a second.

                I was specifically speaking of a new drop-down that will appear when you enable Legacy Mode Blocking called Pass List. There are some default entries that get populated for the "default" Pass List. That drop-down is hidden until you enable Legacy Blocking Mode.

                HOME_NET and EXTERNAL_NET are used in the conditionals for rule triggering. HOME_NET is the collection of IP addresses and/or subnets that are to be protected. That variable represents your "network treasure" you are protecting. EXTERNAL_NET is usually defined as !HOME_NET (where the exclamation point means logical NOT). Or in other words, EXTERNAL_NET is the IP addresses of the "bad guys". And by using the definition !HOME_NET for EXTERNAL_NET, that means any IP address not covered in HOME_NET is automatically in EXTERNAL_NET. Many of the rules are written similar to this:

                alert tcp $HOME_NET any -> $EXTERNAL_NET any ....
                

                So this rule snippet needs an IP address in the $HOME_NET variable to be communicating with an IP address in the $EXTERNAL_NET variable (and the protocol must be tcp for this example rule) in order for the rule to trigger. Conversely, you will also see rules written like this:

                alert udp $EXTERNAL_NET any -> $HOME_NET any ....
                

                This rule requires an IP in EXTERNAL_NET to be attempting to send a udp packet to an IP in HOME_NET in order to trigger.

                You should never monkey around with HOME_NET or EXTERNAL_NET unless you are quite experienced with IDS/IPS operation and fully understand the potential consequences of a misconfiguration there. Putting the wrong values in those variables can render the IDS/IPS almost worthless because the rule conditional for source and destination will not be satisfied and therefore the rule will not trigger.

                U 1 Reply Last reply Reply Quote 0
                • U
                  uplink @bmeeks
                  last edited by

                  @bmeeks

                  Oh, I see the PASS list now, it was right below the EXTERNAL_NET in the UI. Also, thank you so much for that explanation on HOME_NET and EXTERNAL_NET. That makes sense the way you've explained it. I really apricate you taking the time to do that. :)

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