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