5 ## IPFire specific configuration file - an untouched example configuration
6 ## can be found in suricata-example.yaml.
11 # Include HOME_NET declaration from external file.
12 include: /var/ipfire/suricata/suricata-homenet.yaml
14 # Include DNS_SERVERS declaration from external file.
15 include: /var/ipfire/suricata/suricata-dns-servers.yaml
19 HTTP_SERVERS: "$HOME_NET"
20 SMTP_SERVERS: "$HOME_NET"
21 SQL_SERVERS: "$HOME_NET"
22 TELNET_SERVERS: "$HOME_NET"
23 AIM_SERVERS: "$EXTERNAL_NET"
24 DC_SERVERS: "$HOME_NET"
25 DNP3_SERVER: "$HOME_NET"
26 DNP3_CLIENT: "$HOME_NET"
27 MODBUS_CLIENT: "$HOME_NET"
28 MODBUS_SERVER: "$HOME_NET"
29 ENIP_CLIENT: "$HOME_NET"
30 ENIP_SERVER: "$HOME_NET"
33 # Incluse HTTP_PORTS declaration from external file.
34 include: /var/ipfire/suricata/suricata-http-ports.yaml
36 SHELLCODE_PORTS: "!80"
41 FILE_DATA_PORTS: "[$HTTP_PORTS,110,143]"
48 ## Ruleset specific options.
50 default-rule-path: /var/lib/suricata
52 # Include enabled ruleset files from external file.
53 include: /var/ipfire/suricata/suricata-used-rulesfiles.yaml
55 classification-file: /usr/share/suricata/classification.config
56 reference-config-file: /usr/share/suricata/reference.config
57 threshold-file: /usr/share/suricata/threshold.config
62 default-log-dir: /var/log/suricata/
64 # Global stats configuration
67 # The interval field (in seconds) controls the interval at
68 # which stats are updated in the log.
70 # Add decode events to stats.
72 # Decoder event prefix in stats. Has been 'decoder' before, but that leads
73 # to missing events in the eve.stats records. See issue #2225.
74 #decoder-events-prefix: "decoder.event"
75 # Add stream events as stats.
78 # Plugins -- Experimental -- specify the filename for each plugin shared object
80 # - /path/to/plugin.so
82 # Configure the type of alert (and other) logging you would like.
84 # a line based alerts log similar to Snort's fast.log
89 #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
91 # Stats.log contains data from various counters of the suricata engine.
95 append: no # append to file (yes) or overwrite it (no)
96 totals: yes # stats for all threads merged together
97 threads: no # per thread stats
98 #null-values: yes # print counters that have value 0
100 # Extensible Event Format (nicknamed EVE) event log in JSON format
103 filetype: regular #regular|syslog|unix_dgram|unix_stream|redis
105 # Enable for multi-threaded eve.json output; output files are amended with
106 # an identifier, e.g., eve.9.json
108 #prefix: "@cee: " # prefix to prepend to each log entry
109 # the following are valid when type: syslog above
110 #identity: "suricata"
112 #level: Info ## possible levels: Emergency, Alert, Critical,
113 ## Error, Warning, Notice, Info, Debug
114 #ethernet: no # log ethernet header in events when available
118 # async: true ## if redis replies are read asynchronously
119 # mode: list ## possible values: list|lpush (default), rpush, channel|publish
120 # ## lpush and rpush are using a Redis list. "list" is an alias for lpush
121 # ## publish is using a Redis channel. "channel" is an alias for publish
122 # key: suricata ## key or channel to use (default to suricata)
123 # Redis pipelining set up. This will enable to only do a query every
124 # 'batch-size' events. This should lower the latency induced by network
125 # connection at the cost of some memory. There is no flushing implemented
126 # so this setting should be reserved to high traffic Suricata deployments.
128 # enabled: yes ## set enable to yes to enable query pipelining
129 # batch-size: 10 ## number of entries to keep in buffer
131 # Include top level metadata. Default yes.
134 # include the name of the input pcap file in pcap file processing mode
138 # Adds a 'community_id' field to EVE records. These are meant to give
139 # records a predictable flow ID that can be used to match records to
140 # output of other tools such as Zeek (Bro).
142 # Takes a 'seed' that needs to be same across sensors and tools
143 # to make the id less predictable.
145 # enable/disable the community id feature.
147 # Seed value for the ID output. Valid values are 0-65535.
150 # HTTP X-Forwarded-For support by adding an extra field or overwriting
151 # the source or destination IP address (depending on flow direction)
152 # with the one reported in the X-Forwarded-For HTTP header. This is
153 # helpful when reviewing alerts for traffic that is being reverse
154 # or forward proxied.
157 # Two operation modes are available: "extra-data" and "overwrite".
159 # Two proxy deployments are supported: "reverse" and "forward". In
160 # a "reverse" deployment the IP address used is the last one, in a
161 # "forward" deployment the first IP address is used.
163 # Header name where the actual IP address will be reported. If more
164 # than one IP address is present, the last IP address will be the
165 # one taken into consideration.
166 header: X-Forwarded-For
170 # payload: yes # enable dumping payload in Base64
171 # payload-buffer-size: 4kb # max size of payload buffer to output in eve-log
172 # payload-printable: yes # enable dumping payload in printable (lossy) format
173 # packet: yes # enable dumping of packet (without stream segments)
174 # metadata: no # enable inclusion of app layer metadata with alert. Default yes
175 # http-body: yes # Requires metadata; enable dumping of HTTP body in Base64
176 # http-body-printable: yes # Requires metadata; enable dumping of HTTP body in printable format
178 # Enable the logging of tagged packets for rules using the
181 # Enable logging the final action taken on a packet by the engine
182 # (e.g: the alert may have action 'allowed' but the verdict be
183 # 'drop' due to another alert. That's the engine's verdict)
187 # disabled by default as this is very verbose.
190 # Anomaly log records describe unexpected conditions such
191 # as truncated packets, packets with invalid IP/UDP/TCP
192 # length values, and other events that render the packet
193 # invalid for further processing or describe unexpected
194 # behavior on an established stream. Networks which
195 # experience high occurrences of anomalies may experience
196 # packet processing degradation.
198 # Anomalies are reported for the following:
199 # 1. Decode: Values and conditions that are detected while
200 # decoding individual packets. This includes invalid or
201 # unexpected values for low-level protocol lengths as well
202 # as stream related events (TCP 3-way handshake issues,
203 # unexpected sequence number, etc).
204 # 2. Stream: This includes stream related events (TCP
205 # 3-way handshake issues, unexpected sequence number,
207 # 3. Application layer: These denote application layer
208 # specific conditions that are unexpected, invalid or are
209 # unexpected given the application monitoring state.
211 # By default, anomaly logging is enabled. When anomaly
212 # logging is enabled, applayer anomaly reporting is
216 # Choose one or more types of anomaly logging and whether to enable
217 # logging of the packet header for packet anomalies.
224 extended: yes # enable this for extended logging information
225 # custom allows additional HTTP fields to be included in eve-log.
226 # the example below adds three additional fields when uncommented
227 #custom: [Accept-Encoding, Accept-Language, Authorization]
228 # set this value to one and only one from {both, request, response}
229 # to dump all HTTP headers for every HTTP request and/or response
230 # dump-all-headers: none
232 # This configuration uses the new DNS logging format,
233 # the old configuration is still available:
234 # https://docs.suricata.io/en/latest/output/eve/eve-json-output.html#dns-v1-format
236 # As of Suricata 5.0, version 2 of the eve dns output
237 # format is the default.
240 # Enable/disable this logger. Default: enabled.
243 # Control logging of requests and responses:
244 # - requests: enable logging of DNS queries
245 # - responses: enable logging of DNS answers
246 # By default both requests and responses are logged.
250 # Format of answer logging:
251 # - detailed: array item per answer
252 # - grouped: answers aggregated by type
254 #formats: [detailed, grouped]
256 # DNS record types to log, based on the query type.
258 #types: [a, aaaa, cname, mx, ns, ptr, txt]
260 extended: yes # enable this for extended logging information
261 # output TLS transaction where the session is resumed using a
263 #session-resumption: no
264 # custom controls which TLS fields that are included in eve-log
265 #custom: [subject, issuer, session_resumed, serial, fingerprint, sni, version, not_before, not_after, certificate, chain, ja3, ja3s]
267 force-magic: no # force logging magic on all logged files
268 # force logging of checksums, available hash functions are md5,
272 # alerts: yes # log alerts that caused drops
273 # flows: all # start or all: 'start' logs only a single drop
274 # # per flow direction. All logs each dropped pkt.
275 # Enable logging the final action taken on a packet by the engine
276 # (will show more information in case of a drop caused by 'reject')
279 #extended: yes # enable this for extended logging information
280 # this includes: bcc, message-id, subject, x_mailer, user-agent
281 # custom fields logging from the list:
282 # reply-to, bcc, message-id, subject, x-mailer, user-agent, received,
283 # x-originating-ip, in-reply-to, references, importance, priority,
284 # sensitivity, organization, content-md5, date
285 #custom: [received, x-mailer, x-originating-ip, relays, reply-to, bcc]
286 # output md5 of fields: body, subject
287 # for the body you need to set app-layer.protocols.smtp.mime.body-md5
289 #md5: [body, subject]
307 # When extended mode is on, all DHCP messages are logged
308 # with full detail. When extended mode is off (the
309 # default), just enough information to map a MAC address
310 # to an IP address is logged.
314 # passwords: yes # enable output of passwords
318 # passwords: yes # enable output of passwords. Disabled by default
320 totals: yes # stats for all threads merged together
321 threads: no # per thread stats
322 deltas: no # include delta values
323 # bi-directional flows
325 # uni-directional flows
328 # Metadata event type. Triggered whenever a pktvar is saved
329 # and will include the pktvars, flowvars, flowbits and
333 # EXPERIMENTAL per packet output giving TCP state tracking details
334 # including internal state, flags, etc.
335 # This output is experimental, meant for debugging and subject to
336 # change in both config and output without any notice.
338 # all: false # log all TCP packets
339 # event-set: false # log packets that have a decoder/stream event
340 # state-update: false # log packets triggering a TCP state update
341 # spurious-retransmission: false # log spurious retransmission packets
344 # The default log level: can be overridden in an output section.
345 # Note that debug level logging will only be emitted if Suricata was
346 # compiled with the --enable-debug configure option.
348 # This value is overridden by the SC_LOG_LEVEL env var.
349 default-log-level: Info
351 # The default output format. Optional parameter, should default to
352 # something reasonable if not provided. Can be overridden in an
353 # output section. You can leave this out to get the default.
355 # This console log format value can be overridden by the SC_LOG_FORMAT env var.
356 #default-log-format: "%D: %S: %M"
358 # For the pre-7.0 log format use:
359 #default-log-format: "[%i] %t [%S] - (%f:%l) <%d> (%n) -- "
361 # A regex to filter output. Can be overridden in an output section.
362 # Defaults to empty (no filter).
364 # This value is overridden by the SC_LOG_OP_FILTER env var.
365 default-output-filter:
367 # Requires libunwind to be available when Suricata is configured and built.
368 # If a signal unexpectedly terminates Suricata, displays a brief diagnostic
369 # message with the offending stacktrace if enabled.
370 #stacktrace-on-signal: on
372 # Define your logging outputs. If none are defined, or they are all
373 # disabled you will get the default: console output.
381 filename: /var/log/suricata/suricata.log
382 # format: "[%i - %m] %z %d: %S: %M"
388 #format: "[%i] <%d> -- "
392 ## Netfilter configuration
397 repeat-mark: 2147483648
398 repeat-mask: 2147483648
399 bypass-mark: 1073741824
400 bypass-mask: 1073741824
406 ## Step 5: App Layer Protocol Configuration
409 # Configure the app-layer parsers.
411 # The error-policy setting applies to all app-layer parsers. Values can be
412 # "drop-flow", "pass-flow", "bypass", "drop-packet", "pass-packet", "reject" or
413 # "ignore" (the default).
415 # The protocol's section details each protocol.
417 # The option "enabled" takes 3 values - "yes", "no", "detection-only".
418 # "yes" enables both detection and the parser, "no" disables both, and
419 # "detection-only" enables protocol detection only (parser disabled).
421 # error-policy: ignore
428 dp: 5900, 5901, 5902, 5903, 5904, 5905, 5906, 5907, 5908, 5909
431 # max-msg-length: 1mb
432 # subscribe-topic-match-limit: 100
433 # unsubscribe-topic-match-limit: 100
434 # Maximum number of live MQTT transactions per flow
447 dp: "[443,444,465,853,993,995]"
449 # Generate JA3 fingerprint from client hello. If not specified it
450 # will be disabled by default, but enabled if rules require it.
451 ja3-fingerprints: auto
453 # What to do when the encrypted communications start:
454 # - default: keep tracking TLS session, check for protocol anomalies,
455 # inspect tls_* keywords. Disables inspection of unmodified
456 # 'content' signatures.
457 # - bypass: stop processing this flow as much as possible. No further
458 # TLS parsing and inspection. Offload flow bypass to kernel
459 # or hardware if possible.
460 # - full: keep tracking and inspection as normal. Unmodified content
461 # keyword signatures are inspected as well.
463 # For best performance, select 'bypass'.
465 encryption-handling: bypass
469 # Stream reassembly size for PostgreSQL. By default, track it completely.
471 # Maximum number of live PostgreSQL transactions per flow
475 # Maximum number of live DCERPC transactions per flow
487 # Maximum number of live HTTP2 streams in a flow
489 # Maximum headers table size
490 #max-table-size: 65536
491 # Maximum reassembly size for header + continuation frames
492 #max-reassembly-size: 102400
496 # Maximum number of live SMTP transactions per flow
498 # Configure SMTP-MIME Decoder
500 # Decode MIME messages from SMTP transactions
501 # (may be resource intensive)
502 # This field supersedes all others because it turns the entire
506 # Decode MIME entity bodies (ie. Base64, quoted-printable, etc.)
508 decode-quoted-printable: yes
510 # Maximum bytes per header data value stored in the data structure
512 header-value-depth: 2000
514 # Extract URLs and save in state data structure
516 # Scheme of URLs to extract
517 # (default is [http])
518 #extract-urls-schemes: [http, https, ftp, mailto]
519 # Log the scheme of URLs that are extracted
522 # Set to yes to compute the md5 of the mail body. You will then
523 # be able to journalize it.
525 # Configure inspected-tracker for file_data keyword
527 content-limit: 100000
528 content-inspect-min-size: 32768
529 content-inspect-window: 4096
536 # Maximum number of live SMB transactions per flow
539 # Stream reassembly size for SMB streams. By default track it completely.
548 # memcaps. Globally and per flow/state.
552 # How many unreplied DNS requests are considered a flood.
553 # If the limit is reached, app-layer-event:dns.flooded; will match.
568 # Byte Range Containers default settings
573 # memcap: Maximum memory capacity for HTTP
574 # Default is unlimited, values can be 64mb, e.g.
576 # default-config: Used when no server-config matches
577 # personality: List of personalities used by default
578 # request-body-limit: Limit reassembly of request body for inspection
579 # by http_client_body & pcre /P option.
580 # response-body-limit: Limit reassembly of response body for inspection
581 # by file_data, http_server_body & pcre /Q option.
583 # For advanced options, see the user guide
586 # server-config: List of server configurations to use if address matches
587 # address: List of IP addresses or networks for this block
588 # personality: List of personalities used by this block
590 # Then, all the fields from default-config can be overloaded
592 # Currently Available Personalities:
593 # Minimal, Generic, IDS (default), IIS_4_0, IIS_5_0, IIS_5_1, IIS_6_0,
594 # IIS_7_0, IIS_7_5, Apache_2
599 # Can be specified in kb, mb, gb. Just a number indicates
601 request-body-limit: 100kb
602 response-body-limit: 100kb
605 request-body-minimal-inspect-size: 32kb
606 request-body-inspect-window: 4kb
607 response-body-minimal-inspect-size: 40kb
608 response-body-inspect-window: 16kb
610 # response body decompression (0 disables)
611 response-body-decompress-layer-limit: 2
613 # auto will use http-body-inline mode in IPS mode, yes or no set it statically
614 http-body-inline: auto
616 # Decompress SWF files. Disabled by default.
617 # Two types: 'deflate', 'lzma', 'both' will decompress deflate and lzma
619 # Specifies the maximum amount of data to decompress,
620 # set 0 for unlimited.
622 # Specifies the maximum amount of decompressed data to obtain,
623 # set 0 for unlimited.
627 compress-depth: 100kb
628 decompress-depth: 100kb
630 # Use a random value for inspection sizes around the specified value.
631 # This lowers the risk of some evasion techniques but could lead
632 # to detection change between runs. It is set to 'yes' by default.
633 #randomize-inspection-sizes: yes
634 # If "randomize-inspection-sizes" is active, the value of various
635 # inspection size will be chosen from the [1 - range%, 1 + range%]
637 # Default value of "randomize-inspection-range" is 10.
638 #randomize-inspection-range: 10
641 double-decode-path: no
642 double-decode-query: no
644 # Can enable LZMA decompression
646 # Memory limit usage for LZMA decompression dictionary
647 # Data is decompressed until dictionary reaches this size
649 # Maximum decompressed size with a compression ratio
650 # above 2048 (only LZMA can reach this ratio, deflate cannot)
651 #compression-bomb-limit: 1mb
652 # Maximum time spent decompressing a single transaction in usec
653 #decompression-time-limit: 100000
654 # Maximum number of live transactions per flow
660 # address: [192.168.1.0/24, 127.0.0.0/8, "::1"]
661 # personality: Apache_2
662 # # Can be specified in kb, mb, gb. Just a number indicates
664 # request-body-limit: 4096
665 # response-body-limit: 4096
666 # double-decode-path: no
667 # double-decode-query: no
673 # personality: IIS_7_0
674 # # Can be specified in kb, mb, gb. Just a number indicates
676 # request-body-limit: 4096
677 # response-body-limit: 4096
678 # double-decode-path: no
679 # double-decode-query: no
681 # Note: Modbus probe parser is minimalist due to the limited usage in the field.
682 # Only Modbus message length (greater than Modbus header length)
683 # and protocol ID (equal to 0) are checked in probing parser
684 # It is important to enable detection port and define Modbus port
685 # to avoid false positives
687 # How many unanswered Modbus requests are considered a flood.
688 # If the limit is reached, the app-layer-event:modbus.flooded; will match.
694 # According to MODBUS Messaging on TCP/IP Implementation Guide V1.0b, it
695 # is recommended to keep the TCP connection opened with a remote device
696 # and not to open and close it for each MODBUS/TCP transaction. In that
697 # case, it is important to set the depth of the stream reassembling as
698 # unlimited (stream.reassembly.depth: 0)
700 # Stream reassembly size for modbus. By default track it completely.
709 # SCADA EtherNet/IP and CIP protocol support
728 # Limit for the maximum number of asn1 frames to decode (default 256)
731 # Datasets default settings
733 # Default fallback memcap and hashsize values for datasets in case these
734 # were not explicitly defined.
740 # Set to true to allow absolute filenames and filenames that use
741 # ".." components to reference parent directories in rules that specify
743 #allow-absolute-filenames: false
745 # Allow datasets in rules write access for "save" and
746 # "state". This is enabled by default, however write access is
747 # limited to the data directory.
750 ##############################################################################
752 ## Advanced settings below
754 ##############################################################################
760 # Run Suricata with a specific user-id and group-id:
766 # if true, prevents process creation from Suricata by calling
767 # setrlimit(RLIMIT_NPROC, 0)
769 # Use landlock security module under Linux
775 # /usr and /etc folders are added to read list to allow
776 # file magic to be used.
778 - /usr/share/misc/magic.mgc
779 - /usr/share/suricata
780 - /var/ipfire/suricata
784 # Allow Lua rules. Disabled by default.
787 # Some logging modules will use that name in event as identifier. The default
788 # value is the hostname
789 #sensor-name: suricata
791 # Default location of the pid file. The pid file is only used in
792 # daemon mode (start Suricata with -D). If not running in daemon mode
793 # the --pidfile command line option must be used to create a pid file.
794 pid-file: /var/run/suricata.pid
796 # Daemon working directory
797 # Suricata will change directory to this one if provided
799 #daemon-directory: "/"
802 # Suricata will use this umask if it is provided. By default it will use the
803 # umask passed on by the shell.
806 # Suricata core dump configuration. Limits the size of the core dump file to
807 # approximately max-dump. The actual core dump size will be a multiple of the
808 # page size. Core dumps that would be larger than max-dump are truncated. On
809 # Linux, the actual core dump size may be a few pages larger than max-dump.
810 # Setting max-dump to 0 disables core dumping.
811 # Setting max-dump to 'unlimited' will give the full core dump file.
812 # On 32-bit Linux, a max-dump value >= ULONG_MAX may cause the core dump size
818 # If the Suricata box is a router for the sniffed networks, set it to 'router'. If
819 # it is a pure sniffing setup, set it to 'sniffer-only'.
820 # If set to auto, the variable is internally switched to 'router' in IPS mode
821 # and 'sniffer-only' in IDS mode.
822 # This feature is currently only used by the reject* keywords.
825 # Number of packets preallocated per thread. The default is 1024. A higher number
826 # will make sure each CPU will be more easily kept busy, but may negatively
828 #max-pending-packets: 1024
830 # Runmode the engine should use. Please check --list-runmodes to get the available
831 # runmodes for each packet acquisition method. Default depends on selected capture
832 # method. 'workers' generally gives best performance.
835 # Specifies the kind of flow load balancer used by the flow pinned autofp mode.
837 # Supported schedulers are:
839 # hash - Flow assigned to threads using the 5-7 tuple hash.
840 # ippair - Flow assigned to threads using addresses only.
841 # ftp-hash - Flow assigned to threads using the hash, except for FTP, so that
842 # ftp-data flows will be handled by the same thread
844 #autofp-scheduler: hash
846 # Preallocated size for each packet. Default is 1514 which is the classical
847 # size for pcap on Ethernet. You should adjust this value to the highest
848 # packet size (MTU + hardware header) on your system.
849 #default-packet-size: 1514
851 # Unix command socket that can be used to pass commands to Suricata.
852 # An external tool can then connect to get information from Suricata
853 # or trigger some modifications of the engine. Set enabled to yes
854 # to activate the feature. In auto mode, the feature will only be
855 # activated in live capture mode. You can use the filename variable to set
856 # the file name of the socket.
859 #filename: custom.socket
862 magic-file: /usr/share/misc/magic.mgc
868 ## Detection settings
871 # Set the order of alerts based on actions
872 # The default order is pass, drop, reject, alert
879 # Define maximum number of possible alerts that can be triggered for the same
880 # packet. Default is 15
881 #packet-alert-max: 15
885 # Define a common behavior for all exception policies.
886 # In IPS mode, the default is drop-flow. For cases when that's not possible, the
887 # engine will fall to drop-packet. To fallback to old behavior (setting each of
888 # them individually, or ignoring all), set this to ignore.
889 # All values available for exception policies can be used, and there is one
890 # extra option: auto - which means drop-flow or drop-packet (as explained above)
891 # in IPS mode, and ignore in IDS mode. Exception policy values are: drop-packet,
892 # drop-flow, reject, bypass, pass-packet, pass-flow, ignore (disable).
893 exception-policy: pass-packet
895 # When run with the option --engine-analysis, the engine will read each of
896 # the parameters below, and print reports for each of the enabled sections
897 # and exit. The reports are printed to a file in the default log dir
898 # given by the parameter "default-log-dir", with engine reporting
899 # subsection below printing reports in its own report file.
901 # enables printing reports for fast-pattern for every rule.
902 rules-fast-pattern: yes
903 # enables printing reports for each rule
906 #recursion and match limits for PCRE where supported
909 match-limit-recursion: 1500
912 ## Advanced Traffic Tracking and Reconstruction Settings
915 # Host specific policies for defragmentation and TCP stream
916 # reassembly. The host OS lookup is done using a radix tree, just
917 # like a routing table so the most specific entry matches.
919 # Make the default policy windows.
936 # The memcap-policy value can be "drop-packet", "pass-packet", "reject" or
937 # "ignore" (which is the default).
940 # memcap-policy: ignore
942 trackers: 65535 # number of defragmented flows to follow
943 max-frags: 65535 # number of fragments to keep (higher than trackers)
948 # By default, the reserved memory (memcap) for flows is 32MB. This is the limit
949 # for flow allocation inside the engine. You can change this value to allow
950 # more memory usage for flows.
951 # The hash-size determines the size of the hash used to identify flows inside
952 # the engine, and by default the value is 65536.
953 # At startup, the engine can preallocate a number of flows, to get better
954 # performance. The number of flows preallocated is 10000 by default.
955 # emergency-recovery is the percentage of flows that the engine needs to
956 # prune before clearing the emergency state. The emergency state is activated
957 # when the memcap limit is reached, allowing new flows to be created, but
958 # pruning them with the emergency timeouts (they are defined below).
959 # If the memcap is reached, the engine will try to prune flows
960 # with the default timeouts. If it doesn't find a flow to prune, it will set
961 # the emergency bit and it will try again with more aggressive timeouts.
962 # If that doesn't work, then it will try to kill the oldest flows using
963 # last time seen flows.
964 # The memcap can be specified in kb, mb, gb. Just a number indicates it's
966 # The memcap-policy can be "drop-packet", "pass-packet", "reject" or "ignore"
967 # (which is the default).
971 #memcap-policy: ignore
974 emergency-recovery: 30
975 #managers: 1 # default to one flow manager
976 #recyclers: 1 # default to one flow recycler thread
978 # This option controls the use of VLAN ids in the flow (and defrag)
979 # hashing. Normally this should be enabled, but in some (broken)
980 # setups where both sides of a flow are not tagged with the same VLAN
981 # tag, we can ignore the VLAN id's in the flow hashing.
983 use-for-tracking: true
985 # This option controls the use of livedev ids in the flow (and defrag)
986 # hashing. This is enabled by default and should be disabled if
987 # multiple live devices are used to capture traffic from the same network
989 use-for-tracking: true
991 # Specific timeouts for flows. Here you can specify the timeouts that the
992 # active flows will wait to transit from the current state to another, on each
993 # protocol. The value of "new" determines the seconds to wait after a handshake or
994 # stream startup before the engine frees the data of that flow it doesn't
995 # change the state to established (usually if we don't receive more packets
996 # of that flow). The value of "established" is the amount of
997 # seconds that the engine will wait to free the flow if that time elapses
998 # without receiving new packets or closing the connection. "closed" is the
999 # amount of time to wait after a flow is closed (usually zero). "bypassed"
1000 # timeout controls locally bypassed flows. For these flows we don't do any other
1001 # tracking. If no packets have been seen after this timeout, the flow is discarded.
1003 # There's an emergency mode that will become active under attack circumstances,
1004 # making the engine to check flow status faster. This configuration variables
1005 # use the prefix "emergency-" and work similar as the normal ones.
1006 # Some timeouts doesn't apply to all the protocols, like "closed", for udp and
1017 emergency-established: 100
1019 emergency-bypassed: 50
1026 emergency-established: 100
1027 emergency-closed: 10
1028 emergency-bypassed: 50
1034 emergency-established: 100
1035 emergency-bypassed: 50
1041 emergency-established: 100
1042 emergency-bypassed: 50
1044 # Stream engine settings. Here the TCP stream tracking and reassembly
1045 # engine is configured.
1048 # memcap: 64mb # Can be specified in kb, mb, gb. Just a
1049 # # number indicates it's in bytes.
1050 # memcap-policy: ignore # Can be "drop-flow", "pass-flow", "bypass",
1051 # # "drop-packet", "pass-packet", "reject" or
1052 # # "ignore" default is "ignore"
1053 # checksum-validation: yes # To validate the checksum of received
1054 # # packet. If csum validation is specified as
1055 # # "yes", then packets with invalid csum values will not
1056 # # be processed by the engine stream/app layer.
1057 # # Warning: locally generated traffic can be
1058 # # generated without checksum due to hardware offload
1059 # # of checksum. You can control the handling of checksum
1060 # # on a per-interface basis via the 'checksum-checks'
1062 # prealloc-sessions: 2048 # 2k sessions prealloc'd per stream thread
1063 # midstream: false # don't allow midstream session pickups
1064 # midstream-policy: ignore # Can be "drop-flow", "pass-flow", "bypass",
1065 # # "drop-packet", "pass-packet", "reject" or
1066 # # "ignore" default is "ignore"
1067 # async-oneside: false # don't enable async stream handling
1068 # inline: no # stream inline mode
1069 # drop-invalid: yes # in inline mode, drop packets that are invalid with regards to streaming engine
1070 # max-syn-queued: 10 # Max different SYNs to queue
1071 # max-synack-queued: 5 # Max different SYN/ACKs to queue
1072 # bypass: no # Bypass packets when stream.reassembly.depth is reached.
1073 # # Warning: first side to reach this triggers
1075 # liberal-timestamps: false # Treat all timestamps as if the Linux policy applies. This
1076 # # means it's slightly more permissive. Enabled by default.
1079 # memcap: 256mb # Can be specified in kb, mb, gb. Just a number
1080 # # indicates it's in bytes.
1081 # memcap-policy: ignore # Can be "drop-flow", "pass-flow", "bypass",
1082 # # "drop-packet", "pass-packet", "reject" or
1083 # # "ignore" default is "ignore"
1084 # depth: 1mb # Can be specified in kb, mb, gb. Just a number
1085 # # indicates it's in bytes.
1086 # toserver-chunk-size: 2560 # inspect raw stream in chunks of at least
1087 # # this size. Can be specified in kb, mb,
1088 # # gb. Just a number indicates it's in bytes.
1089 # toclient-chunk-size: 2560 # inspect raw stream in chunks of at least
1090 # # this size. Can be specified in kb, mb,
1091 # # gb. Just a number indicates it's in bytes.
1092 # randomize-chunk-size: yes # Take a random value for chunk size around the specified value.
1093 # # This lowers the risk of some evasion techniques but could lead
1094 # # to detection change between runs. It is set to 'yes' by default.
1095 # randomize-chunk-range: 10 # If randomize-chunk-size is active, the value of chunk-size is
1096 # # a random value between (1 - randomize-chunk-range/100)*toserver-chunk-size
1097 # # and (1 + randomize-chunk-range/100)*toserver-chunk-size and the same
1098 # # calculation for toclient-chunk-size.
1099 # # Default value of randomize-chunk-range is 10.
1101 # raw: yes # 'Raw' reassembly enabled or disabled.
1102 # # raw is for content inspection by detection
1105 # segment-prealloc: 2048 # number of segments preallocated per thread
1107 # check-overlap-different-data: true|false
1108 # # check if a segment contains different data
1109 # # than what we've already seen for that
1110 # # position in the stream.
1111 # # This is enabled automatically if inline mode
1112 # # is used or when stream-event:reassembly_overlap_different_data;
1113 # # is used in a rule.
1117 prealloc-sessions: 4096
1118 #memcap-policy: ignore
1119 checksum-validation: yes # reject incorrect csums
1121 midstream-policy: pass-flow
1122 inline: auto # auto will use inline mode in IPS mode, yes or no set it statically
1123 bypass: yes # Bypass packets when stream.reassembly.depth is reached.
1126 #memcap-policy: ignore
1127 depth: 1mb # reassemble 1mb into a stream
1128 toserver-chunk-size: 2560
1129 toclient-chunk-size: 2560
1130 randomize-chunk-size: yes
1131 #randomize-chunk-range: 10
1133 segment-prealloc: 2048
1134 check-overlap-different-data: true
1138 # Host table is used by the tagging and per host thresholding subsystems.
1147 # Used by xbits 'ippair' tracking.
1157 # Teredo decoder is known to not be completely accurate
1158 # as it will sometimes detect non-teredo as teredo.
1161 # ports to look for Teredo. Max 4 ports. If no ports are given, or
1162 # the value is set to 'any', Teredo detection runs on _all_ UDP packets.
1163 ports: $TEREDO_PORTS # syntax: '[3544, 1234]' or '3533' or 'any'.
1165 # VXLAN decoder is assigned to up to 4 UDP ports. By default only the
1166 # IANA assigned port 4789 is enabled.
1169 ports: $VXLAN_PORTS # syntax: '[8472, 4789]' or '4789'.
1171 # Geneve decoder is assigned to up to 4 UDP ports. By default only the
1172 # IANA assigned port 6081 is enabled.
1175 ports: $GENEVE_PORTS # syntax: '[6081, 1234]' or '6081'.
1177 # maximum number of decoder layers for a packet
1181 ## Performance tuning and profiling
1184 # The detection engine builds internal groups of signatures. The engine
1185 # allows us to specify the profile to use for them, to manage memory in an
1186 # efficient way keeping good performance. For the profile keyword you
1187 # can use the words "low", "medium", "high" or "custom". If you use custom,
1188 # make sure to define the values in the "custom-values" section.
1189 # Usually you would prefer medium/high/low.
1191 # "sgh mpm-context", indicates how the staging should allot mpm contexts for
1192 # the signature groups. "single" indicates the use of a single context for
1193 # all the signature group heads. "full" indicates a mpm-context for each
1194 # group head. "auto" lets the engine decide the distribution of contexts
1195 # based on the information the engine gathers on the patterns from each
1198 # The option inspection-recursion-limit is used to limit the recursive calls
1199 # in the content inspection code. For certain payload-sig combinations, we
1200 # might end up taking too much time in the content inspection code.
1201 # If the argument specified is 0, the engine uses an internally defined
1202 # default limit. When a value is not specified, there are no limits on the recursion.
1208 sgh-mpm-context: auto
1209 inspection-recursion-limit: 3000
1210 # If set to yes, the loading of signatures will be made after the capture
1211 # is started. This will limit the downtime in IPS mode.
1215 # default prefiltering setting. "mpm" only creates MPM/fast_pattern
1216 # engines. "auto" also sets up prefilter engines for other keywords.
1217 # Use --list-keywords=all to see which keywords support prefiltering.
1220 # the grouping values above control how many groups are created per
1221 # direction. Port whitelisting forces that port to get its own group.
1222 # Very common ports will benefit, as well as ports with many expensive
1225 #tcp-whitelist: 53, 80, 139, 443, 445, 1433, 3306, 3389, 6666, 6667, 8080
1226 #udp-whitelist: 53, 135, 5060
1229 # Log the rules that made it past the prefilter stage, per packet
1230 # default is off. The threshold setting determines how many rules
1231 # must have made it past pre-filter for that rule to trigger the
1233 #inspect-logging-threshold: 200
1236 include-rules: false # very verbose
1237 include-mpm-stats: false
1239 # Select the multi pattern algorithm you want to run for scan/search the
1242 # The supported algorithms are:
1243 # "ac" - Aho-Corasick, default implementation
1244 # "ac-bs" - Aho-Corasick, reduced memory implementation
1245 # "ac-ks" - Aho-Corasick, "Ken Steele" variant
1246 # "hs" - Hyperscan, available when built with Hyperscan support
1248 # The default mpm-algo value of "auto" will use "hs" if Hyperscan is
1249 # available, "ac" otherwise.
1251 # The mpm you choose also decides the distribution of mpm contexts for
1252 # signature groups, specified by the conf - "detect.sgh-mpm-context".
1253 # Selecting "ac" as the mpm would require "detect.sgh-mpm-context"
1254 # to be set to "single", because of ac's memory requirements, unless the
1255 # ruleset is small enough to fit in memory, in which case one can
1256 # use "full" with "ac". The rest of the mpms can be run in "full" mode.
1260 # Select the matching algorithm you want to use for single-pattern searches.
1262 # Supported algorithms are "bm" (Boyer-Moore) and "hs" (Hyperscan, only
1263 # available if Suricata has been built with Hyperscan support).
1265 # The default of "auto" will use "hs" if available, otherwise "bm".
1269 # Suricata is multi-threaded. Here the threading can be influenced.
1271 set-cpu-affinity: no
1272 # Tune cpu affinity of threads. Each family of threads can be bound
1275 # These 2 apply to the all runmodes:
1276 # management-cpu-set is used for flow timeout handling, counters
1277 # worker-cpu-set is used for 'worker' threads
1279 # Additionally, for autofp these apply:
1280 # receive-cpu-set is used for capture threads
1281 # verdict-cpu-set is used for IPS verdict threads
1284 - management-cpu-set:
1285 cpu: [ 0 ] # include only these CPUs in affinity settings
1287 cpu: [ 0 ] # include only these CPUs in affinity settings
1291 # Use explicitly 3 threads and don't compute number by using
1292 # detect-thread-ratio variable:
1304 # By default Suricata creates one "detect" thread per available CPU/CPU core.
1305 # This setting allows controlling this behaviour. A ratio setting of 2 will
1306 # create 2 detect threads for each CPU/CPU core. So for a dual core CPU this
1307 # will result in 4 detect threads. If values below 1 are used, less threads
1308 # are created. So on a dual core CPU a setting of 0.5 results in 1 detect
1309 # thread being created. Regardless of the setting at a minimum 1 detect
1310 # thread will always be created.
1312 detect-thread-ratio: 1.0
1314 # By default, the per-thread stack size is left to its default setting. If
1315 # the default thread stack size is too small, use the following configuration
1316 # setting to change the size. Note that if any thread's stack size cannot be
1317 # set to this value, a fatal error occurs.
1319 # Generally, the per-thread stack-size should not exceed 8MB.