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