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

    Suricata custom rules error

    Scheduled Pinned Locked Moved IDS/IPS
    4 Posts 2 Posters 733 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
      mind12
      last edited by

      Hi,

      i would like to ask for some help about custom rules.

      Suricata version: 4.0.13_9
      Pfsense version:
      2.4.4-RELEASE (amd64)
      built on Thu Sep 20 09:03:12 EDT 2018
      FreeBSD 11.2-RELEASE-p3

      These custom rules used to parsed ok but now I get:

      31/10/2018 -- 09:42:16 - <Error> -- [ERRCODE: SC_ERR_INVALID_SIGNATURE(39)] - error parsing signature "pass tcp $HOME_NET any -> [138.128.181.26,198.241.44.44,207.7.86.99,188.138.33.107,91.82.85.115,84.2.36.214,87.229.111.247,82.131.163.200,194.140.248.43,198.91.84.81]  (msg:"pass tcp traffic from HOME_NET to exceptions"; sid:100001;)" from file /usr/local/etc/suricata/suricata_11138_em0/rules/custom.rules at line 1
      

      What am I missing?

      pass tcp $HOME_NET any -> [138.128.181.26,198.241.44.44,207.7.86.99,188.138.33.107,91.82.85.115,84.2.36.214,87.229.111.247,82.131.163.200,194.140.248.43,198.91.84.81]  (msg:"pass tcp traffic from HOME_NET to exceptions"; sid:100001;)
      pass tcp [138.128.181.26,198.241.44.44,207.7.86.99,188.138.33.107,91.82.85.115,84.2.36.214,87.229.111.247,82.131.163.200,194.140.248.43,198.91.84.81] [80,443] -> $HOME_NET any (msg:"pass tcp traffic from EXT_NET to exceptions"; sid:100002;)
      

      Thank you.

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

        You appear to be missing the PORTS part of your rule. The general syntax looks like this:

        IP_ADDRESS PORT of Source and IP_ADDRESS PORT of Destination. So try putting another "any" at the end of your list of IP addresses in the brackets. That would make your rule look like this:

        pass tcp $HOME_NET any -> [138.128.181.26,198.241.44.44,207.7.86.99,188.138.33.107,91.82.85.115,84.2.36.214,87.229.111.247,82.131.163.200,194.140.248.43,198.91.84.81] any (msg:"pass tcp traffic from HOME_NET to exceptions"; sid:100001;)
        
        1 Reply Last reply Reply Quote 0
        • M
          mind12
          last edited by

          Thank you, that was the problem.

          Do you recommend disabling the rules that fail to parse during suricata start or just leave them?

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

            They aren't going to be used, so it's your call. Really doesn't matter since they are not loaded anyway and thus won't consume any resources (other than the brief milliseconds of CPU time expended during the initial startup of Suricata).

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