## Step 3: select outputs to enable
##
-# Logging configuration. This is not about logging IDS alerts, but
-# output about what Suricata is doing, like startup messages, errors, etc.
-logging:
- # The default log level, can be overridden in an output section.
- # Note that debug level logging will only be emitted if Suricata was
- # compiled with the --enable-debug configure option.
- #
- # This value is overriden by the SC_LOG_LEVEL env var.
- default-log-level: notice
-
- # The default output format. Optional parameter, should default to
- # something reasonable if not provided. Can be overriden in an
- # output section. You can leave this out to get the default.
- #
- # This value is overriden by the SC_LOG_FORMAT env var.
- #default-log-format: "[%i] %t - (%f:%l) <%d> (%n) -- "
+# The default logging directory. Any log or output file will be
+# placed here if its not specified with a full path name. This can be
+# overridden with the -l command line parameter.
+default-log-dir: @e_logdir@
- # A regex to filter output. Can be overridden in an output section.
- # Defaults to empty (no filter).
- #
- # This value is overriden by the SC_LOG_OP_FILTER env var.
- default-output-filter:
+# global stats configuration
+stats:
+ enabled: yes
+ # The interval field (in seconds) controls at what interval
+ # the loggers are invoked.
+ interval: 8
- # Define your logging outputs. If none are defined, or they are all
- # disabled you will get the default - console output.
- outputs:
- - console:
- enabled: yes
- # type: json
- - file:
+# Configure the type of alert (and other) logging you would like.
+outputs:
+ # a line based alerts log similar to Snort's fast.log
+ - fast:
enabled: yes
- filename: @e_logdir@suricata.log
- # type: json
- - syslog:
- enabled: no
- facility: local5
- format: "[%i] <%d> -- "
- # type: json
-
-##
-## Step 4: configure capture settings
-##
-
-# af-packet support
-af-packet:
- - interface: eth0
- # Number of receive threads. "auto" uses the number of cores
- #threads: auto
- # Default clusterid. AF_PACKET will load balance packets based on flow.
- cluster-id: 99
- # Default AF_PACKET cluster type. AF_PACKET can load balance per flow or per hash.
- # This is only supported for Linux kernel > 3.1
- # possible value are:
- # * cluster_round_robin: round robin load balancing
- # * cluster_flow: all packets of a given flow are send to the same socket
- # * cluster_cpu: all packets treated in kernel by a CPU are send to the same socket
- # * cluster_qm: all packets linked by network card to a RSS queue are sent to the same
- # socket. Requires at least Linux 3.14.
- # * cluster_random: packets are sent randomly to sockets but with an equipartition.
- # Requires at least Linux 3.14.
- # * cluster_rollover: kernel rotates between sockets filling each socket before moving
- # to the next. Requires at least Linux 3.10.
- # Recommended modes are cluster_flow on most boxes and cluster_cpu or cluster_qm on system
- # with capture card using RSS (require cpu affinity tuning and system irq tuning)
- cluster-type: cluster_flow
- # In some fragmentation case, the hash can not be computed. If "defrag" is set
- # to yes, the kernel will do the needed defragmentation before sending the packets.
- defrag: yes
- # After Linux kernel 3.10 it is possible to activate the rollover option: if a socket is
- # full then kernel will send the packet on the next socket with room available. This option
- # can minimize packet drop and increase the treated bandwidth on single intensive flow.
- #rollover: yes
- # To use the ring feature of AF_PACKET, set 'use-mmap' to yes
- #use-mmap: yes
- # Lock memory map to avoid it goes to swap. Be careful that over suscribing could lock
- # your system
- #mmap-locked: yes
- # Use tpacket_v3, capture mode, only active if user-mmap is true
- tpacket-v3: yes
- # Ring size will be computed with respect to max_pending_packets and number
- # of threads. You can set manually the ring size in number of packets by setting
- # the following value. If you are using flow cluster-type and have really network
- # intensive single-flow you could want to set the ring-size independently of the number
- # of threads:
- #ring-size: 2048
- # Block size is used by tpacket_v3 only. It should set to a value high enough to contain
- # a decent number of packets. Size is in bytes so please consider your MTU. It should be
- # a power of 2 and it must be multiple of page size (usually 4096).
- #block-size: 32768
- # tpacket_v3 block timeout: an open block is passed to userspace if it is not
- # filled after block-timeout milliseconds.
- #block-timeout: 10
- # On busy system, this could help to set it to yes to recover from a packet drop
- # phase. This will result in some packets (at max a ring flush) being non treated.
- #use-emergency-flush: yes
- # recv buffer size, increase value could improve performance
- # buffer-size: 32768
- # Set to yes to disable promiscuous mode
- # disable-promisc: no
- # Choose checksum verification mode for the interface. At the moment
- # of the capture, some packets may be with an invalid checksum due to
- # offloading to the network card of the checksum computation.
- # Possible values are:
- # - kernel: use indication sent by kernel for each packet (default)
- # - yes: checksum validation is forced
- # - no: checksum validation is disabled
- # - auto: suricata uses a statistical approach to detect when
- # checksum off-loading is used.
- # Warning: 'checksum-validation' must be set to yes to have any validation
- #checksum-checks: kernel
- # BPF filter to apply to this interface. The pcap filter syntax apply here.
- #bpf-filter: port 80 or udp
- # You can use the following variables to activate AF_PACKET tap or IPS mode.
- # If copy-mode is set to ips or tap, the traffic coming to the current
- # interface will be copied to the copy-iface interface. If 'tap' is set, the
- # copy is complete. If 'ips' is set, the packet matching a 'drop' action
- # will not be copied.
- #copy-mode: ips
- #copy-iface: eth1
-
- # Put default values here. These will be used for an interface that is not
- # in the list above.
- - interface: default
- #threads: auto
- #use-mmap: no
- #rollover: yes
- tpacket-v3: yes
-
-pcap:
- - interface: eth0
- # On Linux, pcap will try to use mmaped capture and will use buffer-size
- # as total of memory used by the ring. So set this to something bigger
- # than 1% of your bandwidth.
- #buffer-size: 16777216
- #bpf-filter: "tcp and port 25"
- # Choose checksum verification mode for the interface. At the moment
- # of the capture, some packets may be with an invalid checksum due to
- # offloading to the network card of the checksum computation.
- # Possible values are:
- # - yes: checksum validation is forced
- # - no: checksum validation is disabled
- # - auto: suricata uses a statistical approach to detect when
- # checksum off-loading is used. (default)
- # Warning: 'checksum-validation' must be set to yes to have any validation
- #checksum-checks: auto
- # With some accelerator cards using a modified libpcap (like myricom), you
- # may want to have the same number of capture threads as the number of capture
- # rings. In this case, set up the threads variable to N to start N threads
- # listening on the same interface.
- #threads: 16
- # set to no to disable promiscuous mode:
- #promisc: no
- # set snaplen, if not set it defaults to MTU if MTU can be known
- # via ioctl call and to full capture if not.
- #snaplen: 1518
- # Put default values here
- - interface: default
- #checksum-checks: auto
-
-pcap-file:
- # Possible values are:
- # - yes: checksum validation is forced
- # - no: checksum validation is disabled
- # - auto: suricata uses a statistical approach to detect when
- # checksum off-loading is used. (default)
- # Warning: 'checksum-validation' must be set to yes to have checksum tested
- checksum-checks: auto
-
-##
-## Step 5: App Layer Protocol Configuration
-##
+ filename: fast.log
+ append: yes
+ #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
-# Configure the app-layer parsers. The protocols section details each
-# protocol.
-#
-# The option "enabled" takes 3 values - "yes", "no", "detection-only".
-# "yes" enables both detection and the parser, "no" disables both, and
-# "detection-only" enables protocol detection only (parser disabled).
-app-layer:
- protocols:
- tls:
+ # Extensible Event Format (nicknamed EVE) event log in JSON format
+ - eve-log:
enabled: yes
- detection-ports:
- dp: 443
+ filetype: regular #regular|syslog|unix_dgram|unix_stream|redis
+ filename: eve.json
+ #prefix: "@cee: " # prefix to prepend to each log entry
+ # the following are valid when type: syslog above
+ #identity: "suricata"
+ #facility: local5
+ #level: Info ## possible levels: Emergency, Alert, Critical,
+ ## Error, Warning, Notice, Info, Debug
+ #redis:
+ # server: 127.0.0.1
+ # port: 6379
+ # mode: list ## possible values: list (default), channel
+ # key: suricata ## key or channel to use (default to suricata)
+ # Redis pipelining set up. This will enable to only do a query every
+ # 'batch-size' events. This should lower the latency induced by network
+ # connection at the cost of some memory. There is no flushing implemented
+ # so this setting as to be reserved to high traffic suricata.
+ # pipelining:
+ # enabled: yes ## set enable to yes to enable query pipelining
+ # batch-size: 10 ## number of entry to keep in buffer
+ types:
+ - alert:
+ # payload: yes # enable dumping payload in Base64
+ # payload-buffer-size: 4kb # max size of payload buffer to output in eve-log
+ # payload-printable: yes # enable dumping payload in printable (lossy) format
+ # packet: yes # enable dumping of packet (without stream segments)
+ # http: yes # enable dumping of http fields
+ # tls: yes # enable dumping of tls fields
+ # ssh: yes # enable dumping of ssh fields
+ # smtp: yes # enable dumping of smtp fields
- #no-reassemble: yes
- dcerpc:
- enabled: yes
- ftp:
- enabled: yes
- ssh:
- enabled: yes
- smtp:
- enabled: yes
- # Configure SMTP-MIME Decoder
- mime:
- # Decode MIME messages from SMTP transactions
- # (may be resource intensive)
- # This field supercedes all others because it turns the entire
- # process on or off
- decode-mime: yes
+ # HTTP X-Forwarded-For support by adding an extra field or overwriting
+ # the source or destination IP address (depending on flow direction)
+ # with the one reported in the X-Forwarded-For HTTP header. This is
+ # helpful when reviewing alerts for traffic that is being reverse
+ # or forward proxied.
+ xff:
+ enabled: no
+ # Two operation modes are available, "extra-data" and "overwrite".
+ mode: extra-data
+ # Two proxy deployments are supported, "reverse" and "forward". In
+ # a "reverse" deployment the IP address used is the last one, in a
+ # "forward" deployment the first IP address is used.
+ deployment: reverse
+ # Header name where the actual IP address will be reported, if more
+ # than one IP address is present, the last IP address will be the
+ # one taken into consideration.
+ header: X-Forwarded-For
+ - http:
+ extended: yes # enable this for extended logging information
+ # custom allows additional http fields to be included in eve-log
+ # the example below adds three additional fields when uncommented
+ #custom: [Accept-Encoding, Accept-Language, Authorization]
+ - dns
+ - tls:
+ extended: yes # enable this for extended logging information
+ - files:
+ force-magic: no # force logging magic on all logged files
+ force-md5: no # force logging of md5 checksums
+ #- drop:
+ # alerts: no # log alerts that caused drops
+ - smtp:
+ #extended: yes # enable this for extended logging information
+ # this includes: bcc, message-id, subject, x_mailer, user-agent
+ # custom fields logging from the list:
+ # reply-to, bcc, message-id, subject, x-mailer, user-agent, received,
+ # x-originating-ip, in-reply-to, references, importance, priority,
+ # sensitivity, organization, content-md5, date
+ #custom: [received, x-mailer, x-originating-ip, relays, reply-to, bcc]
+ # output md5 of fields: body, subject
+ # for the body you need to set app-layer.protocols.smtp.mime.body-md5
+ # to yes
+ #md5: [body, subject]
- # Decode MIME entity bodies (ie. base64, quoted-printable, etc.)
- decode-base64: yes
- decode-quoted-printable: yes
+ - ssh
+ - stats:
+ totals: yes # stats for all threads merged together
+ threads: no # per thread stats
+ deltas: no # include delta values
+ # bi-directional flows
+ #- flow
+ # uni-directional flows
+ #- netflow
- # Maximum bytes per header data value stored in the data structure
- # (default is 2000)
- header-value-depth: 2000
+ # alert output for use with Barnyard2
+ - unified2-alert:
+ enabled: no
+ filename: unified2.alert
- # Extract URLs and save in state data structure
- extract-urls: yes
- # Set to yes to compute the md5 of the mail body. You will then
- # be able to journalize it.
- body-md5: no
- # Configure inspected-tracker for file_data keyword
- inspected-tracker:
- content-limit: 100000
- content-inspect-min-size: 32768
- content-inspect-window: 4096
- imap:
- enabled: detection-only
- msn:
- enabled: detection-only
- smb:
- enabled: yes
- detection-ports:
- dp: 139
- # Note: Modbus probe parser is minimalist due to the poor significant field
- # Only Modbus message length (greater than Modbus header length)
- # And Protocol ID (equal to 0) are checked in probing parser
- # It is important to enable detection port and define Modbus port
- # to avoid false positive
- modbus:
- # How many unreplied Modbus requests are considered a flood.
- # If the limit is reached, app-layer-event:modbus.flooded; will match.
- #request-flood: 500
+ # File size limit. Can be specified in kb, mb, gb. Just a number
+ # is parsed as bytes.
+ #limit: 32mb
- enabled: no
- detection-ports:
- dp: 502
- # According to MODBUS Messaging on TCP/IP Implementation Guide V1.0b, it
- # is recommended to keep the TCP connection opened with a remote device
- # and not to open and close it for each MODBUS/TCP transaction. In that
- # case, it is important to set the depth of the stream reassembling as
- # unlimited (stream.reassembly.depth: 0)
- # smb2 detection is disabled internally inside the engine.
- #smb2:
- # enabled: yes
- dns:
- # memcaps. Globally and per flow/state.
- #global-memcap: 16mb
- #state-memcap: 512kb
+ # Sensor ID field of unified2 alerts.
+ #sensor-id: 0
- # How many unreplied DNS requests are considered a flood.
- # If the limit is reached, app-layer-event:dns.flooded; will match.
- #request-flood: 500
+ # Include payload of packets related to alerts. Defaults to true, set to
+ # false if payload is not required.
+ #payload: yes
- tcp:
- enabled: yes
- detection-ports:
- dp: 53
- udp:
- enabled: yes
- detection-ports:
- dp: 53
- http:
+ # HTTP X-Forwarded-For support by adding the unified2 extra header or
+ # overwriting the source or destination IP address (depending on flow
+ # direction) with the one reported in the X-Forwarded-For HTTP header.
+ # This is helpful when reviewing alerts for traffic that is being reverse
+ # or forward proxied.
+ xff:
+ enabled: no
+ # Two operation modes are available, "extra-data" and "overwrite". Note
+ # that in the "overwrite" mode, if the reported IP address in the HTTP
+ # X-Forwarded-For header is of a different version of the packet
+ # received, it will fall-back to "extra-data" mode.
+ mode: extra-data
+ # Two proxy deployments are supported, "reverse" and "forward". In
+ # a "reverse" deployment the IP address used is the last one, in a
+ # "forward" deployment the first IP address is used.
+ deployment: reverse
+ # Header name where the actual IP address will be reported, if more
+ # than one IP address is present, the last IP address will be the
+ # one taken into consideration.
+ header: X-Forwarded-For
+
+ # a line based log of HTTP requests (no alerts)
+ - http-log:
enabled: yes
- # memcap: 64mb
+ filename: http.log
+ append: yes
+ #extended: yes # enable this for extended logging information
+ #custom: yes # enabled the custom logging format (defined by customformat)
+ #customformat: "%{%D-%H:%M:%S}t.%z %{X-Forwarded-For}i %H %m %h %u %s %B %a:%p -> %A:%P"
+ #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
- # default-config: Used when no server-config matches
- # personality: List of personalities used by default
- # request-body-limit: Limit reassembly of request body for inspection
- # by http_client_body & pcre /P option.
- # response-body-limit: Limit reassembly of response body for inspection
- # by file_data, http_server_body & pcre /Q option.
- # double-decode-path: Double decode path section of the URI
- # double-decode-query: Double decode query section of the URI
- #
- # server-config: List of server configurations to use if address matches
- # address: List of ip addresses or networks for this block
- # personalitiy: List of personalities used by this block
- # request-body-limit: Limit reassembly of request body for inspection
- # by http_client_body & pcre /P option.
- # response-body-limit: Limit reassembly of response body for inspection
- # by file_data, http_server_body & pcre /Q option.
- # double-decode-path: Double decode path section of the URI
- # double-decode-query: Double decode query section of the URI
- #
- # uri-include-all: Include all parts of the URI. By default the
- # 'scheme', username/password, hostname and port
- # are excluded. Setting this option to true adds
- # all of them to the normalized uri as inspected
- # by http_uri, urilen, pcre with /U and the other
- # keywords that inspect the normalized uri.
- # Note that this does not affect http_raw_uri.
- # Also, note that including all was the default in
- # 1.4 and 2.0beta1.
- #
- # meta-field-limit: Hard size limit for request and response size
- # limits. Applies to request line and headers,
- # response line and headers. Does not apply to
- # request or response bodies. Default is 18k.
- # If this limit is reached an event is raised.
- #
- # Currently Available Personalities:
- # Minimal, Generic, IDS (default), IIS_4_0, IIS_5_0, IIS_5_1, IIS_6_0,
- # IIS_7_0, IIS_7_5, Apache_2
- libhtp:
- default-config:
- personality: IDS
+ # a line based log of TLS handshake parameters (no alerts)
+ - tls-log:
+ enabled: no # Log TLS connections.
+ filename: tls.log # File to store TLS logs.
+ append: yes
+ #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
+ #extended: yes # Log extended information like fingerprint
- # Can be specified in kb, mb, gb. Just a number indicates
- # it's in bytes.
- request-body-limit: 100kb
- response-body-limit: 100kb
+ # output module to store certificates chain to disk
+ - tls-store:
+ enabled: no
+ #certs-log-dir: certs # directory to store the certificates files
- # inspection limits
- request-body-minimal-inspect-size: 32kb
- request-body-inspect-window: 4kb
- response-body-minimal-inspect-size: 40kb
- response-body-inspect-window: 16kb
+ # a line based log of DNS requests and/or replies (no alerts)
+ - dns-log:
+ enabled: no
+ filename: dns.log
+ append: yes
+ #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
- # auto will use http-body-inline mode in IPS mode, yes or no set it statically
- http-body-inline: auto
+ # Packet log... log packets in pcap format. 3 modes of operation: "normal"
+ # "multi" and "sguil".
+ #
+ # In normal mode a pcap file "filename" is created in the default-log-dir,
+ # or are as specified by "dir".
+ # In multi mode, a file is created per thread. This will perform much
+ # better, but will create multiple files where 'normal' would create one.
+ # In multi mode the filename takes a few special variables:
+ # - %n -- thread number
+ # - %i -- thread id
+ # - %t -- timestamp (secs or secs.usecs based on 'ts-format'
+ # E.g. filename: pcap.%n.%t
+ #
+ # Note that it's possible to use directories, but the directories are not
+ # created by Suricata. E.g. filename: pcaps/%n/log.%s will log into the
+ # per thread directory.
+ #
+ # Also note that the limit and max-files settings are enforced per thread.
+ # So the size limit when using 8 threads with 1000mb files and 2000 files
+ # is: 8*1000*2000 ~ 16TiB.
+ #
+ # In Sguil mode "dir" indicates the base directory. In this base dir the
+ # pcaps are created in th directory structure Sguil expects:
+ #
+ # $sguil-base-dir/YYYY-MM-DD/$filename.<timestamp>
+ #
+ # By default all packets are logged except:
+ # - TCP streams beyond stream.reassembly.depth
+ # - encrypted streams after the key exchange
+ #
+ - pcap-log:
+ enabled: no
+ filename: log.pcap
- # Take a random value for inspection sizes around the specified value.
- # This lower the risk of some evasion technics but could lead
- # detection change between runs. It is set to 'yes' by default.
- #randomize-inspection-sizes: yes
- # If randomize-inspection-sizes is active, the value of various
- # inspection size will be choosen in the [1 - range%, 1 + range%]
- # range
- # Default value of randomize-inspection-range is 10.
- #randomize-inspection-range: 10
+ # File size limit. Can be specified in kb, mb, gb. Just a number
+ # is parsed as bytes.
+ limit: 1000mb
- # decoding
- double-decode-path: no
- double-decode-query: no
+ # If set to a value will enable ring buffer mode. Will keep Maximum of "max-files" of size "limit"
+ max-files: 2000
- server-config:
+ mode: normal # normal, multi or sguil.
+ #sguil-base-dir: /nsm_data/
+ #ts-format: usec # sec or usec second format (default) is filename.sec usec is filename.sec.usec
+ use-stream-depth: no #If set to "yes" packets seen after reaching stream inspection depth are ignored. "no" logs all packets
+ honor-pass-rules: no # If set to "yes", flows in which a pass rule matched will stopped being logged.
- #- apache:
- # address: [192.168.1.0/24, 127.0.0.0/8, "::1"]
- # personality: Apache_2
- # # Can be specified in kb, mb, gb. Just a number indicates
- # # it's in bytes.
- # request-body-limit: 4096
- # response-body-limit: 4096
- # double-decode-path: no
- # double-decode-query: no
+ # a full alerts log containing much information for signature writers
+ # or for investigating suspected false positives.
+ - alert-debug:
+ enabled: no
+ filename: alert-debug.log
+ append: yes
+ #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
- #- iis7:
- # address:
- # - 192.168.0.0/24
- # - 192.168.10.0/24
- # personality: IIS_7_0
- # # Can be specified in kb, mb, gb. Just a number indicates
- # # it's in bytes.
- # request-body-limit: 4096
- # response-body-limit: 4096
- # double-decode-path: no
- # double-decode-query: no
+ # alert output to prelude (http://www.prelude-technologies.com/) only
+ # available if Suricata has been compiled with --enable-prelude
+ - alert-prelude:
+ enabled: no
+ profile: suricata
+ log-packet-content: no
+ log-packet-header: yes
+ # Stats.log contains data from various counters of the suricata engine.
+ - stats:
+ enabled: yes
+ filename: stats.log
+ totals: yes # stats for all threads merged together
+ threads: no # per thread stats
+ #null-values: yes # print counters that have value 0
-##############################################################################
-##
-## Advanced settings below
-##
-##############################################################################
+ # a line based alerts log similar to fast.log into syslog
+ - syslog:
+ enabled: no
+ # reported identity to syslog. If ommited the program name (usually
+ # suricata) will be used.
+ #identity: "suricata"
+ facility: local5
+ #level: Info ## possible levels: Emergency, Alert, Critical,
+ ## Error, Warning, Notice, Info, Debug
-##
-## Run Options
-##
+ # a line based information for dropped packets in IPS mode
+ - drop:
+ enabled: no
+ filename: drop.log
+ append: yes
+ #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
-# Run suricata as user and group.
-#run-as:
-# user: suri
-# group: suri
+ # output module to store extracted files to disk
+ #
+ # The files are stored to the log-dir in a format "file.<id>" where <id> is
+ # an incrementing number starting at 1. For each file "file.<id>" a meta
+ # file "file.<id>.meta" is created.
+ #
+ # File extraction depends on a lot of things to be fully done:
+ # - stream reassembly depth. For optimal results, set this to 0 (unlimited)
+ # - http request / response body sizes. Again set to 0 for optimal results.
+ # - rules that contain the "filestore" keyword.
+ - file-store:
+ enabled: no # set to yes to enable
+ log-dir: files # directory to store the files
+ force-magic: no # force logging magic on all stored files
+ force-md5: no # force logging of md5 checksums
+ force-filestore: no # force storing of all files
+ #waldo: file.waldo # waldo file to store the file_id across runs
-# Some logging module will use that name in event as identifier. The default
-# value is the hostname
-#sensor-name: suricata
+ # output module to log files tracked in a easily parsable json format
+ - file-log:
+ enabled: no
+ filename: files-json.log
+ append: yes
+ #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
-# Default pid file.
-# Will use this file if no --pidfile in command options.
-#pid-file: @e_rundir@suricata.pid
+ force-magic: no # force logging magic on all logged files
+ force-md5: no # force logging of md5 checksums
-# Daemon working directory
-# Suricata will change directory to this one if provided
-# Default: "/"
-#daemon-directory: "/"
+ # Log TCP data after stream normalization
+ # 2 types: file or dir. File logs into a single logfile. Dir creates
+ # 2 files per TCP session and stores the raw TCP data into them.
+ # Using 'both' will enable both file and dir modes.
+ #
+ # Note: limited by stream.depth
+ - tcp-data:
+ enabled: no
+ type: file
+ filename: tcp-data.log
+
+ # Log HTTP body data after normalization, dechunking and unzipping.
+ # 2 types: file or dir. File logs into a single logfile. Dir creates
+ # 2 files per HTTP session and stores the normalized data into them.
+ # Using 'both' will enable both file and dir modes.
+ #
+ # Note: limited by the body limit settings
+ - http-body-data:
+ enabled: no
+ type: file
+ filename: http-data.log
-# Suricata core dump configuration. Limits the size of the core dump file to
-# approximately max-dump. The actual core dump size will be a multiple of the
-# page size. Core dumps that would be larger than max-dump are truncated. On
-# Linux, the actual core dump size may be a few pages larger than max-dump.
-# Setting max-dump to 0 disables core dumping.
-# Setting max-dump to 'unlimited' will give the full core dump file.
-# On 32-bit Linux, a max-dump value >= ULONG_MAX may cause the core dump size
-# to be 'unlimited'.
+ # Lua Output Support - execute lua script to generate alert and event
+ # output.
+ # Documented at:
+ # https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Lua_Output
+ - lua:
+ enabled: no
+ #scripts-dir: /etc/suricata/lua-output/
+ scripts:
+ # - script1.lua
-coredump:
- max-dump: unlimited
+# Logging configuration. This is not about logging IDS alerts, but
+# output about what Suricata is doing, like startup messages, errors, etc.
+logging:
+ # The default log level, can be overridden in an output section.
+ # Note that debug level logging will only be emitted if Suricata was
+ # compiled with the --enable-debug configure option.
+ #
+ # This value is overriden by the SC_LOG_LEVEL env var.
+ default-log-level: notice
+ # The default output format. Optional parameter, should default to
+ # something reasonable if not provided. Can be overriden in an
+ # output section. You can leave this out to get the default.
+ #
+ # This value is overriden by the SC_LOG_FORMAT env var.
+ #default-log-format: "[%i] %t - (%f:%l) <%d> (%n) -- "
+ # A regex to filter output. Can be overridden in an output section.
+ # Defaults to empty (no filter).
+ #
+ # This value is overriden by the SC_LOG_OP_FILTER env var.
+ default-output-filter:
+ # Define your logging outputs. If none are defined, or they are all
+ # disabled you will get the default - console output.
+ outputs:
+ - console:
+ enabled: yes
+ # type: json
+ - file:
+ enabled: yes
+ filename: @e_logdir@suricata.log
+ # type: json
+ - syslog:
+ enabled: no
+ facility: local5
+ format: "[%i] <%d> -- "
+ # type: json
+##
+## Step 4: configure capture settings
+##
-# Number of packets preallocated per thread. The default is 1024. A higher number
-# will make sure each CPU will be more easily kept busy, but may negatively
-# impact caching.
-#
-# If you are using the CUDA pattern matcher (mpm-algo: ac-cuda), different rules
-# apply. In that case try something like 60000 or more. This is because the CUDA
-# pattern matcher buffers and scans as many packets as possible in parallel.
-#max-pending-packets: 1024
+# af-packet support
+af-packet:
+ - interface: eth0
+ # Number of receive threads. "auto" uses the number of cores
+ #threads: auto
+ # Default clusterid. AF_PACKET will load balance packets based on flow.
+ cluster-id: 99
+ # Default AF_PACKET cluster type. AF_PACKET can load balance per flow or per hash.
+ # This is only supported for Linux kernel > 3.1
+ # possible value are:
+ # * cluster_round_robin: round robin load balancing
+ # * cluster_flow: all packets of a given flow are send to the same socket
+ # * cluster_cpu: all packets treated in kernel by a CPU are send to the same socket
+ # * cluster_qm: all packets linked by network card to a RSS queue are sent to the same
+ # socket. Requires at least Linux 3.14.
+ # * cluster_random: packets are sent randomly to sockets but with an equipartition.
+ # Requires at least Linux 3.14.
+ # * cluster_rollover: kernel rotates between sockets filling each socket before moving
+ # to the next. Requires at least Linux 3.10.
+ # Recommended modes are cluster_flow on most boxes and cluster_cpu or cluster_qm on system
+ # with capture card using RSS (require cpu affinity tuning and system irq tuning)
+ cluster-type: cluster_flow
+ # In some fragmentation case, the hash can not be computed. If "defrag" is set
+ # to yes, the kernel will do the needed defragmentation before sending the packets.
+ defrag: yes
+ # After Linux kernel 3.10 it is possible to activate the rollover option: if a socket is
+ # full then kernel will send the packet on the next socket with room available. This option
+ # can minimize packet drop and increase the treated bandwidth on single intensive flow.
+ #rollover: yes
+ # To use the ring feature of AF_PACKET, set 'use-mmap' to yes
+ #use-mmap: yes
+ # Lock memory map to avoid it goes to swap. Be careful that over suscribing could lock
+ # your system
+ #mmap-locked: yes
+ # Use tpacket_v3, capture mode, only active if user-mmap is true
+ tpacket-v3: yes
+ # Ring size will be computed with respect to max_pending_packets and number
+ # of threads. You can set manually the ring size in number of packets by setting
+ # the following value. If you are using flow cluster-type and have really network
+ # intensive single-flow you could want to set the ring-size independently of the number
+ # of threads:
+ #ring-size: 2048
+ # Block size is used by tpacket_v3 only. It should set to a value high enough to contain
+ # a decent number of packets. Size is in bytes so please consider your MTU. It should be
+ # a power of 2 and it must be multiple of page size (usually 4096).
+ #block-size: 32768
+ # tpacket_v3 block timeout: an open block is passed to userspace if it is not
+ # filled after block-timeout milliseconds.
+ #block-timeout: 10
+ # On busy system, this could help to set it to yes to recover from a packet drop
+ # phase. This will result in some packets (at max a ring flush) being non treated.
+ #use-emergency-flush: yes
+ # recv buffer size, increase value could improve performance
+ # buffer-size: 32768
+ # Set to yes to disable promiscuous mode
+ # disable-promisc: no
+ # Choose checksum verification mode for the interface. At the moment
+ # of the capture, some packets may be with an invalid checksum due to
+ # offloading to the network card of the checksum computation.
+ # Possible values are:
+ # - kernel: use indication sent by kernel for each packet (default)
+ # - yes: checksum validation is forced
+ # - no: checksum validation is disabled
+ # - auto: suricata uses a statistical approach to detect when
+ # checksum off-loading is used.
+ # Warning: 'checksum-validation' must be set to yes to have any validation
+ #checksum-checks: kernel
+ # BPF filter to apply to this interface. The pcap filter syntax apply here.
+ #bpf-filter: port 80 or udp
+ # You can use the following variables to activate AF_PACKET tap or IPS mode.
+ # If copy-mode is set to ips or tap, the traffic coming to the current
+ # interface will be copied to the copy-iface interface. If 'tap' is set, the
+ # copy is complete. If 'ips' is set, the packet matching a 'drop' action
+ # will not be copied.
+ #copy-mode: ips
+ #copy-iface: eth1
-# Runmode the engine should use. Please check --list-runmodes to get the available
-# runmodes for each packet acquisition method. Defaults to "autofp" (auto flow pinned
-# load balancing).
-#runmode: autofp
+ # Put default values here. These will be used for an interface that is not
+ # in the list above.
+ - interface: default
+ #threads: auto
+ #use-mmap: no
+ #rollover: yes
+ tpacket-v3: yes
-# Specifies the kind of flow load balancer used by the flow pinned autofp mode.
-#
-# Supported schedulers are:
-#
-# round-robin - Flows assigned to threads in a round robin fashion.
-# active-packets - Flows assigned to threads that have the lowest number of
-# unprocessed packets (default).
-# hash - Flow alloted usihng the address hash. More of a random
-# technique. Was the default in Suricata 1.2.1 and older.
-#
-#autofp-scheduler: active-packets
+pcap:
+ - interface: eth0
+ # On Linux, pcap will try to use mmaped capture and will use buffer-size
+ # as total of memory used by the ring. So set this to something bigger
+ # than 1% of your bandwidth.
+ #buffer-size: 16777216
+ #bpf-filter: "tcp and port 25"
+ # Choose checksum verification mode for the interface. At the moment
+ # of the capture, some packets may be with an invalid checksum due to
+ # offloading to the network card of the checksum computation.
+ # Possible values are:
+ # - yes: checksum validation is forced
+ # - no: checksum validation is disabled
+ # - auto: suricata uses a statistical approach to detect when
+ # checksum off-loading is used. (default)
+ # Warning: 'checksum-validation' must be set to yes to have any validation
+ #checksum-checks: auto
+ # With some accelerator cards using a modified libpcap (like myricom), you
+ # may want to have the same number of capture threads as the number of capture
+ # rings. In this case, set up the threads variable to N to start N threads
+ # listening on the same interface.
+ #threads: 16
+ # set to no to disable promiscuous mode:
+ #promisc: no
+ # set snaplen, if not set it defaults to MTU if MTU can be known
+ # via ioctl call and to full capture if not.
+ #snaplen: 1518
+ # Put default values here
+ - interface: default
+ #checksum-checks: auto
-# If suricata box is a router for the sniffed networks, set it to 'router'. If
-# it is a pure sniffing setup, set it to 'sniffer-only'.
-# If set to auto, the variable is internally switch to 'router' in IPS mode
-# and 'sniffer-only' in IDS mode.
-# This feature is currently only used by the reject* keywords.
-host-mode: auto
+pcap-file:
+ # Possible values are:
+ # - yes: checksum validation is forced
+ # - no: checksum validation is disabled
+ # - auto: suricata uses a statistical approach to detect when
+ # checksum off-loading is used. (default)
+ # Warning: 'checksum-validation' must be set to yes to have checksum tested
+ checksum-checks: auto
-# Preallocated size for packet. Default is 1514 which is the classical
-# size for pcap on ethernet. You should adjust this value to the highest
-# packet size (MTU + hardware header) on your system.
-#default-packet-size: 1514
+##
+## Step 5: App Layer Protocol Configuration
+##
-# The default logging directory. Any log or output file will be
-# placed here if its not specified with a full path name. This can be
-# overridden with the -l command line parameter.
-default-log-dir: @e_logdir@
+# Configure the app-layer parsers. The protocols section details each
+# protocol.
+#
+# The option "enabled" takes 3 values - "yes", "no", "detection-only".
+# "yes" enables both detection and the parser, "no" disables both, and
+# "detection-only" enables protocol detection only (parser disabled).
+app-layer:
+ protocols:
+ tls:
+ enabled: yes
+ detection-ports:
+ dp: 443
-# Unix command socket can be used to pass commands to suricata.
-# An external tool can then connect to get information from suricata
-# or trigger some modifications of the engine. Set enabled to yes
-# to activate the feature. You can use the filename variable to set
-# the file name of the socket.
-unix-command:
- enabled: no
- #filename: custom.socket
+ #no-reassemble: yes
+ dcerpc:
+ enabled: yes
+ ftp:
+ enabled: yes
+ ssh:
+ enabled: yes
+ smtp:
+ enabled: yes
+ # Configure SMTP-MIME Decoder
+ mime:
+ # Decode MIME messages from SMTP transactions
+ # (may be resource intensive)
+ # This field supercedes all others because it turns the entire
+ # process on or off
+ decode-mime: yes
-# global stats configuration
-stats:
- enabled: yes
- # The interval field (in seconds) controls at what interval
- # the loggers are invoked.
- interval: 8
+ # Decode MIME entity bodies (ie. base64, quoted-printable, etc.)
+ decode-base64: yes
+ decode-quoted-printable: yes
-# Configure the type of alert (and other) logging you would like.
-outputs:
+ # Maximum bytes per header data value stored in the data structure
+ # (default is 2000)
+ header-value-depth: 2000
- # a line based alerts log similar to Snort's fast.log
- - fast:
+ # Extract URLs and save in state data structure
+ extract-urls: yes
+ # Set to yes to compute the md5 of the mail body. You will then
+ # be able to journalize it.
+ body-md5: no
+ # Configure inspected-tracker for file_data keyword
+ inspected-tracker:
+ content-limit: 100000
+ content-inspect-min-size: 32768
+ content-inspect-window: 4096
+ imap:
+ enabled: detection-only
+ msn:
+ enabled: detection-only
+ smb:
enabled: yes
- filename: fast.log
- append: yes
- #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
+ detection-ports:
+ dp: 139
+ # Note: Modbus probe parser is minimalist due to the poor significant field
+ # Only Modbus message length (greater than Modbus header length)
+ # And Protocol ID (equal to 0) are checked in probing parser
+ # It is important to enable detection port and define Modbus port
+ # to avoid false positive
+ modbus:
+ # How many unreplied Modbus requests are considered a flood.
+ # If the limit is reached, app-layer-event:modbus.flooded; will match.
+ #request-flood: 500
- # Extensible Event Format (nicknamed EVE) event log in JSON format
- - eve-log:
- enabled: yes
- filetype: regular #regular|syslog|unix_dgram|unix_stream|redis
- filename: eve.json
- #prefix: "@cee: " # prefix to prepend to each log entry
- # the following are valid when type: syslog above
- #identity: "suricata"
- #facility: local5
- #level: Info ## possible levels: Emergency, Alert, Critical,
- ## Error, Warning, Notice, Info, Debug
- #redis:
- # server: 127.0.0.1
- # port: 6379
- # mode: list ## possible values: list (default), channel
- # key: suricata ## key or channel to use (default to suricata)
- # Redis pipelining set up. This will enable to only do a query every
- # 'batch-size' events. This should lower the latency induced by network
- # connection at the cost of some memory. There is no flushing implemented
- # so this setting as to be reserved to high traffic suricata.
- # pipelining:
- # enabled: yes ## set enable to yes to enable query pipelining
- # batch-size: 10 ## number of entry to keep in buffer
- types:
- - alert:
- # payload: yes # enable dumping payload in Base64
- # payload-buffer-size: 4kb # max size of payload buffer to output in eve-log
- # payload-printable: yes # enable dumping payload in printable (lossy) format
- # packet: yes # enable dumping of packet (without stream segments)
- # http: yes # enable dumping of http fields
- # tls: yes # enable dumping of tls fields
- # ssh: yes # enable dumping of ssh fields
- # smtp: yes # enable dumping of smtp fields
+ enabled: no
+ detection-ports:
+ dp: 502
+ # According to MODBUS Messaging on TCP/IP Implementation Guide V1.0b, it
+ # is recommended to keep the TCP connection opened with a remote device
+ # and not to open and close it for each MODBUS/TCP transaction. In that
+ # case, it is important to set the depth of the stream reassembling as
+ # unlimited (stream.reassembly.depth: 0)
+ # smb2 detection is disabled internally inside the engine.
+ #smb2:
+ # enabled: yes
+ dns:
+ # memcaps. Globally and per flow/state.
+ #global-memcap: 16mb
+ #state-memcap: 512kb
- # HTTP X-Forwarded-For support by adding an extra field or overwriting
- # the source or destination IP address (depending on flow direction)
- # with the one reported in the X-Forwarded-For HTTP header. This is
- # helpful when reviewing alerts for traffic that is being reverse
- # or forward proxied.
- xff:
- enabled: no
- # Two operation modes are available, "extra-data" and "overwrite".
- mode: extra-data
- # Two proxy deployments are supported, "reverse" and "forward". In
- # a "reverse" deployment the IP address used is the last one, in a
- # "forward" deployment the first IP address is used.
- deployment: reverse
- # Header name where the actual IP address will be reported, if more
- # than one IP address is present, the last IP address will be the
- # one taken into consideration.
- header: X-Forwarded-For
- - http:
- extended: yes # enable this for extended logging information
- # custom allows additional http fields to be included in eve-log
- # the example below adds three additional fields when uncommented
- #custom: [Accept-Encoding, Accept-Language, Authorization]
- - dns
- - tls:
- extended: yes # enable this for extended logging information
- - files:
- force-magic: no # force logging magic on all logged files
- force-md5: no # force logging of md5 checksums
- #- drop:
- # alerts: no # log alerts that caused drops
- - smtp:
- #extended: yes # enable this for extended logging information
- # this includes: bcc, message-id, subject, x_mailer, user-agent
- # custom fields logging from the list:
- # reply-to, bcc, message-id, subject, x-mailer, user-agent, received,
- # x-originating-ip, in-reply-to, references, importance, priority,
- # sensitivity, organization, content-md5, date
- #custom: [received, x-mailer, x-originating-ip, relays, reply-to, bcc]
- # output md5 of fields: body, subject
- # for the body you need to set app-layer.protocols.smtp.mime.body-md5
- # to yes
- #md5: [body, subject]
+ # How many unreplied DNS requests are considered a flood.
+ # If the limit is reached, app-layer-event:dns.flooded; will match.
+ #request-flood: 500
- - ssh
- - stats:
- totals: yes # stats for all threads merged together
- threads: no # per thread stats
- deltas: no # include delta values
- # bi-directional flows
- #- flow
- # uni-directional flows
- #- netflow
+ tcp:
+ enabled: yes
+ detection-ports:
+ dp: 53
+ udp:
+ enabled: yes
+ detection-ports:
+ dp: 53
+ http:
+ enabled: yes
+ # memcap: 64mb
- # alert output for use with Barnyard2
- - unified2-alert:
- enabled: no
- filename: unified2.alert
+ # default-config: Used when no server-config matches
+ # personality: List of personalities used by default
+ # request-body-limit: Limit reassembly of request body for inspection
+ # by http_client_body & pcre /P option.
+ # response-body-limit: Limit reassembly of response body for inspection
+ # by file_data, http_server_body & pcre /Q option.
+ # double-decode-path: Double decode path section of the URI
+ # double-decode-query: Double decode query section of the URI
+ #
+ # server-config: List of server configurations to use if address matches
+ # address: List of ip addresses or networks for this block
+ # personalitiy: List of personalities used by this block
+ # request-body-limit: Limit reassembly of request body for inspection
+ # by http_client_body & pcre /P option.
+ # response-body-limit: Limit reassembly of response body for inspection
+ # by file_data, http_server_body & pcre /Q option.
+ # double-decode-path: Double decode path section of the URI
+ # double-decode-query: Double decode query section of the URI
+ #
+ # uri-include-all: Include all parts of the URI. By default the
+ # 'scheme', username/password, hostname and port
+ # are excluded. Setting this option to true adds
+ # all of them to the normalized uri as inspected
+ # by http_uri, urilen, pcre with /U and the other
+ # keywords that inspect the normalized uri.
+ # Note that this does not affect http_raw_uri.
+ # Also, note that including all was the default in
+ # 1.4 and 2.0beta1.
+ #
+ # meta-field-limit: Hard size limit for request and response size
+ # limits. Applies to request line and headers,
+ # response line and headers. Does not apply to
+ # request or response bodies. Default is 18k.
+ # If this limit is reached an event is raised.
+ #
+ # Currently Available Personalities:
+ # Minimal, Generic, IDS (default), IIS_4_0, IIS_5_0, IIS_5_1, IIS_6_0,
+ # IIS_7_0, IIS_7_5, Apache_2
+ libhtp:
+ default-config:
+ personality: IDS
- # File size limit. Can be specified in kb, mb, gb. Just a number
- # is parsed as bytes.
- #limit: 32mb
+ # Can be specified in kb, mb, gb. Just a number indicates
+ # it's in bytes.
+ request-body-limit: 100kb
+ response-body-limit: 100kb
- # Sensor ID field of unified2 alerts.
- #sensor-id: 0
+ # inspection limits
+ request-body-minimal-inspect-size: 32kb
+ request-body-inspect-window: 4kb
+ response-body-minimal-inspect-size: 40kb
+ response-body-inspect-window: 16kb
- # Include payload of packets related to alerts. Defaults to true, set to
- # false if payload is not required.
- #payload: yes
+ # auto will use http-body-inline mode in IPS mode, yes or no set it statically
+ http-body-inline: auto
- # HTTP X-Forwarded-For support by adding the unified2 extra header or
- # overwriting the source or destination IP address (depending on flow
- # direction) with the one reported in the X-Forwarded-For HTTP header.
- # This is helpful when reviewing alerts for traffic that is being reverse
- # or forward proxied.
- xff:
- enabled: no
- # Two operation modes are available, "extra-data" and "overwrite". Note
- # that in the "overwrite" mode, if the reported IP address in the HTTP
- # X-Forwarded-For header is of a different version of the packet
- # received, it will fall-back to "extra-data" mode.
- mode: extra-data
- # Two proxy deployments are supported, "reverse" and "forward". In
- # a "reverse" deployment the IP address used is the last one, in a
- # "forward" deployment the first IP address is used.
- deployment: reverse
- # Header name where the actual IP address will be reported, if more
- # than one IP address is present, the last IP address will be the
- # one taken into consideration.
- header: X-Forwarded-For
+ # Take a random value for inspection sizes around the specified value.
+ # This lower the risk of some evasion technics but could lead
+ # detection change between runs. It is set to 'yes' by default.
+ #randomize-inspection-sizes: yes
+ # If randomize-inspection-sizes is active, the value of various
+ # inspection size will be choosen in the [1 - range%, 1 + range%]
+ # range
+ # Default value of randomize-inspection-range is 10.
+ #randomize-inspection-range: 10
+
+ # decoding
+ double-decode-path: no
+ double-decode-query: no
- # a line based log of HTTP requests (no alerts)
- - http-log:
- enabled: yes
- filename: http.log
- append: yes
- #extended: yes # enable this for extended logging information
- #custom: yes # enabled the custom logging format (defined by customformat)
- #customformat: "%{%D-%H:%M:%S}t.%z %{X-Forwarded-For}i %H %m %h %u %s %B %a:%p -> %A:%P"
- #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
+ server-config:
- # a line based log of TLS handshake parameters (no alerts)
- - tls-log:
- enabled: no # Log TLS connections.
- filename: tls.log # File to store TLS logs.
- append: yes
- #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
- #extended: yes # Log extended information like fingerprint
+ #- apache:
+ # address: [192.168.1.0/24, 127.0.0.0/8, "::1"]
+ # personality: Apache_2
+ # # Can be specified in kb, mb, gb. Just a number indicates
+ # # it's in bytes.
+ # request-body-limit: 4096
+ # response-body-limit: 4096
+ # double-decode-path: no
+ # double-decode-query: no
- # output module to store certificates chain to disk
- - tls-store:
- enabled: no
- #certs-log-dir: certs # directory to store the certificates files
+ #- iis7:
+ # address:
+ # - 192.168.0.0/24
+ # - 192.168.10.0/24
+ # personality: IIS_7_0
+ # # Can be specified in kb, mb, gb. Just a number indicates
+ # # it's in bytes.
+ # request-body-limit: 4096
+ # response-body-limit: 4096
+ # double-decode-path: no
+ # double-decode-query: no
- # a line based log of DNS requests and/or replies (no alerts)
- - dns-log:
- enabled: no
- filename: dns.log
- append: yes
- #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
- # Packet log... log packets in pcap format. 3 modes of operation: "normal"
- # "multi" and "sguil".
- #
- # In normal mode a pcap file "filename" is created in the default-log-dir,
- # or are as specified by "dir".
- # In multi mode, a file is created per thread. This will perform much
- # better, but will create multiple files where 'normal' would create one.
- # In multi mode the filename takes a few special variables:
- # - %n -- thread number
- # - %i -- thread id
- # - %t -- timestamp (secs or secs.usecs based on 'ts-format'
- # E.g. filename: pcap.%n.%t
- #
- # Note that it's possible to use directories, but the directories are not
- # created by Suricata. E.g. filename: pcaps/%n/log.%s will log into the
- # per thread directory.
- #
- # Also note that the limit and max-files settings are enforced per thread.
- # So the size limit when using 8 threads with 1000mb files and 2000 files
- # is: 8*1000*2000 ~ 16TiB.
- #
- # In Sguil mode "dir" indicates the base directory. In this base dir the
- # pcaps are created in th directory structure Sguil expects:
- #
- # $sguil-base-dir/YYYY-MM-DD/$filename.<timestamp>
- #
- # By default all packets are logged except:
- # - TCP streams beyond stream.reassembly.depth
- # - encrypted streams after the key exchange
- #
- - pcap-log:
- enabled: no
- filename: log.pcap
+##############################################################################
+##
+## Advanced settings below
+##
+##############################################################################
- # File size limit. Can be specified in kb, mb, gb. Just a number
- # is parsed as bytes.
- limit: 1000mb
+##
+## Run Options
+##
- # If set to a value will enable ring buffer mode. Will keep Maximum of "max-files" of size "limit"
- max-files: 2000
+# Run suricata as user and group.
+#run-as:
+# user: suri
+# group: suri
- mode: normal # normal, multi or sguil.
- #sguil-base-dir: /nsm_data/
- #ts-format: usec # sec or usec second format (default) is filename.sec usec is filename.sec.usec
- use-stream-depth: no #If set to "yes" packets seen after reaching stream inspection depth are ignored. "no" logs all packets
- honor-pass-rules: no # If set to "yes", flows in which a pass rule matched will stopped being logged.
+# Some logging module will use that name in event as identifier. The default
+# value is the hostname
+#sensor-name: suricata
- # a full alerts log containing much information for signature writers
- # or for investigating suspected false positives.
- - alert-debug:
- enabled: no
- filename: alert-debug.log
- append: yes
- #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
+# Default pid file.
+# Will use this file if no --pidfile in command options.
+#pid-file: @e_rundir@suricata.pid
- # alert output to prelude (http://www.prelude-technologies.com/) only
- # available if Suricata has been compiled with --enable-prelude
- - alert-prelude:
- enabled: no
- profile: suricata
- log-packet-content: no
- log-packet-header: yes
+# Daemon working directory
+# Suricata will change directory to this one if provided
+# Default: "/"
+#daemon-directory: "/"
- # Stats.log contains data from various counters of the suricata engine.
- - stats:
- enabled: yes
- filename: stats.log
- totals: yes # stats for all threads merged together
- threads: no # per thread stats
- #null-values: yes # print counters that have value 0
+# Suricata core dump configuration. Limits the size of the core dump file to
+# approximately max-dump. The actual core dump size will be a multiple of the
+# page size. Core dumps that would be larger than max-dump are truncated. On
+# Linux, the actual core dump size may be a few pages larger than max-dump.
+# Setting max-dump to 0 disables core dumping.
+# Setting max-dump to 'unlimited' will give the full core dump file.
+# On 32-bit Linux, a max-dump value >= ULONG_MAX may cause the core dump size
+# to be 'unlimited'.
- # a line based alerts log similar to fast.log into syslog
- - syslog:
- enabled: no
- # reported identity to syslog. If ommited the program name (usually
- # suricata) will be used.
- #identity: "suricata"
- facility: local5
- #level: Info ## possible levels: Emergency, Alert, Critical,
- ## Error, Warning, Notice, Info, Debug
+coredump:
+ max-dump: unlimited
- # a line based information for dropped packets in IPS mode
- - drop:
- enabled: no
- filename: drop.log
- append: yes
- #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
- # output module to store extracted files to disk
- #
- # The files are stored to the log-dir in a format "file.<id>" where <id> is
- # an incrementing number starting at 1. For each file "file.<id>" a meta
- # file "file.<id>.meta" is created.
- #
- # File extraction depends on a lot of things to be fully done:
- # - stream reassembly depth. For optimal results, set this to 0 (unlimited)
- # - http request / response body sizes. Again set to 0 for optimal results.
- # - rules that contain the "filestore" keyword.
- - file-store:
- enabled: no # set to yes to enable
- log-dir: files # directory to store the files
- force-magic: no # force logging magic on all stored files
- force-md5: no # force logging of md5 checksums
- force-filestore: no # force storing of all files
- #waldo: file.waldo # waldo file to store the file_id across runs
- # output module to log files tracked in a easily parsable json format
- - file-log:
- enabled: no
- filename: files-json.log
- append: yes
- #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
- force-magic: no # force logging magic on all logged files
- force-md5: no # force logging of md5 checksums
- # Log TCP data after stream normalization
- # 2 types: file or dir. File logs into a single logfile. Dir creates
- # 2 files per TCP session and stores the raw TCP data into them.
- # Using 'both' will enable both file and dir modes.
- #
- # Note: limited by stream.depth
- - tcp-data:
- enabled: no
- type: file
- filename: tcp-data.log
+# Number of packets preallocated per thread. The default is 1024. A higher number
+# will make sure each CPU will be more easily kept busy, but may negatively
+# impact caching.
+#
+# If you are using the CUDA pattern matcher (mpm-algo: ac-cuda), different rules
+# apply. In that case try something like 60000 or more. This is because the CUDA
+# pattern matcher buffers and scans as many packets as possible in parallel.
+#max-pending-packets: 1024
- # Log HTTP body data after normalization, dechunking and unzipping.
- # 2 types: file or dir. File logs into a single logfile. Dir creates
- # 2 files per HTTP session and stores the normalized data into them.
- # Using 'both' will enable both file and dir modes.
- #
- # Note: limited by the body limit settings
- - http-body-data:
- enabled: no
- type: file
- filename: http-data.log
+# Runmode the engine should use. Please check --list-runmodes to get the available
+# runmodes for each packet acquisition method. Defaults to "autofp" (auto flow pinned
+# load balancing).
+#runmode: autofp
- # Lua Output Support - execute lua script to generate alert and event
- # output.
- # Documented at:
- # https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Lua_Output
- - lua:
- enabled: no
- #scripts-dir: /etc/suricata/lua-output/
- scripts:
- # - script1.lua
+# Specifies the kind of flow load balancer used by the flow pinned autofp mode.
+#
+# Supported schedulers are:
+#
+# round-robin - Flows assigned to threads in a round robin fashion.
+# active-packets - Flows assigned to threads that have the lowest number of
+# unprocessed packets (default).
+# hash - Flow alloted usihng the address hash. More of a random
+# technique. Was the default in Suricata 1.2.1 and older.
+#
+#autofp-scheduler: active-packets
+
+# If suricata box is a router for the sniffed networks, set it to 'router'. If
+# it is a pure sniffing setup, set it to 'sniffer-only'.
+# If set to auto, the variable is internally switch to 'router' in IPS mode
+# and 'sniffer-only' in IDS mode.
+# This feature is currently only used by the reject* keywords.
+host-mode: auto
+
+# Preallocated size for packet. Default is 1514 which is the classical
+# size for pcap on ethernet. You should adjust this value to the highest
+# packet size (MTU + hardware header) on your system.
+#default-packet-size: 1514
+
+# Unix command socket can be used to pass commands to suricata.
+# An external tool can then connect to get information from suricata
+# or trigger some modifications of the engine. Set enabled to yes
+# to activate the feature. You can use the filename variable to set
+# the file name of the socket.
+unix-command:
+ enabled: no
+ #filename: custom.socket
# Magic file. The extension .mgc is added to the value here.
#magic-file: /usr/share/file/magic