byevincent

Untitled

Jan 26th, 2025
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 73.08 KB | Cybersecurity | 0 0
  1. %YAML 1.1
  2. ---
  3.  
  4. # Suricata configuration file. In addition to the comments describing all
  5. # options in this file, full documentation can be found at:
  6. # https://suricata.readthedocs.io/en/latest/configuration/suricata-yaml.html
  7.  
  8. ##
  9. ## Step 1: Inform Suricata about your network
  10. ##
  11.  
  12. vars:
  13.   # more specific is better for alert accuracy and performance
  14.   address-groups:
  15.     HOME_NET: "[172.31.47.27/20, 10.0.1.60/24]"
  16.     #HOME_NET: "[192.168.0.0/16]"
  17.     #HOME_NET: "[10.0.0.0/8]"
  18.     #HOME_NET: "[172.16.0.0/12]"
  19.     #HOME_NET: "any"
  20.  
  21.     EXTERNAL_NET: "!$HOME_NET"
  22.     #EXTERNAL_NET: "any"
  23.  
  24.     HTTP_SERVERS: "$HOME_NET"
  25.     SMTP_SERVERS: "$HOME_NET"
  26.     SQL_SERVERS: "$HOME_NET"
  27.     DNS_SERVERS: "$HOME_NET"
  28.     TELNET_SERVERS: "$HOME_NET"
  29.     AIM_SERVERS: "$EXTERNAL_NET"
  30.     DC_SERVERS: "$HOME_NET"
  31.     DNP3_SERVER: "$HOME_NET"
  32.     DNP3_CLIENT: "$HOME_NET"
  33.     MODBUS_CLIENT: "$HOME_NET"
  34.     MODBUS_SERVER: "$HOME_NET"
  35.     ENIP_CLIENT: "$HOME_NET"
  36.     ENIP_SERVER: "$HOME_NET"
  37.  
  38.   port-groups:
  39.     HTTP_PORTS: "80"
  40.     SHELLCODE_PORTS: "!80"
  41.     ORACLE_PORTS: 1521
  42.     SSH_PORTS: 22
  43.     DNP3_PORTS: 20000
  44.     MODBUS_PORTS: 502
  45.     FILE_DATA_PORTS: "[$HTTP_PORTS,110,143]"
  46.     FTP_PORTS: 21
  47.     GENEVE_PORTS: 6081
  48.     VXLAN_PORTS: 4789
  49.     TEREDO_PORTS: 3544
  50.  
  51. ##
  52. ## Step 2: Select outputs to enable
  53. ##
  54.  
  55. # The default logging directory.  Any log or output file will be
  56. # placed here if it's not specified with a full path name. This can be
  57. # overridden with the -l command line parameter.
  58. default-log-dir: /var/log/suricata/
  59.  
  60. # Global stats configuration
  61. stats:
  62.   enabled: yes
  63.   # The interval field (in seconds) controls the interval at
  64.   # which stats are updated in the log.
  65.   interval: 8
  66.   # Add decode events to stats.
  67.   #decoder-events: true
  68.   # Decoder event prefix in stats. Has been 'decoder' before, but that leads
  69.   # to missing events in the eve.stats records. See issue #2225.
  70.   #decoder-events-prefix: "decoder.event"
  71.   # Add stream events as stats.
  72.   #stream-events: false
  73.  
  74. # Configure the type of alert (and other) logging you would like.
  75. outputs:
  76.   # a line based alerts log similar to Snort's fast.log
  77.   - fast:
  78.       enabled: yes
  79.       filename: fast.log
  80.       append: yes
  81.       #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
  82.  
  83.   # Extensible Event Format (nicknamed EVE) event log in JSON format
  84.   - eve-log:
  85.       enabled: yes
  86.       filetype: regular #regular|syslog|unix_dgram|unix_stream|redis
  87.       filename: eve.json
  88.       # Enable for multi-threaded eve.json output; output files are amended with
  89.       # with an identifier, e.g., eve.9.json
  90.       #threaded: false
  91.       #prefix: "@cee: " # prefix to prepend to each log entry
  92.       # the following are valid when type: syslog above
  93.       #identity: "suricata"
  94.       #facility: local5
  95.       #level: Info ## possible levels: Emergency, Alert, Critical,
  96.                    ## Error, Warning, Notice, Info, Debug
  97.       #ethernet: no  # log ethernet header in events when available
  98.       #redis:
  99.       #  server: 127.0.0.1
  100.       #  port: 6379
  101.       #  async: true ## if redis replies are read asynchronously
  102.       #  mode: list ## possible values: list|lpush (default), rpush, channel|publish
  103.       #             ## lpush and rpush are using a Redis list. "list" is an alias for lpush
  104.       #             ## publish is using a Redis channel. "channel" is an alias for publish
  105.       #  key: suricata ## key or channel to use (default to suricata)
  106.       # Redis pipelining set up. This will enable to only do a query every
  107.       # 'batch-size' events. This should lower the latency induced by network
  108.       # connection at the cost of some memory. There is no flushing implemented
  109.       # so this setting should be reserved to high traffic Suricata deployments.
  110.       #  pipelining:
  111.       #    enabled: yes ## set enable to yes to enable query pipelining
  112.       #    batch-size: 10 ## number of entries to keep in buffer
  113.  
  114.       # Include top level metadata. Default yes.
  115.       #metadata: no
  116.  
  117.       # include the name of the input pcap file in pcap file processing mode
  118.       pcap-file: false
  119.  
  120.       # Community Flow ID
  121.       # Adds a 'community_id' field to EVE records. These are meant to give
  122.       # records a predictable flow ID that can be used to match records to
  123.       # output of other tools such as Zeek (Bro).
  124.       #
  125.       # Takes a 'seed' that needs to be same across sensors and tools
  126.       # to make the id less predictable.
  127.  
  128.       # enable/disable the community id feature.
  129.       community-id: false
  130.       # Seed value for the ID output. Valid values are 0-65535.
  131.       community-id-seed: 0
  132.  
  133.       # HTTP X-Forwarded-For support by adding an extra field or overwriting
  134.       # the source or destination IP address (depending on flow direction)
  135.       # with the one reported in the X-Forwarded-For HTTP header. This is
  136.       # helpful when reviewing alerts for traffic that is being reverse
  137.       # or forward proxied.
  138.       xff:
  139.         enabled: no
  140.         # Two operation modes are available: "extra-data" and "overwrite".
  141.         mode: extra-data
  142.         # Two proxy deployments are supported: "reverse" and "forward". In
  143.         # a "reverse" deployment the IP address used is the last one, in a
  144.         # "forward" deployment the first IP address is used.
  145.         deployment: reverse
  146.         # Header name where the actual IP address will be reported. If more
  147.         # than one IP address is present, the last IP address will be the
  148.         # one taken into consideration.
  149.         header: X-Forwarded-For
  150.  
  151.       types:
  152.         # - alert:
  153.             # payload: yes             # enable dumping payload in Base64
  154.             # payload-buffer-size: 4kb # max size of payload buffer to output in eve-log
  155.             # payload-printable: yes   # enable dumping payload in printable (lossy) format
  156.             # packet: yes              # enable dumping of packet (without stream segments)
  157.             # metadata: no             # enable inclusion of app layer metadata with alert. Default yes
  158.             # http-body: yes           # Requires metadata; enable dumping of HTTP body in Base64
  159.             # http-body-printable: yes # Requires metadata; enable dumping of HTTP body in printable format
  160.  
  161.             # Enable the logging of tagged packets for rules using the
  162.             # "tag" keyword.
  163.             # tagged-packets: yes
  164.         - anomaly:
  165.             # Anomaly log records describe unexpected conditions such
  166.             # as truncated packets, packets with invalid IP/UDP/TCP
  167.             # length values, and other events that render the packet
  168.             # invalid for further processing or describe unexpected
  169.             # behavior on an established stream. Networks which
  170.             # experience high occurrences of anomalies may experience
  171.             # packet processing degradation.
  172.             #
  173.             # Anomalies are reported for the following:
  174.             # 1. Decode: Values and conditions that are detected while
  175.             # decoding individual packets. This includes invalid or
  176.             # unexpected values for low-level protocol lengths as well
  177.             # as stream related events (TCP 3-way handshake issues,
  178.             # unexpected sequence number, etc).
  179.             # 2. Stream: This includes stream related events (TCP
  180.             # 3-way handshake issues, unexpected sequence number,
  181.             # etc).
  182.             # 3. Application layer: These denote application layer
  183.             # specific conditions that are unexpected, invalid or are
  184.             # unexpected given the application monitoring state.
  185.             #
  186.             # By default, anomaly logging is enabled. When anomaly
  187.             # logging is enabled, applayer anomaly reporting is
  188.             # also enabled.
  189.             enabled: yes
  190.             #
  191.             # Choose one or more types of anomaly logging and whether to enable
  192.             # logging of the packet header for packet anomalies.
  193.             types:
  194.               # decode: no
  195.               # stream: no
  196.               # applayer: yes
  197.             #packethdr: no
  198.         - http:
  199.             extended: yes     # enable this for extended logging information
  200.             # custom allows additional HTTP fields to be included in eve-log.
  201.             # the example below adds three additional fields when uncommented
  202.             #custom: [Accept-Encoding, Accept-Language, Authorization]
  203.             # set this value to one and only one from {both, request, response}
  204.             # to dump all HTTP headers for every HTTP request and/or response
  205.             # dump-all-headers: none
  206.         - dns:
  207.             # This configuration uses the new DNS logging format,
  208.             # the old configuration is still available:
  209.             # https://suricata.readthedocs.io/en/latest/output/eve/eve-json-output.html#dns-v1-format
  210.  
  211.             # As of Suricata 5.0, version 2 of the eve dns output
  212.             # format is the default.
  213.             #version: 2
  214.  
  215.             # Enable/disable this logger. Default: enabled.
  216.             #enabled: yes
  217.  
  218.             # Control logging of requests and responses:
  219.             # - requests: enable logging of DNS queries
  220.             # - responses: enable logging of DNS answers
  221.             # By default both requests and responses are logged.
  222.             #requests: no
  223.             #responses: no
  224.  
  225.             # Format of answer logging:
  226.             # - detailed: array item per answer
  227.             # - grouped: answers aggregated by type
  228.             # Default: all
  229.             #formats: [detailed, grouped]
  230.  
  231.             # DNS record types to log, based on the query type.
  232.             # Default: all.
  233.             #types: [a, aaaa, cname, mx, ns, ptr, txt]
  234.         - tls:
  235.             extended: yes     # enable this for extended logging information
  236.             # output TLS transaction where the session is resumed using a
  237.             # session id
  238.             #session-resumption: no
  239.             # custom controls which TLS fields that are included in eve-log
  240.             #custom: [subject, issuer, session_resumed, serial, fingerprint, sni, version, not_before, not_after, certificate, chain, ja3, ja3s]
  241.         - files:
  242.             force-magic: no   # force logging magic on all logged files
  243.             # force logging of checksums, available hash functions are md5,
  244.             # sha1 and sha256
  245.             #force-hash: [md5]
  246.         #- drop:
  247.         #    alerts: yes      # log alerts that caused drops
  248.         #    flows: all       # start or all: 'start' logs only a single drop
  249.         #                     # per flow direction. All logs each dropped pkt.
  250.         - smtp:
  251.             #extended: yes # enable this for extended logging information
  252.             # this includes: bcc, message-id, subject, x_mailer, user-agent
  253.             # custom fields logging from the list:
  254.             #  reply-to, bcc, message-id, subject, x-mailer, user-agent, received,
  255.             #  x-originating-ip, in-reply-to, references, importance, priority,
  256.             #  sensitivity, organization, content-md5, date
  257.             #custom: [received, x-mailer, x-originating-ip, relays, reply-to, bcc]
  258.             # output md5 of fields: body, subject
  259.             # for the body you need to set app-layer.protocols.smtp.mime.body-md5
  260.             # to yes
  261.             #md5: [body, subject]
  262.  
  263.         #- dnp3
  264.         - ftp
  265.         - rdp
  266.         - nfs
  267.         - smb
  268.         - tftp
  269.         - ikev2
  270.         - dcerpc
  271.         - krb5
  272.         - snmp
  273.         - rfb
  274.         - sip
  275.         - dhcp:
  276.             enabled: yes
  277.             # When extended mode is on, all DHCP messages are logged
  278.             # with full detail. When extended mode is off (the
  279.             # default), just enough information to map a MAC address
  280.             # to an IP address is logged.
  281.             extended: no
  282.         - ssh
  283.         - mqtt:
  284.             # passwords: yes           # enable output of passwords
  285.         # HTTP2 logging. HTTP2 support is currently experimental and
  286.         # disabled by default. To enable, uncomment the following line
  287.         # and be sure to enable http2 in the app-layer section.
  288.         #- http2
  289.         - stats:
  290.             totals: yes       # stats for all threads merged together
  291.             threads: no       # per thread stats
  292.             deltas: no        # include delta values
  293.         # bi-directional flows
  294.         - flow
  295.         # uni-directional flows
  296.         #- netflow
  297.  
  298.         # Metadata event type. Triggered whenever a pktvar is saved
  299.         # and will include the pktvars, flowvars, flowbits and
  300.         # flowints.
  301.         #- metadata
  302.  
  303.   - eve-log:
  304.       enabled: yes
  305.       filetype: regular
  306.       filename: /var/log/suricata/alerts-only.json
  307.       types:
  308.         - alert  # Log only alerts from rules
  309.  
  310.   # a line based log of HTTP requests (no alerts)
  311.   - http-log:
  312.       enabled: no
  313.       filename: http.log
  314.       append: yes
  315.       #extended: yes     # enable this for extended logging information
  316.       #custom: yes       # enable the custom logging format (defined by customformat)
  317.       #customformat: "%{%D-%H:%M:%S}t.%z %{X-Forwarded-For}i %H %m %h %u %s %B %a:%p -> %A:%P"
  318.       #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
  319.  
  320.   # a line based log of TLS handshake parameters (no alerts)
  321.   - tls-log:
  322.       enabled: no  # Log TLS connections.
  323.       filename: tls.log # File to store TLS logs.
  324.       append: yes
  325.       #extended: yes     # Log extended information like fingerprint
  326.       #custom: yes       # enabled the custom logging format (defined by customformat)
  327.       #customformat: "%{%D-%H:%M:%S}t.%z %a:%p -> %A:%P %v %n %d %D"
  328.       #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
  329.       # output TLS transaction where the session is resumed using a
  330.       # session id
  331.       #session-resumption: no
  332.  
  333.   # output module to store certificates chain to disk
  334.   - tls-store:
  335.       enabled: no
  336.       #certs-log-dir: certs # directory to store the certificates files
  337.  
  338.   # Packet log... log packets in pcap format. 3 modes of operation: "normal"
  339.   # "multi" and "sguil".
  340.   #
  341.   # In normal mode a pcap file "filename" is created in the default-log-dir,
  342.   # or as specified by "dir".
  343.   # In multi mode, a file is created per thread. This will perform much
  344.   # better, but will create multiple files where 'normal' would create one.
  345.   # In multi mode the filename takes a few special variables:
  346.   # - %n -- thread number
  347.   # - %i -- thread id
  348.   # - %t -- timestamp (secs or secs.usecs based on 'ts-format'
  349.   # E.g. filename: pcap.%n.%t
  350.   #
  351.   # Note that it's possible to use directories, but the directories are not
  352.   # created by Suricata. E.g. filename: pcaps/%n/log.%s will log into the
  353.   # per thread directory.
  354.   #
  355.   # Also note that the limit and max-files settings are enforced per thread.
  356.   # So the size limit when using 8 threads with 1000mb files and 2000 files
  357.   # is: 8*1000*2000 ~ 16TiB.
  358.   #
  359.   # In Sguil mode "dir" indicates the base directory. In this base dir the
  360.   # pcaps are created in the directory structure Sguil expects:
  361.   #
  362.   # $sguil-base-dir/YYYY-MM-DD/$filename.<timestamp>
  363.   #
  364.   # By default all packets are logged except:
  365.   # - TCP streams beyond stream.reassembly.depth
  366.   # - encrypted streams after the key exchange
  367.   #
  368.   - pcap-log:
  369.       enabled: no
  370.       filename: log.pcap
  371.  
  372.       # File size limit.  Can be specified in kb, mb, gb.  Just a number
  373.       # is parsed as bytes.
  374.       limit: 1000mb
  375.  
  376.       # If set to a value, ring buffer mode is enabled. Will keep maximum of
  377.       # "max-files" of size "limit"
  378.       max-files: 2000
  379.  
  380.       # Compression algorithm for pcap files. Possible values: none, lz4.
  381.       # Enabling compression is incompatible with the sguil mode. Note also
  382.       # that on Windows, enabling compression will *increase* disk I/O.
  383.       compression: none
  384.  
  385.       # Further options for lz4 compression. The compression level can be set
  386.       # to a value between 0 and 16, where higher values result in higher
  387.       # compression.
  388.       #lz4-checksum: no
  389.       #lz4-level: 0
  390.  
  391.       mode: normal # normal, multi or sguil.
  392.  
  393.       # Directory to place pcap files. If not provided the default log
  394.       # directory will be used. Required for "sguil" mode.
  395.       #dir: /nsm_data/
  396.  
  397.       #ts-format: usec # sec or usec second format (default) is filename.sec usec is filename.sec.usec
  398.       use-stream-depth: no #If set to "yes" packets seen after reaching stream inspection depth are ignored. "no" logs all packets
  399.       honor-pass-rules: no # If set to "yes", flows in which a pass rule matched will stop being logged.
  400.  
  401.   # a full alert log containing much information for signature writers
  402.   # or for investigating suspected false positives.
  403.   - alert-debug:
  404.       enabled: no
  405.       filename: alert-debug.log
  406.       append: yes
  407.       #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
  408.  
  409.   # alert output to prelude (https://www.prelude-siem.org/) only
  410.   # available if Suricata has been compiled with --enable-prelude
  411.   - alert-prelude:
  412.       enabled: no
  413.       profile: suricata
  414.       log-packet-content: no
  415.       log-packet-header: yes
  416.  
  417.   # Stats.log contains data from various counters of the Suricata engine.
  418.   - stats:
  419.       enabled: yes
  420.       filename: stats.log
  421.       append: yes       # append to file (yes) or overwrite it (no)
  422.       totals: yes       # stats for all threads merged together
  423.       threads: no       # per thread stats
  424.       #null-values: yes  # print counters that have value 0. Default: no
  425.  
  426.   # a line based alerts log similar to fast.log into syslog
  427.   - syslog:
  428.       enabled: no
  429.       # reported identity to syslog. If omitted the program name (usually
  430.       # suricata) will be used.
  431.       #identity: "suricata"
  432.       facility: local5
  433.       #level: Info ## possible levels: Emergency, Alert, Critical,
  434.                    ## Error, Warning, Notice, Info, Debug
  435.  
  436.   # Output module for storing files on disk. Files are stored in
  437.   # directory names consisting of the first 2 characters of the
  438.   # SHA256 of the file. Each file is given its SHA256 as a filename.
  439.   #
  440.   # When a duplicate file is found, the timestamps on the existing file
  441.   # are updated.
  442.   #
  443.   # Unlike the older filestore, metadata is not written by default
  444.   # as each file should already have a "fileinfo" record in the
  445.   # eve-log. If write-fileinfo is set to yes, then each file will have
  446.   # one more associated .json files that consist of the fileinfo
  447.   # record. A fileinfo file will be written for each occurrence of the
  448.   # file seen using a filename suffix to ensure uniqueness.
  449.   #
  450.   # To prune the filestore directory see the "suricatactl filestore
  451.   # prune" command which can delete files over a certain age.
  452.   - file-store:
  453.       version: 2
  454.       enabled: no
  455.  
  456.       # Set the directory for the filestore. Relative pathnames
  457.       # are contained within the "default-log-dir".
  458.       #dir: filestore
  459.  
  460.       # Write out a fileinfo record for each occurrence of a file.
  461.       # Disabled by default as each occurrence is already logged
  462.       # as a fileinfo record to the main eve-log.
  463.       #write-fileinfo: yes
  464.  
  465.       # Force storing of all files. Default: no.
  466.       #force-filestore: yes
  467.  
  468.       # Override the global stream-depth for sessions in which we want
  469.       # to perform file extraction. Set to 0 for unlimited; otherwise,
  470.       # must be greater than the global stream-depth value to be used.
  471.       #stream-depth: 0
  472.  
  473.       # Uncomment the following variable to define how many files can
  474.       # remain open for filestore by Suricata. Default value is 0 which
  475.       # means files get closed after each write to the file.
  476.       #max-open-files: 1000
  477.  
  478.       # Force logging of checksums: available hash functions are md5,
  479.       # sha1 and sha256. Note that SHA256 is automatically forced by
  480.       # the use of this output module as it uses the SHA256 as the
  481.       # file naming scheme.
  482.       #force-hash: [sha1, md5]
  483.       # NOTE: X-Forwarded configuration is ignored if write-fileinfo is disabled
  484.       # HTTP X-Forwarded-For support by adding an extra field or overwriting
  485.       # the source or destination IP address (depending on flow direction)
  486.       # with the one reported in the X-Forwarded-For HTTP header. This is
  487.       # helpful when reviewing alerts for traffic that is being reverse
  488.       # or forward proxied.
  489.       xff:
  490.         enabled: no
  491.         # Two operation modes are available, "extra-data" and "overwrite".
  492.         mode: extra-data
  493.         # Two proxy deployments are supported, "reverse" and "forward". In
  494.         # a "reverse" deployment the IP address used is the last one, in a
  495.         # "forward" deployment the first IP address is used.
  496.         deployment: reverse
  497.         # Header name where the actual IP address will be reported. If more
  498.         # than one IP address is present, the last IP address will be the
  499.         # one taken into consideration.
  500.         header: X-Forwarded-For
  501.  
  502.   # Log TCP data after stream normalization
  503.   # Two types: file or dir:
  504.   #     - file logs into a single logfile.
  505.   #     - dir creates 2 files per TCP session and stores the raw TCP
  506.   #            data into them.
  507.   # Use 'both' to enable both file and dir modes.
  508.   #
  509.   # Note: limited by "stream.reassembly.depth"
  510.   - tcp-data:
  511.       enabled: no
  512.       type: file
  513.       filename: tcp-data.log
  514.  
  515.   # Log HTTP body data after normalization, de-chunking and unzipping.
  516.   # Two types: file or dir.
  517.   #     - file logs into a single logfile.
  518.   #     - dir creates 2 files per HTTP session and stores the
  519.   #           normalized data into them.
  520.   # Use 'both' to enable both file and dir modes.
  521.   #
  522.   # Note: limited by the body limit settings
  523.   - http-body-data:
  524.       enabled: no
  525.       type: file
  526.       filename: http-data.log
  527.  
  528.   # Lua Output Support - execute lua script to generate alert and event
  529.   # output.
  530.   # Documented at:
  531.   # https://suricata.readthedocs.io/en/latest/output/lua-output.html
  532.   - lua:
  533.       enabled: no
  534.       #scripts-dir: /etc/suricata/lua-output/
  535.       scripts:
  536.       #   - script1.lua
  537.  
  538. # Logging configuration.  This is not about logging IDS alerts/events, but
  539. # output about what Suricata is doing, like startup messages, errors, etc.
  540. logging:
  541.   # The default log level: can be overridden in an output section.
  542.   # Note that debug level logging will only be emitted if Suricata was
  543.   # compiled with the --enable-debug configure option.
  544.   #
  545.   # This value is overridden by the SC_LOG_LEVEL env var.
  546.   default-log-level: notice
  547.  
  548.   # The default output format.  Optional parameter, should default to
  549.   # something reasonable if not provided.  Can be overridden in an
  550.   # output section.  You can leave this out to get the default.
  551.   #
  552.   # This value is overridden by the SC_LOG_FORMAT env var.
  553.   #default-log-format: "[%i] %t - (%f:%l) <%d> (%n) -- "
  554.  
  555.   # A regex to filter output.  Can be overridden in an output section.
  556.   # Defaults to empty (no filter).
  557.   #
  558.   # This value is overridden by the SC_LOG_OP_FILTER env var.
  559.   default-output-filter:
  560.  
  561.   # Define your logging outputs.  If none are defined, or they are all
  562.   # disabled you will get the default: console output.
  563.   outputs:
  564.   - console:
  565.       enabled: yes
  566.       # type: json
  567.   - file:
  568.       enabled: yes
  569.       level: info
  570.       filename: suricata.log
  571.       # type: json
  572.   - syslog:
  573.       enabled: no
  574.       facility: local5
  575.       format: "[%i] <%d> -- "
  576.       # type: json
  577.  
  578.  
  579. ##
  580. ## Step 3: Configure common capture settings
  581. ##
  582. ## See "Advanced Capture Options" below for more options, including Netmap
  583. ## and PF_RING.
  584. ##
  585.  
  586. # Linux high speed capture support
  587. af-packet:
  588.   - interface: ens5
  589.     # Number of receive threads. "auto" uses the number of cores
  590.     threads: auto
  591.     # Default clusterid. AF_PACKET will load balance packets based on flow.
  592.     cluster-id: 99
  593.     # Default AF_PACKET cluster type. AF_PACKET can load balance per flow or per hash.
  594.     # This is only supported for Linux kernel > 3.1
  595.     # possible value are:
  596.     #  * cluster_flow: all packets of a given flow are sent to the same socket
  597.     #  * cluster_cpu: all packets treated in kernel by a CPU are sent to the same socket
  598.     #  * cluster_qm: all packets linked by network card to a RSS queue are sent to the same
  599.     #  socket. Requires at least Linux 3.14.
  600.     #  * cluster_ebpf: eBPF file load balancing. See doc/userguide/capture-hardware/ebpf-xdp.rst for
  601.     #  more info.
  602.     # Recommended modes are cluster_flow on most boxes and cluster_cpu or cluster_qm on system
  603.     # with capture card using RSS (requires cpu affinity tuning and system IRQ tuning)
  604.     cluster-type: cluster_flow
  605.     # In some fragmentation cases, the hash can not be computed. If "defrag" is set
  606.     # to yes, the kernel will do the needed defragmentation before sending the packets.
  607.     defrag: yes
  608.     # To use the ring feature of AF_PACKET, set 'use-mmap' to yes
  609.     #use-mmap: yes
  610.     # Lock memory map to avoid it being swapped. Be careful that over
  611.     # subscribing could lock your system
  612.     #mmap-locked: yes
  613.     # Use tpacket_v3 capture mode, only active if use-mmap is true
  614.     # Don't use it in IPS or TAP mode as it causes severe latency
  615.     #tpacket-v3: yes
  616.     # Ring size will be computed with respect to "max-pending-packets" and number
  617.     # of threads. You can set manually the ring size in number of packets by setting
  618.     # the following value. If you are using flow "cluster-type" and have really network
  619.     # intensive single-flow you may want to set the "ring-size" independently of the number
  620.     # of threads:
  621.     #ring-size: 2048
  622.     # Block size is used by tpacket_v3 only. It should set to a value high enough to contain
  623.     # a decent number of packets. Size is in bytes so please consider your MTU. It should be
  624.     # a power of 2 and it must be multiple of page size (usually 4096).
  625.     #block-size: 32768
  626.     # tpacket_v3 block timeout: an open block is passed to userspace if it is not
  627.     # filled after block-timeout milliseconds.
  628.     #block-timeout: 10
  629.     # On busy systems, set it to yes to help recover from a packet drop
  630.     # phase. This will result in some packets (at max a ring flush) not being inspected.
  631.     #use-emergency-flush: yes
  632.     # recv buffer size, increased value could improve performance
  633.     # buffer-size: 32768
  634.     # Set to yes to disable promiscuous mode
  635.     # disable-promisc: no
  636.     # Choose checksum verification mode for the interface. At the moment
  637.     # of the capture, some packets may have an invalid checksum due to
  638.     # the checksum computation being offloaded to the network card.
  639.     # Possible values are:
  640.     #  - kernel: use indication sent by kernel for each packet (default)
  641.     #  - yes: checksum validation is forced
  642.     #  - no: checksum validation is disabled
  643.     #  - auto: Suricata uses a statistical approach to detect when
  644.     #  checksum off-loading is used.
  645.     # Warning: 'capture.checksum-validation' must be set to yes to have any validation
  646.     #checksum-checks: kernel
  647.     # BPF filter to apply to this interface. The pcap filter syntax applies here.
  648.     #bpf-filter: port 80 or udp
  649.     # You can use the following variables to activate AF_PACKET tap or IPS mode.
  650.     # If copy-mode is set to ips or tap, the traffic coming to the current
  651.     # interface will be copied to the copy-iface interface. If 'tap' is set, the
  652.     # copy is complete. If 'ips' is set, the packet matching a 'drop' action
  653.     # will not be copied.
  654.     #copy-mode: ips
  655.     #copy-iface: eth1
  656.     #  For eBPF and XDP setup including bypass, filter and load balancing, please
  657.     #  see doc/userguide/capture-hardware/ebpf-xdp.rst for more info.
  658.  
  659.   # Put default values here. These will be used for an interface that is not
  660.   # in the list above.
  661.   - interface: default
  662.     #threads: auto
  663.     #use-mmap: no
  664.     #tpacket-v3: yes
  665.  
  666. # Cross platform libpcap capture support
  667. pcap:
  668.   - interface: eth0
  669.     # On Linux, pcap will try to use mmap'ed capture and will use "buffer-size"
  670.     # as total memory used by the ring. So set this to something bigger
  671.     # than 1% of your bandwidth.
  672.     #buffer-size: 16777216
  673.     #bpf-filter: "tcp and port 25"
  674.     # Choose checksum verification mode for the interface. At the moment
  675.     # of the capture, some packets may have an invalid checksum due to
  676.     # the checksum computation being offloaded to the network card.
  677.     # Possible values are:
  678.     #  - yes: checksum validation is forced
  679.     #  - no: checksum validation is disabled
  680.     #  - auto: Suricata uses a statistical approach to detect when
  681.     #  checksum off-loading is used. (default)
  682.     # Warning: 'capture.checksum-validation' must be set to yes to have any validation
  683.     #checksum-checks: auto
  684.     # With some accelerator cards using a modified libpcap (like Myricom), you
  685.     # may want to have the same number of capture threads as the number of capture
  686.     # rings. In this case, set up the threads variable to N to start N threads
  687.     # listening on the same interface.
  688.     #threads: 16
  689.     # set to no to disable promiscuous mode:
  690.     #promisc: no
  691.     # set snaplen, if not set it defaults to MTU if MTU can be known
  692.     # via ioctl call and to full capture if not.
  693.     #snaplen: 1518
  694.   # Put default values here
  695.   - interface: default
  696.     #checksum-checks: auto
  697.  
  698. # Settings for reading pcap files
  699. pcap-file:
  700.   # Possible values are:
  701.   #  - yes: checksum validation is forced
  702.   #  - no: checksum validation is disabled
  703.   #  - auto: Suricata uses a statistical approach to detect when
  704.   #  checksum off-loading is used. (default)
  705.   # Warning: 'checksum-validation' must be set to yes to have checksum tested
  706.   checksum-checks: auto
  707.  
  708. # See "Advanced Capture Options" below for more options, including Netmap
  709. # and PF_RING.
  710.  
  711.  
  712. ##
  713. ## Step 4: App Layer Protocol configuration
  714. ##
  715.  
  716. # Configure the app-layer parsers. The protocol's section details each
  717. # protocol.
  718. #
  719. # The option "enabled" takes 3 values - "yes", "no", "detection-only".
  720. # "yes" enables both detection and the parser, "no" disables both, and
  721. # "detection-only" enables protocol detection only (parser disabled).
  722. app-layer:
  723.   protocols:
  724.     rfb:
  725.       enabled: yes
  726.       detection-ports:
  727.         dp: 5900, 5901, 5902, 5903, 5904, 5905, 5906, 5907, 5908, 5909
  728.     # MQTT, disabled by default.
  729.     mqtt:
  730.       # enabled: no
  731.       # max-msg-length: 1mb
  732.       # subscribe-topic-match-limit: 100
  733.       # unsubscribe-topic-match-limit: 100
  734.     krb5:
  735.       enabled: yes
  736.     snmp:
  737.       enabled: yes
  738.     ikev2:
  739.       enabled: yes
  740.     tls:
  741.       enabled: yes
  742.       detection-ports:
  743.         dp: 443
  744.  
  745.       # Generate JA3 fingerprint from client hello. If not specified it
  746.       # will be disabled by default, but enabled if rules require it.
  747.       #ja3-fingerprints: auto
  748.  
  749.       # What to do when the encrypted communications start:
  750.       # - default: keep tracking TLS session, check for protocol anomalies,
  751.       #            inspect tls_* keywords. Disables inspection of unmodified
  752.       #            'content' signatures.
  753.       # - bypass:  stop processing this flow as much as possible. No further
  754.       #            TLS parsing and inspection. Offload flow bypass to kernel
  755.       #            or hardware if possible.
  756.       # - full:    keep tracking and inspection as normal. Unmodified content
  757.       #            keyword signatures are inspected as well.
  758.       #
  759.       # For best performance, select 'bypass'.
  760.       #
  761.       #encryption-handling: default
  762.  
  763.     dcerpc:
  764.       enabled: yes
  765.     ftp:
  766.       enabled: yes
  767.       # memcap: 64mb
  768.     rdp:
  769.       #enabled: yes
  770.     ssh:
  771.       enabled: yes
  772.       #hassh: yes
  773.     # HTTP2: Experimental HTTP 2 support. Disabled by default.
  774.     http2:
  775.       enabled: no
  776.       # use http keywords on HTTP2 traffic
  777.       http1-rules: no
  778.     smtp:
  779.       enabled: yes
  780.       raw-extraction: no
  781.       # Configure SMTP-MIME Decoder
  782.       mime:
  783.         # Decode MIME messages from SMTP transactions
  784.         # (may be resource intensive)
  785.         # This field supersedes all others because it turns the entire
  786.         # process on or off
  787.         decode-mime: yes
  788.  
  789.         # Decode MIME entity bodies (ie. Base64, quoted-printable, etc.)
  790.         decode-base64: yes
  791.         decode-quoted-printable: yes
  792.  
  793.         # Maximum bytes per header data value stored in the data structure
  794.         # (default is 2000)
  795.         header-value-depth: 2000
  796.  
  797.         # Extract URLs and save in state data structure
  798.         extract-urls: yes
  799.         # Set to yes to compute the md5 of the mail body. You will then
  800.         # be able to journalize it.
  801.         body-md5: no
  802.       # Configure inspected-tracker for file_data keyword
  803.       inspected-tracker:
  804.         content-limit: 100000
  805.         content-inspect-min-size: 32768
  806.         content-inspect-window: 4096
  807.     imap:
  808.       enabled: detection-only
  809.     smb:
  810.       enabled: yes
  811.       detection-ports:
  812.         dp: 139, 445
  813.  
  814.       # Stream reassembly size for SMB streams. By default track it completely.
  815.       #stream-depth: 0
  816.  
  817.     nfs:
  818.       enabled: yes
  819.     tftp:
  820.       enabled: yes
  821.     dns:
  822.       tcp:
  823.         enabled: yes
  824.         detection-ports:
  825.           dp: 53
  826.       udp:
  827.         enabled: yes
  828.         detection-ports:
  829.           dp: 53
  830.     http:
  831.       enabled: yes
  832.       # memcap:                   Maximum memory capacity for HTTP
  833.       #                           Default is unlimited, values can be 64mb, e.g.
  834.  
  835.       # default-config:           Used when no server-config matches
  836.       #   personality:            List of personalities used by default
  837.       #   request-body-limit:     Limit reassembly of request body for inspection
  838.       #                           by http_client_body & pcre /P option.
  839.       #   response-body-limit:    Limit reassembly of response body for inspection
  840.       #                           by file_data, http_server_body & pcre /Q option.
  841.       #
  842.       #   For advanced options, see the user guide
  843.  
  844.  
  845.       # server-config:            List of server configurations to use if address matches
  846.       #   address:                List of IP addresses or networks for this block
  847.       #   personality:            List of personalities used by this block
  848.       #
  849.       #                           Then, all the fields from default-config can be overloaded
  850.       #
  851.       # Currently Available Personalities:
  852.       #   Minimal, Generic, IDS (default), IIS_4_0, IIS_5_0, IIS_5_1, IIS_6_0,
  853.       #   IIS_7_0, IIS_7_5, Apache_2
  854.       libhtp:
  855.          default-config:
  856.            personality: IDS
  857.  
  858.            # Can be specified in kb, mb, gb.  Just a number indicates
  859.            # it's in bytes.
  860.            request-body-limit: 100kb
  861.            response-body-limit: 100kb
  862.  
  863.            # inspection limits
  864.            request-body-minimal-inspect-size: 32kb
  865.            request-body-inspect-window: 4kb
  866.            response-body-minimal-inspect-size: 40kb
  867.            response-body-inspect-window: 16kb
  868.  
  869.            # response body decompression (0 disables)
  870.            response-body-decompress-layer-limit: 2
  871.  
  872.            # auto will use http-body-inline mode in IPS mode, yes or no set it statically
  873.            http-body-inline: auto
  874.  
  875.            # Decompress SWF files.
  876.            # Two types: 'deflate', 'lzma', 'both' will decompress deflate and lzma
  877.            # compress-depth:
  878.            # Specifies the maximum amount of data to decompress,
  879.            # set 0 for unlimited.
  880.            # decompress-depth:
  881.            # Specifies the maximum amount of decompressed data to obtain,
  882.            # set 0 for unlimited.
  883.            swf-decompression:
  884.              enabled: yes
  885.              type: both
  886.              compress-depth: 100kb
  887.              decompress-depth: 100kb
  888.  
  889.            # Use a random value for inspection sizes around the specified value.
  890.            # This lowers the risk of some evasion techniques but could lead
  891.            # to detection change between runs. It is set to 'yes' by default.
  892.            #randomize-inspection-sizes: yes
  893.            # If "randomize-inspection-sizes" is active, the value of various
  894.            # inspection size will be chosen from the [1 - range%, 1 + range%]
  895.            # range
  896.            # Default value of "randomize-inspection-range" is 10.
  897.            #randomize-inspection-range: 10
  898.  
  899.            # decoding
  900.            double-decode-path: no
  901.            double-decode-query: no
  902.  
  903.            # Can enable LZMA decompression
  904.            #lzma-enabled: false
  905.            # Memory limit usage for LZMA decompression dictionary
  906.            # Data is decompressed until dictionary reaches this size
  907.            #lzma-memlimit: 1mb
  908.            # Maximum decompressed size with a compression ratio
  909.            # above 2048 (only LZMA can reach this ratio, deflate cannot)
  910.            #compression-bomb-limit: 1mb
  911.            # Maximum time spent decompressing a single transaction in usec
  912.            #decompression-time-limit: 100000
  913.  
  914.          server-config:
  915.  
  916.            #- apache:
  917.            #    address: [192.168.1.0/24, 127.0.0.0/8, "::1"]
  918.            #    personality: Apache_2
  919.            #    # Can be specified in kb, mb, gb.  Just a number indicates
  920.            #    # it's in bytes.
  921.            #    request-body-limit: 4096
  922.            #    response-body-limit: 4096
  923.            #    double-decode-path: no
  924.            #    double-decode-query: no
  925.  
  926.            #- iis7:
  927.            #    address:
  928.            #      - 192.168.0.0/24
  929.            #      - 192.168.10.0/24
  930.            #    personality: IIS_7_0
  931.            #    # Can be specified in kb, mb, gb.  Just a number indicates
  932.            #    # it's in bytes.
  933.            #    request-body-limit: 4096
  934.            #    response-body-limit: 4096
  935.            #    double-decode-path: no
  936.            #    double-decode-query: no
  937.  
  938.     # Note: Modbus probe parser is minimalist due to the limited usage in the field.
  939.     # Only Modbus message length (greater than Modbus header length)
  940.     # and protocol ID (equal to 0) are checked in probing parser
  941.     # It is important to enable detection port and define Modbus port
  942.     # to avoid false positives
  943.     modbus:
  944.       # How many unanswered Modbus requests are considered a flood.
  945.       # If the limit is reached, the app-layer-event:modbus.flooded; will match.
  946.       #request-flood: 500
  947.  
  948.       enabled: no
  949.       detection-ports:
  950.         dp: 502
  951.       # According to MODBUS Messaging on TCP/IP Implementation Guide V1.0b, it
  952.       # is recommended to keep the TCP connection opened with a remote device
  953.       # and not to open and close it for each MODBUS/TCP transaction. In that
  954.       # case, it is important to set the depth of the stream reassembling as
  955.       # unlimited (stream.reassembly.depth: 0)
  956.  
  957.       # Stream reassembly size for modbus. By default track it completely.
  958.       stream-depth: 0
  959.  
  960.     # DNP3
  961.     dnp3:
  962.       enabled: no
  963.       detection-ports:
  964.         dp: 20000
  965.  
  966.     # SCADA EtherNet/IP and CIP protocol support
  967.     enip:
  968.       enabled: no
  969.       detection-ports:
  970.         dp: 44818
  971.         sp: 44818
  972.  
  973.     ntp:
  974.       enabled: yes
  975.  
  976.     dhcp:
  977.       enabled: yes
  978.  
  979.     sip:
  980.       #enabled: no
  981.  
  982. # Limit for the maximum number of asn1 frames to decode (default 256)
  983. asn1-max-frames: 256
  984.  
  985. # Datasets default settings
  986. # datasets:
  987. #   # Default fallback memcap and hashsize values for datasets in case these
  988. #   # were not explicitly defined.
  989. #   defaults:
  990. #     memcap: 100mb
  991. #     hashsize: 2048
  992.  
  993. ##############################################################################
  994. ##
  995. ## Advanced settings below
  996. ##
  997. ##############################################################################
  998.  
  999. ##
  1000. ## Run Options
  1001. ##
  1002.  
  1003. # Run Suricata with a specific user-id and group-id:
  1004. #run-as:
  1005. #  user: suri
  1006. #  group: suri
  1007.  
  1008. # Some logging modules will use that name in event as identifier. The default
  1009. # value is the hostname
  1010. #sensor-name: suricata
  1011.  
  1012. # Default location of the pid file. The pid file is only used in
  1013. # daemon mode (start Suricata with -D). If not running in daemon mode
  1014. # the --pidfile command line option must be used to create a pid file.
  1015. #pid-file: /var/run/suricata.pid
  1016.  
  1017. # Daemon working directory
  1018. # Suricata will change directory to this one if provided
  1019. # Default: "/"
  1020. #daemon-directory: "/"
  1021.  
  1022. # Umask.
  1023. # Suricata will use this umask if it is provided. By default it will use the
  1024. # umask passed on by the shell.
  1025. #umask: 022
  1026.  
  1027. # Suricata core dump configuration. Limits the size of the core dump file to
  1028. # approximately max-dump. The actual core dump size will be a multiple of the
  1029. # page size. Core dumps that would be larger than max-dump are truncated. On
  1030. # Linux, the actual core dump size may be a few pages larger than max-dump.
  1031. # Setting max-dump to 0 disables core dumping.
  1032. # Setting max-dump to 'unlimited' will give the full core dump file.
  1033. # On 32-bit Linux, a max-dump value >= ULONG_MAX may cause the core dump size
  1034. # to be 'unlimited'.
  1035.  
  1036. coredump:
  1037.   max-dump: unlimited
  1038.  
  1039. # If the Suricata box is a router for the sniffed networks, set it to 'router'. If
  1040. # it is a pure sniffing setup, set it to 'sniffer-only'.
  1041. # If set to auto, the variable is internally switched to 'router' in IPS mode
  1042. # and 'sniffer-only' in IDS mode.
  1043. # This feature is currently only used by the reject* keywords.
  1044. host-mode: auto
  1045.  
  1046. # Number of packets preallocated per thread. The default is 1024. A higher number
  1047. # will make sure each CPU will be more easily kept busy, but may negatively
  1048. # impact caching.
  1049. #max-pending-packets: 1024
  1050.  
  1051. # Runmode the engine should use. Please check --list-runmodes to get the available
  1052. # runmodes for each packet acquisition method. Default depends on selected capture
  1053. # method. 'workers' generally gives best performance.
  1054. #runmode: autofp
  1055.  
  1056. # Specifies the kind of flow load balancer used by the flow pinned autofp mode.
  1057. #
  1058. # Supported schedulers are:
  1059. #
  1060. # hash     - Flow assigned to threads using the 5-7 tuple hash.
  1061. # ippair   - Flow assigned to threads using addresses only.
  1062. #
  1063. #autofp-scheduler: hash
  1064.  
  1065. # Preallocated size for each packet. Default is 1514 which is the classical
  1066. # size for pcap on Ethernet. You should adjust this value to the highest
  1067. # packet size (MTU + hardware header) on your system.
  1068. #default-packet-size: 1514
  1069.  
  1070. # Unix command socket that can be used to pass commands to Suricata.
  1071. # An external tool can then connect to get information from Suricata
  1072. # or trigger some modifications of the engine. Set enabled to yes
  1073. # to activate the feature. In auto mode, the feature will only be
  1074. # activated in live capture mode. You can use the filename variable to set
  1075. # the file name of the socket.
  1076. unix-command:
  1077.   enabled: yes
  1078.   filename: /var/run/suricata-command.socket
  1079.  
  1080. # Magic file. The extension .mgc is added to the value here.
  1081. #magic-file: /usr/share/file/magic
  1082. #magic-file:
  1083.  
  1084. # GeoIP2 database file. Specify path and filename of GeoIP2 database
  1085. # if using rules with "geoip" rule option.
  1086. #geoip-database: /usr/local/share/GeoLite2/GeoLite2-Country.mmdb
  1087.  
  1088. legacy:
  1089.   uricontent: enabled
  1090.  
  1091. ##
  1092. ## Detection settings
  1093. ##
  1094.  
  1095. # Set the order of alerts based on actions
  1096. # The default order is pass, drop, reject, alert
  1097. # action-order:
  1098. #   - pass
  1099. #   - drop
  1100. #   - reject
  1101. #   - alert
  1102.  
  1103. # IP Reputation
  1104. #reputation-categories-file: /etc/suricata/iprep/categories.txt
  1105. #default-reputation-path: /etc/suricata/iprep
  1106. #reputation-files:
  1107. # - reputation.list
  1108.  
  1109. # When run with the option --engine-analysis, the engine will read each of
  1110. # the parameters below, and print reports for each of the enabled sections
  1111. # and exit.  The reports are printed to a file in the default log dir
  1112. # given by the parameter "default-log-dir", with engine reporting
  1113. # subsection below printing reports in its own report file.
  1114. engine-analysis:
  1115.   # enables printing reports for fast-pattern for every rule.
  1116.   rules-fast-pattern: yes
  1117.   # enables printing reports for each rule
  1118.   rules: yes
  1119.  
  1120. #recursion and match limits for PCRE where supported
  1121. pcre:
  1122.   match-limit: 3500
  1123.   match-limit-recursion: 1500
  1124.  
  1125. ##
  1126. ## Advanced Traffic Tracking and Reconstruction Settings
  1127. ##
  1128.  
  1129. # Host specific policies for defragmentation and TCP stream
  1130. # reassembly. The host OS lookup is done using a radix tree, just
  1131. # like a routing table so the most specific entry matches.
  1132. host-os-policy:
  1133.   # Make the default policy windows.
  1134.   windows: [0.0.0.0/0]
  1135.   bsd: []
  1136.   bsd-right: []
  1137.   old-linux: []
  1138.   linux: []
  1139.   old-solaris: []
  1140.   solaris: []
  1141.   hpux10: []
  1142.   hpux11: []
  1143.   irix: []
  1144.   macos: []
  1145.   vista: []
  1146.   windows2k3: []
  1147.  
  1148. # Defrag settings:
  1149.  
  1150. defrag:
  1151.   memcap: 32mb
  1152.   hash-size: 65536
  1153.   trackers: 65535 # number of defragmented flows to follow
  1154.   max-frags: 65535 # number of fragments to keep (higher than trackers)
  1155.   prealloc: yes
  1156.   timeout: 60
  1157.  
  1158. # Enable defrag per host settings
  1159. #  host-config:
  1160. #
  1161. #    - dmz:
  1162. #        timeout: 30
  1163. #        address: [192.168.1.0/24, 127.0.0.0/8, 1.1.1.0/24, 2.2.2.0/24, "1.1.1.1", "2.2.2.2", "::1"]
  1164. #
  1165. #    - lan:
  1166. #        timeout: 45
  1167. #        address:
  1168. #          - 192.168.0.0/24
  1169. #          - 192.168.10.0/24
  1170. #          - 172.16.14.0/24
  1171.  
  1172. # Flow settings:
  1173. # By default, the reserved memory (memcap) for flows is 32MB. This is the limit
  1174. # for flow allocation inside the engine. You can change this value to allow
  1175. # more memory usage for flows.
  1176. # The hash-size determines the size of the hash used to identify flows inside
  1177. # the engine, and by default the value is 65536.
  1178. # At startup, the engine can preallocate a number of flows, to get better
  1179. # performance. The number of flows preallocated is 10000 by default.
  1180. # emergency-recovery is the percentage of flows that the engine needs to
  1181. # prune before clearing the emergency state. The emergency state is activated
  1182. # when the memcap limit is reached, allowing new flows to be created, but
  1183. # pruning them with the emergency timeouts (they are defined below).
  1184. # If the memcap is reached, the engine will try to prune flows
  1185. # with the default timeouts. If it doesn't find a flow to prune, it will set
  1186. # the emergency bit and it will try again with more aggressive timeouts.
  1187. # If that doesn't work, then it will try to kill the oldest flows using
  1188. # last time seen flows.
  1189. # The memcap can be specified in kb, mb, gb.  Just a number indicates it's
  1190. # in bytes.
  1191.  
  1192. flow:
  1193.   memcap: 128mb
  1194.   hash-size: 65536
  1195.   prealloc: 10000
  1196.   emergency-recovery: 30
  1197.   #managers: 1 # default to one flow manager
  1198.   #recyclers: 1 # default to one flow recycler thread
  1199.  
  1200. # This option controls the use of VLAN ids in the flow (and defrag)
  1201. # hashing. Normally this should be enabled, but in some (broken)
  1202. # setups where both sides of a flow are not tagged with the same VLAN
  1203. # tag, we can ignore the VLAN id's in the flow hashing.
  1204. vlan:
  1205.   use-for-tracking: true
  1206.  
  1207. # Specific timeouts for flows. Here you can specify the timeouts that the
  1208. # active flows will wait to transit from the current state to another, on each
  1209. # protocol. The value of "new" determines the seconds to wait after a handshake or
  1210. # stream startup before the engine frees the data of that flow it doesn't
  1211. # change the state to established (usually if we don't receive more packets
  1212. # of that flow). The value of "established" is the amount of
  1213. # seconds that the engine will wait to free the flow if that time elapses
  1214. # without receiving new packets or closing the connection. "closed" is the
  1215. # amount of time to wait after a flow is closed (usually zero). "bypassed"
  1216. # timeout controls locally bypassed flows. For these flows we don't do any other
  1217. # tracking. If no packets have been seen after this timeout, the flow is discarded.
  1218. #
  1219. # There's an emergency mode that will become active under attack circumstances,
  1220. # making the engine to check flow status faster. This configuration variables
  1221. # use the prefix "emergency-" and work similar as the normal ones.
  1222. # Some timeouts doesn't apply to all the protocols, like "closed", for udp and
  1223. # icmp.
  1224.  
  1225. flow-timeouts:
  1226.  
  1227.   default:
  1228.     new: 30
  1229.     established: 300
  1230.     closed: 0
  1231.     bypassed: 100
  1232.     emergency-new: 10
  1233.     emergency-established: 100
  1234.     emergency-closed: 0
  1235.     emergency-bypassed: 50
  1236.   tcp:
  1237.     new: 60
  1238.     established: 600
  1239.     closed: 60
  1240.     bypassed: 100
  1241.     emergency-new: 5
  1242.     emergency-established: 100
  1243.     emergency-closed: 10
  1244.     emergency-bypassed: 50
  1245.   udp:
  1246.     new: 30
  1247.     established: 300
  1248.     bypassed: 100
  1249.     emergency-new: 10
  1250.     emergency-established: 100
  1251.     emergency-bypassed: 50
  1252.   icmp:
  1253.     new: 30
  1254.     established: 300
  1255.     bypassed: 100
  1256.     emergency-new: 10
  1257.     emergency-established: 100
  1258.     emergency-bypassed: 50
  1259.  
  1260. # Stream engine settings. Here the TCP stream tracking and reassembly
  1261. # engine is configured.
  1262. #
  1263. # stream:
  1264. #   memcap: 64mb                # Can be specified in kb, mb, gb.  Just a
  1265. #                               # number indicates it's in bytes.
  1266. #   checksum-validation: yes    # To validate the checksum of received
  1267. #                               # packet. If csum validation is specified as
  1268. #                               # "yes", then packets with invalid csum values will not
  1269. #                               # be processed by the engine stream/app layer.
  1270. #                               # Warning: locally generated traffic can be
  1271. #                               # generated without checksum due to hardware offload
  1272. #                               # of checksum. You can control the handling of checksum
  1273. #                               # on a per-interface basis via the 'checksum-checks'
  1274. #                               # option
  1275. #   prealloc-sessions: 2k       # 2k sessions prealloc'd per stream thread
  1276. #   midstream: false            # don't allow midstream session pickups
  1277. #   async-oneside: false        # don't enable async stream handling
  1278. #   inline: no                  # stream inline mode
  1279. #   drop-invalid: yes           # in inline mode, drop packets that are invalid with regards to streaming engine
  1280. #   max-synack-queued: 5        # Max different SYN/ACKs to queue
  1281. #   bypass: no                  # Bypass packets when stream.reassembly.depth is reached.
  1282. #                               # Warning: first side to reach this triggers
  1283. #                               # the bypass.
  1284. #
  1285. #   reassembly:
  1286. #     memcap: 256mb             # Can be specified in kb, mb, gb.  Just a number
  1287. #                               # indicates it's in bytes.
  1288. #     depth: 1mb                # Can be specified in kb, mb, gb.  Just a number
  1289. #                               # indicates it's in bytes.
  1290. #     toserver-chunk-size: 2560 # inspect raw stream in chunks of at least
  1291. #                               # this size.  Can be specified in kb, mb,
  1292. #                               # gb.  Just a number indicates it's in bytes.
  1293. #     toclient-chunk-size: 2560 # inspect raw stream in chunks of at least
  1294. #                               # this size.  Can be specified in kb, mb,
  1295. #                               # gb.  Just a number indicates it's in bytes.
  1296. #     randomize-chunk-size: yes # Take a random value for chunk size around the specified value.
  1297. #                               # This lowers the risk of some evasion techniques but could lead
  1298. #                               # to detection change between runs. It is set to 'yes' by default.
  1299. #     randomize-chunk-range: 10 # If randomize-chunk-size is active, the value of chunk-size is
  1300. #                               # a random value between (1 - randomize-chunk-range/100)*toserver-chunk-size
  1301. #                               # and (1 + randomize-chunk-range/100)*toserver-chunk-size and the same
  1302. #                               # calculation for toclient-chunk-size.
  1303. #                               # Default value of randomize-chunk-range is 10.
  1304. #
  1305. #     raw: yes                  # 'Raw' reassembly enabled or disabled.
  1306. #                               # raw is for content inspection by detection
  1307. #                               # engine.
  1308. #
  1309. #     segment-prealloc: 2048    # number of segments preallocated per thread
  1310. #
  1311. #     check-overlap-different-data: true|false
  1312. #                               # check if a segment contains different data
  1313. #                               # than what we've already seen for that
  1314. #                               # position in the stream.
  1315. #                               # This is enabled automatically if inline mode
  1316. #                               # is used or when stream-event:reassembly_overlap_different_data;
  1317. #                               # is used in a rule.
  1318. #
  1319. stream:
  1320.   memcap: 64mb
  1321.   checksum-validation: yes      # reject incorrect csums
  1322.   inline: auto                  # auto will use inline mode in IPS mode, yes or no set it statically
  1323.   reassembly:
  1324.     memcap: 256mb
  1325.     depth: 1mb                  # reassemble 1mb into a stream
  1326.     toserver-chunk-size: 2560
  1327.     toclient-chunk-size: 2560
  1328.     randomize-chunk-size: yes
  1329.     #randomize-chunk-range: 10
  1330.     #raw: yes
  1331.     #segment-prealloc: 2048
  1332.     #check-overlap-different-data: true
  1333.  
  1334. # Host table:
  1335. #
  1336. # Host table is used by the tagging and per host thresholding subsystems.
  1337. #
  1338. host:
  1339.   hash-size: 4096
  1340.   prealloc: 1000
  1341.   memcap: 32mb
  1342.  
  1343. # IP Pair table:
  1344. #
  1345. # Used by xbits 'ippair' tracking.
  1346. #
  1347. #ippair:
  1348. #  hash-size: 4096
  1349. #  prealloc: 1000
  1350. #  memcap: 32mb
  1351.  
  1352. # Decoder settings
  1353.  
  1354. decoder:
  1355.   # Teredo decoder is known to not be completely accurate
  1356.   # as it will sometimes detect non-teredo as teredo.
  1357.   teredo:
  1358.     enabled: true
  1359.     # ports to look for Teredo. Max 4 ports. If no ports are given, or
  1360.     # the value is set to 'any', Teredo detection runs on _all_ UDP packets.
  1361.     ports: $TEREDO_PORTS # syntax: '[3544, 1234]' or '3533' or 'any'.
  1362.  
  1363.   # VXLAN decoder is assigned to up to 4 UDP ports. By default only the
  1364.   # IANA assigned port 4789 is enabled.
  1365.   vxlan:
  1366.     enabled: true
  1367.     ports: $VXLAN_PORTS # syntax: '[8472, 4789]' or '4789'.
  1368.  
  1369.   # VNTag decode support
  1370.   vntag:
  1371.     enabled: false
  1372.  
  1373.   # Geneve decoder is assigned to up to 4 UDP ports. By default only the
  1374.   # IANA assigned port 6081 is enabled.
  1375.   geneve:
  1376.     enabled: true
  1377.     ports: $GENEVE_PORTS # syntax: '[6081, 1234]' or '6081'.
  1378.  
  1379.   # maximum number of decoder layers for a packet
  1380.   # max-layers: 16
  1381.  
  1382. ##
  1383. ## Performance tuning and profiling
  1384. ##
  1385.  
  1386. # The detection engine builds internal groups of signatures. The engine
  1387. # allows us to specify the profile to use for them, to manage memory in an
  1388. # efficient way keeping good performance. For the profile keyword you
  1389. # can use the words "low", "medium", "high" or "custom". If you use custom,
  1390. # make sure to define the values in the "custom-values" section.
  1391. # Usually you would prefer medium/high/low.
  1392. #
  1393. # "sgh mpm-context", indicates how the staging should allot mpm contexts for
  1394. # the signature groups.  "single" indicates the use of a single context for
  1395. # all the signature group heads.  "full" indicates a mpm-context for each
  1396. # group head.  "auto" lets the engine decide the distribution of contexts
  1397. # based on the information the engine gathers on the patterns from each
  1398. # group head.
  1399. #
  1400. # The option inspection-recursion-limit is used to limit the recursive calls
  1401. # in the content inspection code.  For certain payload-sig combinations, we
  1402. # might end up taking too much time in the content inspection code.
  1403. # If the argument specified is 0, the engine uses an internally defined
  1404. # default limit.  When a value is not specified, there are no limits on the recursion.
  1405. detect:
  1406.   profile: medium
  1407.   custom-values:
  1408.     toclient-groups: 3
  1409.     toserver-groups: 25
  1410.   sgh-mpm-context: auto
  1411.   inspection-recursion-limit: 3000
  1412.   # If set to yes, the loading of signatures will be made after the capture
  1413.   # is started. This will limit the downtime in IPS mode.
  1414.   #delayed-detect: yes
  1415.  
  1416.   prefilter:
  1417.     # default prefiltering setting. "mpm" only creates MPM/fast_pattern
  1418.     # engines. "auto" also sets up prefilter engines for other keywords.
  1419.     # Use --list-keywords=all to see which keywords support prefiltering.
  1420.     default: mpm
  1421.  
  1422.   # the grouping values above control how many groups are created per
  1423.   # direction. Port whitelisting forces that port to get its own group.
  1424.   # Very common ports will benefit, as well as ports with many expensive
  1425.   # rules.
  1426.   grouping:
  1427.     #tcp-whitelist: 53, 80, 139, 443, 445, 1433, 3306, 3389, 6666, 6667, 8080
  1428.     #udp-whitelist: 53, 135, 5060
  1429.  
  1430.   profiling:
  1431.     # Log the rules that made it past the prefilter stage, per packet
  1432.     # default is off. The threshold setting determines how many rules
  1433.     # must have made it past pre-filter for that rule to trigger the
  1434.     # logging.
  1435.     #inspect-logging-threshold: 200
  1436.     grouping:
  1437.       dump-to-disk: false
  1438.       include-rules: false      # very verbose
  1439.       include-mpm-stats: false
  1440.  
  1441. # Select the multi pattern algorithm you want to run for scan/search the
  1442. # in the engine.
  1443. #
  1444. # The supported algorithms are:
  1445. # "ac"      - Aho-Corasick, default implementation
  1446. # "ac-bs"   - Aho-Corasick, reduced memory implementation
  1447. # "ac-ks"   - Aho-Corasick, "Ken Steele" variant
  1448. # "hs"      - Hyperscan, available when built with Hyperscan support
  1449. #
  1450. # The default mpm-algo value of "auto" will use "hs" if Hyperscan is
  1451. # available, "ac" otherwise.
  1452. #
  1453. # The mpm you choose also decides the distribution of mpm contexts for
  1454. # signature groups, specified by the conf - "detect.sgh-mpm-context".
  1455. # Selecting "ac" as the mpm would require "detect.sgh-mpm-context"
  1456. # to be set to "single", because of ac's memory requirements, unless the
  1457. # ruleset is small enough to fit in memory, in which case one can
  1458. # use "full" with "ac".  The rest of the mpms can be run in "full" mode.
  1459.  
  1460. mpm-algo: auto
  1461.  
  1462. # Select the matching algorithm you want to use for single-pattern searches.
  1463. #
  1464. # Supported algorithms are "bm" (Boyer-Moore) and "hs" (Hyperscan, only
  1465. # available if Suricata has been built with Hyperscan support).
  1466. #
  1467. # The default of "auto" will use "hs" if available, otherwise "bm".
  1468.  
  1469. spm-algo: auto
  1470.  
  1471. # Suricata is multi-threaded. Here the threading can be influenced.
  1472. threading:
  1473.   set-cpu-affinity: no
  1474.   # Tune cpu affinity of threads. Each family of threads can be bound
  1475.   # to specific CPUs.
  1476.   #
  1477.   # These 2 apply to the all runmodes:
  1478.   # management-cpu-set is used for flow timeout handling, counters
  1479.   # worker-cpu-set is used for 'worker' threads
  1480.   #
  1481.   # Additionally, for autofp these apply:
  1482.   # receive-cpu-set is used for capture threads
  1483.   # verdict-cpu-set is used for IPS verdict threads
  1484.   #
  1485.   cpu-affinity:
  1486.     - management-cpu-set:
  1487.         cpu: [ 0 ]  # include only these CPUs in affinity settings
  1488.     - receive-cpu-set:
  1489.         cpu: [ 0 ]  # include only these CPUs in affinity settings
  1490.     - worker-cpu-set:
  1491.         cpu: [ "all" ]
  1492.         mode: "exclusive"
  1493.         # Use explicitly 3 threads and don't compute number by using
  1494.         # detect-thread-ratio variable:
  1495.         # threads: 3
  1496.         prio:
  1497.           low: [ 0 ]
  1498.           medium: [ "1-2" ]
  1499.           high: [ 3 ]
  1500.           default: "medium"
  1501.     #- verdict-cpu-set:
  1502.     #    cpu: [ 0 ]
  1503.     #    prio:
  1504.     #      default: "high"
  1505.   #
  1506.   # By default Suricata creates one "detect" thread per available CPU/CPU core.
  1507.   # This setting allows controlling this behaviour. A ratio setting of 2 will
  1508.   # create 2 detect threads for each CPU/CPU core. So for a dual core CPU this
  1509.   # will result in 4 detect threads. If values below 1 are used, less threads
  1510.   # are created. So on a dual core CPU a setting of 0.5 results in 1 detect
  1511.   # thread being created. Regardless of the setting at a minimum 1 detect
  1512.   # thread will always be created.
  1513.   #
  1514.   detect-thread-ratio: 1.0
  1515.  
  1516. # Luajit has a strange memory requirement, its 'states' need to be in the
  1517. # first 2G of the process' memory.
  1518. #
  1519. # 'luajit.states' is used to control how many states are preallocated.
  1520. # State use: per detect script: 1 per detect thread. Per output script: 1 per
  1521. # script.
  1522. luajit:
  1523.   states: 128
  1524.  
  1525. # Profiling settings. Only effective if Suricata has been built with
  1526. # the --enable-profiling configure flag.
  1527. #
  1528. profiling:
  1529.   # Run profiling for every X-th packet. The default is 1, which means we
  1530.   # profile every packet. If set to 1000, one packet is profiled for every
  1531.   # 1000 received.
  1532.   #sample-rate: 1000
  1533.  
  1534.   # rule profiling
  1535.   rules:
  1536.  
  1537.     # Profiling can be disabled here, but it will still have a
  1538.     # performance impact if compiled in.
  1539.     enabled: yes
  1540.     filename: rule_perf.log
  1541.     append: yes
  1542.  
  1543.     # Sort options: ticks, avgticks, checks, matches, maxticks
  1544.     # If commented out all the sort options will be used.
  1545.     #sort: avgticks
  1546.  
  1547.     # Limit the number of sids for which stats are shown at exit (per sort).
  1548.     limit: 10
  1549.  
  1550.     # output to json
  1551.     json: yes
  1552.  
  1553.   # per keyword profiling
  1554.   keywords:
  1555.     enabled: yes
  1556.     filename: keyword_perf.log
  1557.     append: yes
  1558.  
  1559.   prefilter:
  1560.     enabled: yes
  1561.     filename: prefilter_perf.log
  1562.     append: yes
  1563.  
  1564.   # per rulegroup profiling
  1565.   rulegroups:
  1566.     enabled: yes
  1567.     filename: rule_group_perf.log
  1568.     append: yes
  1569.  
  1570.   # packet profiling
  1571.   packets:
  1572.  
  1573.     # Profiling can be disabled here, but it will still have a
  1574.     # performance impact if compiled in.
  1575.     enabled: yes
  1576.     filename: packet_stats.log
  1577.     append: yes
  1578.  
  1579.     # per packet csv output
  1580.     csv:
  1581.  
  1582.       # Output can be disabled here, but it will still have a
  1583.       # performance impact if compiled in.
  1584.       enabled: no
  1585.       filename: packet_stats.csv
  1586.  
  1587.   # profiling of locking. Only available when Suricata was built with
  1588.   # --enable-profiling-locks.
  1589.   locks:
  1590.     enabled: no
  1591.     filename: lock_stats.log
  1592.     append: yes
  1593.  
  1594.   pcap-log:
  1595.     enabled: no
  1596.     filename: pcaplog_stats.log
  1597.     append: yes
  1598.  
  1599. ##
  1600. ## Netfilter integration
  1601. ##
  1602.  
  1603. # When running in NFQ inline mode, it is possible to use a simulated
  1604. # non-terminal NFQUEUE verdict.
  1605. # This permits sending all needed packet to Suricata via this rule:
  1606. #        iptables -I FORWARD -m mark ! --mark $MARK/$MASK -j NFQUEUE
  1607. # And below, you can have your standard filtering ruleset. To activate
  1608. # this mode, you need to set mode to 'repeat'
  1609. # If you want a packet to be sent to another queue after an ACCEPT decision
  1610. # set the mode to 'route' and set next-queue value.
  1611. # On Linux >= 3.1, you can set batchcount to a value > 1 to improve performance
  1612. # by processing several packets before sending a verdict (worker runmode only).
  1613. # On Linux >= 3.6, you can set the fail-open option to yes to have the kernel
  1614. # accept the packet if Suricata is not able to keep pace.
  1615. # bypass mark and mask can be used to implement NFQ bypass. If bypass mark is
  1616. # set then the NFQ bypass is activated. Suricata will set the bypass mark/mask
  1617. # on packet of a flow that need to be bypassed. The Nefilter ruleset has to
  1618. # directly accept all packets of a flow once a packet has been marked.
  1619. nfq:
  1620. #  mode: accept
  1621. #  repeat-mark: 1
  1622. #  repeat-mask: 1
  1623. #  bypass-mark: 1
  1624. #  bypass-mask: 1
  1625. #  route-queue: 2
  1626. #  batchcount: 20
  1627. #  fail-open: yes
  1628.  
  1629. #nflog support
  1630. nflog:
  1631.     # netlink multicast group
  1632.     # (the same as the iptables --nflog-group param)
  1633.     # Group 0 is used by the kernel, so you can't use it
  1634.   - group: 2
  1635.     # netlink buffer size
  1636.     buffer-size: 18432
  1637.     # put default value here
  1638.   - group: default
  1639.     # set number of packets to queue inside kernel
  1640.     qthreshold: 1
  1641.     # set the delay before flushing packet in the kernel's queue
  1642.     qtimeout: 100
  1643.     # netlink max buffer size
  1644.     max-size: 20000
  1645.  
  1646. ##
  1647. ## Advanced Capture Options
  1648. ##
  1649.  
  1650. # General settings affecting packet capture
  1651. capture:
  1652.   # disable NIC offloading. It's restored when Suricata exits.
  1653.   # Enabled by default.
  1654.   #disable-offloading: false
  1655.   #
  1656.   # disable checksum validation. Same as setting '-k none' on the
  1657.   # commandline.
  1658.   #checksum-validation: none
  1659.  
  1660. # Netmap support
  1661. #
  1662. # Netmap operates with NIC directly in driver, so you need FreeBSD 11+ which has
  1663. # built-in Netmap support or compile and install the Netmap module and appropriate
  1664. # NIC driver for your Linux system.
  1665. # To reach maximum throughput disable all receive-, segmentation-,
  1666. # checksum- offloading on your NIC (using ethtool or similar).
  1667. # Disabling TX checksum offloading is *required* for connecting OS endpoint
  1668. # with NIC endpoint.
  1669. # You can find more information at https://github.com/luigirizzo/netmap
  1670. #
  1671. netmap:
  1672.    # To specify OS endpoint add plus sign at the end (e.g. "eth0+")
  1673.  - interface: eth2
  1674.    # Number of capture threads. "auto" uses number of RSS queues on interface.
  1675.    # Warning: unless the RSS hashing is symmetrical, this will lead to
  1676.    # accuracy issues.
  1677.    #threads: auto
  1678.    # You can use the following variables to activate netmap tap or IPS mode.
  1679.    # If copy-mode is set to ips or tap, the traffic coming to the current
  1680.    # interface will be copied to the copy-iface interface. If 'tap' is set, the
  1681.    # copy is complete. If 'ips' is set, the packet matching a 'drop' action
  1682.    # will not be copied.
  1683.    # To specify the OS as the copy-iface (so the OS can route packets, or forward
  1684.    # to a service running on the same machine) add a plus sign at the end
  1685.    # (e.g. "copy-iface: eth0+"). Don't forget to set up a symmetrical eth0+ -> eth0
  1686.    # for return packets. Hardware checksumming must be *off* on the interface if
  1687.    # using an OS endpoint (e.g. 'ifconfig eth0 -rxcsum -txcsum -rxcsum6 -txcsum6' for FreeBSD
  1688.    # or 'ethtool -K eth0 tx off rx off' for Linux).
  1689.    #copy-mode: tap
  1690.    #copy-iface: eth3
  1691.    # Set to yes to disable promiscuous mode
  1692.    # disable-promisc: no
  1693.    # Choose checksum verification mode for the interface. At the moment
  1694.    # of the capture, some packets may have an invalid checksum due to
  1695.    # the checksum computation being offloaded to the network card.
  1696.    # Possible values are:
  1697.    #  - yes: checksum validation is forced
  1698.    #  - no: checksum validation is disabled
  1699.    #  - auto: Suricata uses a statistical approach to detect when
  1700.    #  checksum off-loading is used.
  1701.    # Warning: 'checksum-validation' must be set to yes to have any validation
  1702.    #checksum-checks: auto
  1703.    # BPF filter to apply to this interface. The pcap filter syntax apply here.
  1704.    #bpf-filter: port 80 or udp
  1705.  #- interface: eth3
  1706.    #threads: auto
  1707.    #copy-mode: tap
  1708.    #copy-iface: eth2
  1709.    # Put default values here
  1710.  - interface: default
  1711.  
  1712. # PF_RING configuration: for use with native PF_RING support
  1713. # for more info see http://www.ntop.org/products/pf_ring/
  1714. pfring:
  1715.   - interface: eth0
  1716.     # Number of receive threads. If set to 'auto' Suricata will first try
  1717.     # to use CPU (core) count and otherwise RSS queue count.
  1718.     threads: auto
  1719.  
  1720.     # Default clusterid.  PF_RING will load balance packets based on flow.
  1721.     # All threads/processes that will participate need to have the same
  1722.     # clusterid.
  1723.     cluster-id: 99
  1724.  
  1725.     # Default PF_RING cluster type. PF_RING can load balance per flow.
  1726.     # Possible values are cluster_flow or cluster_round_robin.
  1727.     cluster-type: cluster_flow
  1728.  
  1729.     # bpf filter for this interface
  1730.     #bpf-filter: tcp
  1731.  
  1732.     # If bypass is set then the PF_RING hw bypass is activated, when supported
  1733.     # by the network interface. Suricata will instruct the interface to bypass
  1734.     # all future packets for a flow that need to be bypassed.
  1735.     #bypass: yes
  1736.  
  1737.     # Choose checksum verification mode for the interface. At the moment
  1738.     # of the capture, some packets may have an invalid checksum due to
  1739.     # the checksum computation being offloaded to the network card.
  1740.     # Possible values are:
  1741.     #  - rxonly: only compute checksum for packets received by network card.
  1742.     #  - yes: checksum validation is forced
  1743.     #  - no: checksum validation is disabled
  1744.     #  - auto: Suricata uses a statistical approach to detect when
  1745.     #  checksum off-loading is used. (default)
  1746.     # Warning: 'checksum-validation' must be set to yes to have any validation
  1747.     #checksum-checks: auto
  1748.   # Second interface
  1749.   #- interface: eth1
  1750.   #  threads: 3
  1751.   #  cluster-id: 93
  1752.   #  cluster-type: cluster_flow
  1753.   # Put default values here
  1754.   - interface: default
  1755.     #threads: 2
  1756.  
  1757. # For FreeBSD ipfw(8) divert(4) support.
  1758. # Please make sure you have ipfw_load="YES" and ipdivert_load="YES"
  1759. # in /etc/loader.conf or kldload'ing the appropriate kernel modules.
  1760. # Additionally, you need to have an ipfw rule for the engine to see
  1761. # the packets from ipfw.  For Example:
  1762. #
  1763. #   ipfw add 100 divert 8000 ip from any to any
  1764. #
  1765. # N.B. This example uses "8000" -- this number must mach the values
  1766. # you passed on the command line, i.e., -d 8000
  1767. #
  1768. ipfw:
  1769.  
  1770.   # Reinject packets at the specified ipfw rule number.  This config
  1771.   # option is the ipfw rule number AT WHICH rule processing continues
  1772.   # in the ipfw processing system after the engine has finished
  1773.   # inspecting the packet for acceptance.  If no rule number is specified,
  1774.   # accepted packets are reinjected at the divert rule which they entered
  1775.   # and IPFW rule processing continues.  No check is done to verify
  1776.   # this will rule makes sense so care must be taken to avoid loops in ipfw.
  1777.   #
  1778.   ## The following example tells the engine to reinject packets
  1779.   # back into the ipfw firewall AT rule number 5500:
  1780.   #
  1781.   # ipfw-reinjection-rule-number: 5500
  1782.  
  1783.  
  1784. napatech:
  1785.     # When use_all_streams is set to "yes" the initialization code will query
  1786.     # the Napatech service for all configured streams and listen on all of them.
  1787.     # When set to "no" the streams config array will be used.
  1788.     #
  1789.     # This option necessitates running the appropriate NTPL commands to create
  1790.     # the desired streams prior to running Suricata.
  1791.     #use-all-streams: no
  1792.  
  1793.     # The streams to listen on when auto-config is disabled or when and threading
  1794.     # cpu-affinity is disabled.  This can be either:
  1795.     #   an individual stream (e.g. streams: [0])
  1796.     # or
  1797.     #   a range of streams (e.g. streams: ["0-3"])
  1798.     #
  1799.     streams: ["0-3"]
  1800.  
  1801.     # Stream stats can be enabled to provide fine grain packet and byte counters
  1802.     # for each thread/stream that is configured.
  1803.     #
  1804.     enable-stream-stats: no
  1805.  
  1806.     # When auto-config is enabled the streams will be created and assigned
  1807.     # automatically to the NUMA node where the thread resides.  If cpu-affinity
  1808.     # is enabled in the threading section.  Then the streams will be created
  1809.     # according to the number of worker threads specified in the worker-cpu-set.
  1810.     # Otherwise, the streams array is used to define the streams.
  1811.     #
  1812.     # This option is intended primarily to support legacy configurations.
  1813.     #
  1814.     # This option cannot be used simultaneously with either "use-all-streams"
  1815.     # or "hardware-bypass".
  1816.     #
  1817.     auto-config: yes
  1818.  
  1819.     # Enable hardware level flow bypass.
  1820.     #
  1821.     hardware-bypass: yes
  1822.  
  1823.     # Enable inline operation.  When enabled traffic arriving on a given port is
  1824.     # automatically forwarded out its peer port after analysis by Suricata.
  1825.     #
  1826.     inline: no
  1827.  
  1828.     # Ports indicates which Napatech ports are to be used in auto-config mode.
  1829.     # these are the port IDs of the ports that will be merged prior to the
  1830.     # traffic being distributed to the streams.
  1831.     #
  1832.     # When hardware-bypass is enabled the ports must be configured as a segment.
  1833.     # specify the port(s) on which upstream and downstream traffic will arrive.
  1834.     # This information is necessary for the hardware to properly process flows.
  1835.     #
  1836.     # When using a tap configuration one of the ports will receive inbound traffic
  1837.     # for the network and the other will receive outbound traffic. The two ports on a
  1838.     # given segment must reside on the same network adapter.
  1839.     #
  1840.     # When using a SPAN-port configuration the upstream and downstream traffic
  1841.     # arrives on a single port. This is configured by setting the two sides of the
  1842.     # segment to reference the same port.  (e.g. 0-0 to configure a SPAN port on
  1843.     # port 0).
  1844.     #
  1845.     # port segments are specified in the form:
  1846.     #    ports: [0-1,2-3,4-5,6-6,7-7]
  1847.     #
  1848.     # For legacy systems when hardware-bypass is disabled this can be specified in any
  1849.     # of the following ways:
  1850.     #
  1851.     #   a list of individual ports (e.g. ports: [0,1,2,3])
  1852.     #
  1853.     #   a range of ports (e.g. ports: [0-3])
  1854.     #
  1855.     #   "all" to indicate that all ports are to be merged together
  1856.     #   (e.g. ports: [all])
  1857.     #
  1858.     # This parameter has no effect if auto-config is disabled.
  1859.     #
  1860.     ports: [0-1,2-3]
  1861.  
  1862.     # When auto-config is enabled the hashmode specifies the algorithm for
  1863.     # determining to which stream a given packet is to be delivered.
  1864.     # This can be any valid Napatech NTPL hashmode command.
  1865.     #
  1866.     # The most common hashmode commands are:  hash2tuple, hash2tuplesorted,
  1867.     # hash5tuple, hash5tuplesorted and roundrobin.
  1868.     #
  1869.     # See Napatech NTPL documentation other hashmodes and details on their use.
  1870.     #
  1871.     # This parameter has no effect if auto-config is disabled.
  1872.     #
  1873.     hashmode: hash5tuplesorted
  1874.  
  1875. ##
  1876. ## Configure Suricata to load Suricata-Update managed rules.
  1877. ##
  1878.  
  1879. default-rule-path: /etc/suricata/rules
  1880.  
  1881. rule-files:
  1882.   - dga.rules
  1883.   - miner.rules
  1884.   - scan.rules
  1885.   - spambot.rules
  1886.   - ssh-exfil.rules
  1887.   - tunnel-dns.rules
  1888.   - tunnel-icmp.rules
  1889.   - ssh-transfer.rules
  1890.  
  1891. ##
  1892. ## Auxiliary configuration files.
  1893. ##
  1894.  
  1895. classification-file: /etc/suricata/classification.config
  1896. reference-config-file: /etc/suricata/reference.config
  1897. # threshold-file: /etc/suricata/threshold.config
  1898.  
  1899. ##
  1900. ## Include other configs
  1901. ##
  1902.  
  1903. # Includes:  Files included here will be handled as if they were in-lined
  1904. # in this configuration file. Files with relative pathnames will be
  1905. # searched for in the same directory as this configuration file. You may
  1906. # use absolute pathnames too.
  1907. # You can specify more than 2 configuration files, if needed.
  1908. #include: include1.yaml
  1909. #include: include2.yaml
Add Comment
Please, Sign In to add comment