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

    Can I (how do I) exempt traffic from certainIP's from being scanned

    Scheduled Pinned Locked Moved IDS/IPS
    16 Posts 3 Posters 616 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.
    • M
      manilx
      last edited by

      Hi

      when I use Suricata, even on a 8200, it slows down my nightly backups from the company to a NAS on my home. Downloading files from internet etc doesn't seem to slow down BUT this specific task (backup from QNAP to QNAP over the internet is slowed down).

      So can I exempt certain IP's from "entering" the suricata scan?

      Netgate 8200max

      NollipfSenseN 1 Reply Last reply Reply Quote 0
      • NollipfSenseN
        NollipfSense @manilx
        last edited by

        @manilx said in Can I (how do I) exempt traffic from certainIP's from being scanned:

        So can I exempt certain IP's from "entering" the suricata scan?

        Sure you can...either create a pass list or suppress a rule (qnap) for a certain IP.
        Screenshot 2023-05-23 at 6.21.51 AM.png

        pfSense+ 23.09 Lenovo Thinkcentre M93P SFF Quadcore i7 dual Raid-ZFS 128GB-SSD 32GB-RAM PCI-Intel i350-t4 NIC, -Intel QAT 8950.
        pfSense+ 23.09 VM-Proxmox, Dell Precision Xeon-W2155 Nvme 500GB-ZFS 128GB-RAM PCIe-Intel i350-t4, Intel QAT-8950, P-cloud.

        M 1 Reply Last reply Reply Quote 0
        • M
          manilx @NollipfSense
          last edited by

          @nollipfsense I have put an alias with the IP's in a new Pass List.

          Where do I assign this?

          Netgate 8200max

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

            @manilx said in Can I (how do I) exempt traffic from certainIP's from being scanned:

            @nollipfsense I have put an alias with the IP's in a new Pass List.

            Where do I assign this?

            Pass Lists are assigned under the INTERFACE SETTINGS tab in Suricata. Once you assign a Pass List and save the change, you must restart Suricata on that interface to activate the change.

            M 1 Reply Last reply Reply Quote 0
            • M
              manilx @bmeeks
              last edited by

              @bmeeks Did the following, which I guess is correct:

              created passlist:
              ScreenShot 2023-05-23 at 13.11.25.png

              added it under the respective interface:
              ScreenShot 2023-05-23 at 13.11.38.png

              Netgate 8200max

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

                @manilx:
                No, you have assigned it to the $HOME_NET variable. That is very wrong. Never modify HOME_NET unless you are very experienced with an IDS/IPS and have a very specific reason for doing so. Making the change you put in place there has likely totally neutered your IDS/IPS.

                Are you using Inline IPS Mode or Legacy Mode Blocking? If using Legacy Mode (which is the default), then you will see a Pass List drop-down box to configure. If using Inline IPS Mode, then Pass Lists are not used and the drop-down will be hidden.

                With Inline IPS Mode, you must create custom PASS rules for Suricata on the RULES tab. PASS rules are evaulated first, and traffic matching a PASS rule is exempted from any further processing by Suricata. You can find the proper syntax for PASS rules with a simple Google search. Just be careful that your rule is very specific in terms of the IP addressing. It will be very easy for an improper rule to essentially result in bad traffic bypassing the IDS/IPS.

                M 1 Reply Last reply Reply Quote 0
                • M
                  manilx @bmeeks
                  last edited by

                  @bmeeks I have IPS Mode.
                  Disabled my settings.

                  Created a new passrule with only the alias.
                  ScreenShot 2023-05-23 at 13.24.35.png

                  Sorry but I don't see how to create the pass rule :(

                  Can you help. I just need this passrule/alias applied. No suricata scanning on those incomming IP's. (I have suricata checking the WAN interface, yes I know, matter of debate ;) )

                  Netgate 8200max

                  M bmeeksB 3 Replies Last reply Reply Quote 0
                  • M
                    manilx @manilx
                    last edited by

                    @manilx Found this pass rule you posted in another post:

                    pass ip 1.2.3.4 any <> any any (msg:"pass all traffic from/to 1.2.3.4"; sid:100000;)
                    

                    No I only need to know where to put this....

                    Netgate 8200max

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

                      @manilx:
                      You are still stuck in the Pass List mode based on the last screenshot you posted. PASS rules have nothing to do with Pass Lists. Pass Lists are used to prevent IPs from ever getting blocked in Legacy Blocking Mode. That's all they do. They do not exempt IP addresses from scanning. I thought at first reading you wanted to be sure your Alias IPs were never blocked.

                      PASS rules are actual Suricata text rules just like the rules you might download and enable from Snort VRT or Emerging Threats. They just have the rule action PASS instead of ALERT or DROP. Here is a link to the official Suricata documentation describing PASS rules: https://suricata.readthedocs.io/en/suricata-6.0.0/performance/ignoring-traffic.html#pass-rules.

                      Because PASS rules are native Suricata constructs, they do not understand pfSense aliases. You cannot use an Alias name in Suricata rules. The best you can do is custom rules with specific IP addresses or subnets.

                      You create custom rules by going to the RULES tab and selecting Custom in the Category drop-down. Then type in your custom rules in the text box that appears and save them.

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

                        @manilx said in Can I (how do I) exempt traffic from certainIP's from being scanned:

                        I have suricata checking the WAN interface, yes I know, matter of debate ;)

                        You are wasting a lot of CPU cycles doing that. Suricata is seeing and scanning all the Internet "noise" hitting your firewall. Every CPU cycle consumed to scan traffic that is going to be blocked by firewall rules later on is a CPU cycle that could have been used to improve throughput by reading/writing buffers associated with the NIC transferring data (in other words, throughput).

                        Let the firewall do its job on the WAN side and block most or all of the noise. Then Suricata has less work to do and throughput should improve.

                        M 1 Reply Last reply Reply Quote 0
                        • M
                          manilx @bmeeks
                          last edited by

                          @bmeeks Found it!!!!

                          Added 2 rules for both IP's I want excluded:

                          pass ip 1.2.3.4 any <> any any (msg:"pass all traffic from/to 1.2.3.4"; sid:100000;)
                          

                          Netgate 8200max

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

                            @bmeeks I've so much contradictory info on this.....
                            I guess I settled with the opinions that it would be OK to scan the WAN if one does have ports open, which I have.

                            Netgate 8200max

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

                              @manilx said in Can I (how do I) exempt traffic from certainIP's from being scanned:

                              @bmeeks I've so much contradictory info on this.....
                              I guess I settled with the opinions that it would be OK to scan the WAN if one does have ports open, which I have.

                              Here's the bottom line on open ports. First, you should not be depending on Suricata to protect your firewall. If your firewall has issues, then you are hosed. Suricata and any IDS/IPS is for protecting the networks behind the firewall -- not for protecting the firewall itself.

                              In pfSense, nothing can get to your internal networks without first passing through the IDS/IPS when you are running the IDS/IPS on an internal interface. So, you give up no protection by running on the internal interface.

                              The only reason to consider running the IDS/IPS on the WAN would be a situation where you have very limited RAM and want to protect a number of internal interfaces. In that scenario, running an IDS/IPS instance on each internal interface might run you out of available RAM. But the better solution would be to upgrade RAM. Another possible reason to run a single WAN instance would be if you had an anemic CPU and didn't have enough horsepower to run multiple instances. Again, though, upgrading the hardware would be a better choice.

                              Running on the WAN brings two big negatives in my view. First, you uselessly scan all the Internet noise the WAN firewall rules are likely going to drop anyway. You scanned traffic and wasted CPU cycles for nothing. You also fill up your alert logs with that scanned noise. Second, you can only see the WAN public IP for all internal hosts due to NAT. So, tracking down which internal host is a problem is difficult at best. When you run on the internal interfaces, then all the native IPs show up and locating a problem host is easy.

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

                                @manilx said in Can I (how do I) exempt traffic from certainIP's from being scanned:

                                @bmeeks Found it!!!!

                                Added 2 rules for both IP's I want excluded:

                                pass ip 1.2.3.4 any <> any any (msg:"pass all traffic from/to 1.2.3.4"; sid:100000;)
                                

                                Make sure you incremented the SID for each rule so that you do not have a duplicate SID!

                                M 1 Reply Last reply Reply Quote 0
                                • M
                                  manilx @bmeeks
                                  last edited by

                                  @bmeeks ScreenShot 2023-05-23 at 14.23.32.png

                                  Netgate 8200max

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    manilx @bmeeks
                                    last edited by

                                    @bmeeks Thanks for this precise description.
                                    OK reverted to scanning LAN ;)

                                    Netgate 8200max

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