]> git.ipfire.org Git - ipfire-2.x.git/blob - config/suricata/suricata.yaml
ed71898f48f990b2223ee824ed97b469fea70b9b
[ipfire-2.x.git] / config / suricata / suricata.yaml
1 %YAML 1.1
2 ---
3
4 ##
5 ## IPFire specific configuration file - an untouched example configuration
6 ## can be found in suricata-example.yaml.
7 ##
8
9 vars:
10 address-groups:
11 # Include HOME_NET declaration from external file.
12 include: /var/ipfire/suricata/suricata-homenet.yaml
13
14 # Include DNS_SERVERS declaration from external file.
15 include: /var/ipfire/suricata/suricata-dns-servers.yaml
16
17 EXTERNAL_NET: "any"
18
19 HTTP_SERVERS: "$HOME_NET"
20 SMTP_SERVERS: "$HOME_NET"
21 SQL_SERVERS: "$HOME_NET"
22 TELNET_SERVERS: "$HOME_NET"
23 AIM_SERVERS: "$EXTERNAL_NET"
24 DC_SERVERS: "$HOME_NET"
25 DNP3_SERVER: "$HOME_NET"
26 DNP3_CLIENT: "$HOME_NET"
27 MODBUS_CLIENT: "$HOME_NET"
28 MODBUS_SERVER: "$HOME_NET"
29 ENIP_CLIENT: "$HOME_NET"
30 ENIP_SERVER: "$HOME_NET"
31
32 port-groups:
33 HTTP_PORTS: "80"
34 SHELLCODE_PORTS: "!80"
35 ORACLE_PORTS: 1521
36 SSH_PORTS: "[22,222]"
37 DNP3_PORTS: 20000
38 MODBUS_PORTS: 502
39 FILE_DATA_PORTS: "[$HTTP_PORTS,110,143]"
40 FTP_PORTS: 21
41
42 ##
43 ## Ruleset specific options.
44 ##
45 default-rule-path: /var/lib/suricata
46 rule-files:
47 # Include enabled ruleset files from external file.
48 include: /var/ipfire/suricata/suricata-used-rulefiles.yaml
49
50 classification-file: /var/lib/suricata/classification.config
51 reference-config-file: /var/lib/suricata/reference.config
52 threshold-file: /var/lib/suricata/threshold.config
53
54
55 ##
56 ## Logging options.
57 ##
58 default-log-dir: /var/log/suricata/
59
60 # global stats configuration
61 stats:
62 enabled: yes
63 # The interval field (in seconds) controls at what interval
64 # the loggers are invoked.
65 interval: 8
66
67 # Add decode events as stats.
68 #decoder-events: true
69 # Decoder event prefix in stats. Has been 'decoder' before, but that leads
70 # to missing events in the eve.stats records. See issue #2225.
71 decoder-events-prefix: "decoder.event"
72 # Add stream events as stats.
73 #stream-events: false
74
75 # Configure the type of alert (and other) logging you would like.
76 outputs:
77 # a line based alerts log similar to Snort's fast.log
78 - fast:
79 enabled: yes
80 filename: fast.log
81 append: yes
82 #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
83
84 # Stats.log contains data from various counters of the suricata engine.
85 - stats:
86 enabled: no
87 filename: stats.log
88 append: no # append to file (yes) or overwrite it (no)
89 totals: yes # stats for all threads merged together
90 threads: no # per thread stats
91 #null-values: yes # print counters that have value 0
92
93 logging:
94 # The default log level, can be overridden in an output section.
95 # Note that debug level logging will only be emitted if Suricata was
96 # compiled with the --enable-debug configure option.
97 #
98 # This value is overriden by the SC_LOG_LEVEL env var.
99 default-log-level: notice
100
101 # A regex to filter output. Can be overridden in an output section.
102 # Defaults to empty (no filter).
103 #
104 # This value is overriden by the SC_LOG_OP_FILTER env var.
105 default-output-filter:
106
107 # Define your logging outputs. If none are defined, or they are all
108 # disabled you will get the default - console output.
109 outputs:
110 - console:
111 enabled: no
112 # type: json
113 - file:
114 enabled: no
115 level: info
116 filename: /var/log/suricata/suricata.log
117 # type: json
118 - syslog:
119 enabled: yes
120 facility: local5
121 format: ""
122 # type: json
123
124 ##
125 ## Netfilter configuration
126 ##
127
128 nfq:
129 mode: repeat
130 repeat-mark: 1879048192
131 repeat-mask: 1879048192
132 # bypass-mark: 1
133 # bypass-mask: 1
134 # route-queue: 2
135 # batchcount: 20
136 fail-open: yes
137
138 ##
139 ## Step 5: App Layer Protocol Configuration
140 ##
141
142 # Configure the app-layer parsers. The protocols section details each
143 # protocol.
144 #
145 # The option "enabled" takes 3 values - "yes", "no", "detection-only".
146 # "yes" enables both detection and the parser, "no" disables both, and
147 # "detection-only" enables protocol detection only (parser disabled).
148 app-layer:
149 protocols:
150 krb5:
151 enabled: yes
152 snmp:
153 enabled: yes
154 ikev2:
155 enabled: yes
156 tls:
157 enabled: yes
158 detection-ports:
159 dp: "[443,444,465,853,993,995]"
160
161 # Generate JA3 fingerprint from client hello. If not specified it
162 # will be disabled by default, but enabled if rules require it.
163 #ja3-fingerprints: auto
164 # Generate JA3 fingerprint from client hello
165 ja3-fingerprints: no
166
167 # Completely stop processing TLS/SSL session after the handshake
168 # completed. If bypass is enabled this will also trigger flow
169 # bypass. If disabled (the default), TLS/SSL session is still
170 # tracked for Heartbleed and other anomalies.
171 #no-reassemble: yes
172 dcerpc:
173 enabled: yes
174 ftp:
175 enabled: yes
176 rdp:
177 enabled: yes
178 ssh:
179 enabled: yes
180 smtp:
181 enabled: yes
182 # Configure SMTP-MIME Decoder
183 mime:
184 # Decode MIME messages from SMTP transactions
185 # (may be resource intensive)
186 # This field supercedes all others because it turns the entire
187 # process on or off
188 decode-mime: yes
189
190 # Decode MIME entity bodies (ie. base64, quoted-printable, etc.)
191 decode-base64: yes
192 decode-quoted-printable: yes
193
194 # Maximum bytes per header data value stored in the data structure
195 # (default is 2000)
196 header-value-depth: 2000
197
198 # Extract URLs and save in state data structure
199 extract-urls: yes
200 # Set to yes to compute the md5 of the mail body. You will then
201 # be able to journalize it.
202 body-md5: no
203 # Configure inspected-tracker for file_data keyword
204 inspected-tracker:
205 content-limit: 100000
206 content-inspect-min-size: 32768
207 content-inspect-window: 4096
208 imap:
209 enabled: yes
210 msn:
211 enabled: yes
212 smb:
213 enabled: yes
214 detection-ports:
215 dp: 139, 445
216 nfs:
217 enabled: yes
218 tftp:
219 enabled: yes
220 dns:
221 # memcaps. Globally and per flow/state.
222 global-memcap: 32mb
223 state-memcap: 512kb
224
225 # How many unreplied DNS requests are considered a flood.
226 # If the limit is reached, app-layer-event:dns.flooded; will match.
227 request-flood: 512
228
229 tcp:
230 enabled: yes
231 detection-ports:
232 dp: 53
233 udp:
234 enabled: yes
235 detection-ports:
236 dp: 53
237 http:
238 enabled: yes
239 memcap: 256mb
240
241 # default-config: Used when no server-config matches
242 # personality: List of personalities used by default
243 # request-body-limit: Limit reassembly of request body for inspection
244 # by http_client_body & pcre /P option.
245 # response-body-limit: Limit reassembly of response body for inspection
246 # by file_data, http_server_body & pcre /Q option.
247 # double-decode-path: Double decode path section of the URI
248 # double-decode-query: Double decode query section of the URI
249 # response-body-decompress-layer-limit:
250 # Limit to how many layers of compression will be
251 # decompressed. Defaults to 2.
252 #
253 # Currently Available Personalities:
254 # Minimal, Generic, IDS (default), IIS_4_0, IIS_5_0, IIS_5_1, IIS_6_0,
255 # IIS_7_0, IIS_7_5, Apache_2
256 libhtp:
257 default-config:
258 personality: IDS
259
260 # Can be specified in kb, mb, gb. Just a number indicates
261 # it's in bytes.
262 request-body-limit: 0
263 response-body-limit: 0
264
265 # response body decompression (0 disables)
266 response-body-decompress-layer-limit: 2
267
268 # auto will use http-body-inline mode in IPS mode, yes or no set it statically
269 http-body-inline: auto
270
271 # Take a random value for inspection sizes around the specified value.
272 # This lower the risk of some evasion technics but could lead
273 # detection change between runs. It is set to 'yes' by default.
274 randomize-inspection-sizes: yes
275 # If randomize-inspection-sizes is active, the value of various
276 # inspection size will be choosen in the [1 - range%, 1 + range%]
277 # range
278 # Default value of randomize-inspection-range is 10.
279 randomize-inspection-range: 10
280
281 # decoding
282 double-decode-path: no
283 double-decode-query: no
284
285 ntp:
286 enabled: yes
287 dhcp:
288 enabled: yes
289 sip:
290 enabled: yes
291
292 # Limit for the maximum number of asn1 frames to decode (default 256)
293 asn1-max-frames: 256
294
295
296 ##############################################################################
297 ##
298 ## Advanced settings below
299 ##
300 ##############################################################################
301
302 ##
303 ## Run Options
304 ##
305
306 # Run suricata as user and group.
307 run-as:
308 user: suricata
309 group: suricata
310
311 # Suricata core dump configuration. Limits the size of the core dump file to
312 # approximately max-dump. The actual core dump size will be a multiple of the
313 # page size. Core dumps that would be larger than max-dump are truncated. On
314 # Linux, the actual core dump size may be a few pages larger than max-dump.
315 # Setting max-dump to 0 disables core dumping.
316 # Setting max-dump to 'unlimited' will give the full core dump file.
317 # On 32-bit Linux, a max-dump value >= ULONG_MAX may cause the core dump size
318 # to be 'unlimited'.
319
320 coredump:
321 max-dump: unlimited
322
323 # If suricata box is a router for the sniffed networks, set it to 'router'. If
324 # it is a pure sniffing setup, set it to 'sniffer-only'.
325 # If set to auto, the variable is internally switch to 'router' in IPS mode
326 # and 'sniffer-only' in IDS mode.
327 # This feature is currently only used by the reject* keywords.
328 host-mode: auto
329
330 # Number of packets preallocated per thread. The default is 1024. A higher number
331 # will make sure each CPU will be more easily kept busy, but may negatively
332 # impact caching.
333 max-pending-packets: 1024
334
335 # Runmode the engine should use. Please check --list-runmodes to get the available
336 # runmodes for each packet acquisition method. Defaults to "autofp" (auto flow pinned
337 # load balancing).
338 runmode: workers
339
340 # Specifies the kind of flow load balancer used by the flow pinned autofp mode.
341 #
342 # Supported schedulers are:
343 #
344 # round-robin - Flows assigned to threads in a round robin fashion.
345 # active-packets - Flows assigned to threads that have the lowest number of
346 # unprocessed packets (default).
347 # hash - Flow alloted usihng the address hash. More of a random
348 # technique. Was the default in Suricata 1.2.1 and older.
349 #
350 #autofp-scheduler: active-packets
351
352 # Preallocated size for packet. Default is 1514 which is the classical
353 # size for pcap on ethernet. You should adjust this value to the highest
354 # packet size (MTU + hardware header) on your system.
355 default-packet-size: 1514
356
357 # Unix command socket can be used to pass commands to suricata.
358 # An external tool can then connect to get information from suricata
359 # or trigger some modifications of the engine. Set enabled to yes
360 # to activate the feature. In auto mode, the feature will only be
361 # activated in live capture mode. You can use the filename variable to set
362 # the file name of the socket.
363 unix-command:
364 enabled: no
365 #filename: custom.socket
366
367 # Magic file
368 magic-file: /usr/share/misc/magic.mgc
369
370 legacy:
371 uricontent: enabled
372
373 ##
374 ## Detection settings
375 ##
376
377 # Set the order of alerts bassed on actions
378 # The default order is pass, drop, reject, alert
379 # action-order:
380 # - pass
381 # - drop
382 # - reject
383 # - alert
384
385 # When run with the option --engine-analysis, the engine will read each of
386 # the parameters below, and print reports for each of the enabled sections
387 # and exit. The reports are printed to a file in the default log dir
388 # given by the parameter "default-log-dir", with engine reporting
389 # subsection below printing reports in its own report file.
390 engine-analysis:
391 # enables printing reports for fast-pattern for every rule.
392 rules-fast-pattern: yes
393 # enables printing reports for each rule
394 rules: yes
395
396 #recursion and match limits for PCRE where supported
397 pcre:
398 match-limit: 3500
399 match-limit-recursion: 1500
400
401 ##
402 ## Advanced Traffic Tracking and Reconstruction Settings
403 ##
404
405 # Host specific policies for defragmentation and TCP stream
406 # reassembly. The host OS lookup is done using a radix tree, just
407 # like a routing table so the most specific entry matches.
408 host-os-policy:
409 # Make the default policy windows.
410 windows: [0.0.0.0/0]
411 bsd: []
412 bsd-right: []
413 old-linux: []
414 linux: []
415 old-solaris: []
416 solaris: []
417 hpux10: []
418 hpux11: []
419 irix: []
420 macos: []
421 vista: []
422 windows2k3: []
423
424 # Defrag settings:
425
426 defrag:
427 memcap: 64mb
428 hash-size: 65536
429 trackers: 65535 # number of defragmented flows to follow
430 max-frags: 65535 # number of fragments to keep (higher than trackers)
431 prealloc: yes
432 timeout: 60
433
434 # Flow settings:
435 # By default, the reserved memory (memcap) for flows is 32MB. This is the limit
436 # for flow allocation inside the engine. You can change this value to allow
437 # more memory usage for flows.
438 # The hash-size determine the size of the hash used to identify flows inside
439 # the engine, and by default the value is 65536.
440 # At the startup, the engine can preallocate a number of flows, to get a better
441 # performance. The number of flows preallocated is 10000 by default.
442 # emergency-recovery is the percentage of flows that the engine need to
443 # prune before unsetting the emergency state. The emergency state is activated
444 # when the memcap limit is reached, allowing to create new flows, but
445 # prunning them with the emergency timeouts (they are defined below).
446 # If the memcap is reached, the engine will try to prune flows
447 # with the default timeouts. If it doens't find a flow to prune, it will set
448 # the emergency bit and it will try again with more agressive timeouts.
449 # If that doesn't work, then it will try to kill the last time seen flows
450 # not in use.
451 # The memcap can be specified in kb, mb, gb. Just a number indicates it's
452 # in bytes.
453
454 flow:
455 memcap: 256mb
456 hash-size: 65536
457 prealloc: 10000
458 emergency-recovery: 30
459 managers: 1
460 recyclers: 1
461
462 # This option controls the use of vlan ids in the flow (and defrag)
463 # hashing. Normally this should be enabled, but in some (broken)
464 # setups where both sides of a flow are not tagged with the same vlan
465 # tag, we can ignore the vlan id's in the flow hashing.
466 vlan:
467 use-for-tracking: true
468
469 # Specific timeouts for flows. Here you can specify the timeouts that the
470 # active flows will wait to transit from the current state to another, on each
471 # protocol. The value of "new" determine the seconds to wait after a hanshake or
472 # stream startup before the engine free the data of that flow it doesn't
473 # change the state to established (usually if we don't receive more packets
474 # of that flow). The value of "established" is the amount of
475 # seconds that the engine will wait to free the flow if it spend that amount
476 # without receiving new packets or closing the connection. "closed" is the
477 # amount of time to wait after a flow is closed (usually zero). "bypassed"
478 # timeout controls locally bypassed flows. For these flows we don't do any other
479 # tracking. If no packets have been seen after this timeout, the flow is discarded.
480 #
481 # There's an emergency mode that will become active under attack circumstances,
482 # making the engine to check flow status faster. This configuration variables
483 # use the prefix "emergency-" and work similar as the normal ones.
484 # Some timeouts doesn't apply to all the protocols, like "closed", for udp and
485 # icmp.
486
487 flow-timeouts:
488
489 default:
490 new: 30
491 established: 300
492 closed: 0
493 bypassed: 100
494 emergency-new: 10
495 emergency-established: 100
496 emergency-closed: 0
497 emergency-bypassed: 50
498 tcp:
499 new: 60
500 established: 600
501 closed: 60
502 bypassed: 100
503 emergency-new: 5
504 emergency-established: 100
505 emergency-closed: 10
506 emergency-bypassed: 50
507 udp:
508 new: 30
509 established: 300
510 bypassed: 100
511 emergency-new: 10
512 emergency-established: 100
513 emergency-bypassed: 50
514 icmp:
515 new: 30
516 established: 300
517 bypassed: 100
518 emergency-new: 10
519 emergency-established: 100
520 emergency-bypassed: 50
521
522 # Stream engine settings. Here the TCP stream tracking and reassembly
523 # engine is configured.
524 #
525 # stream:
526 # memcap: 32mb # Can be specified in kb, mb, gb. Just a
527 # # number indicates it's in bytes.
528 # checksum-validation: yes # To validate the checksum of received
529 # # packet. If csum validation is specified as
530 # # "yes", then packet with invalid csum will not
531 # # be processed by the engine stream/app layer.
532 # # Warning: locally generated trafic can be
533 # # generated without checksum due to hardware offload
534 # # of checksum. You can control the handling of checksum
535 # # on a per-interface basis via the 'checksum-checks'
536 # # option
537 # prealloc-sessions: 2k # 2k sessions prealloc'd per stream thread
538 # midstream: false # don't allow midstream session pickups
539 # async-oneside: false # don't enable async stream handling
540 # inline: no # stream inline mode
541 # drop-invalid: yes # in inline mode, drop packets that are invalid with regards to streaming engine
542 # max-synack-queued: 5 # Max different SYN/ACKs to queue
543 # bypass: no # Bypass packets when stream.depth is reached
544 #
545 # reassembly:
546 # memcap: 64mb # Can be specified in kb, mb, gb. Just a number
547 # # indicates it's in bytes.
548 # depth: 1mb # Can be specified in kb, mb, gb. Just a number
549 # # indicates it's in bytes.
550 # toserver-chunk-size: 2560 # inspect raw stream in chunks of at least
551 # # this size. Can be specified in kb, mb,
552 # # gb. Just a number indicates it's in bytes.
553 # toclient-chunk-size: 2560 # inspect raw stream in chunks of at least
554 # # this size. Can be specified in kb, mb,
555 # # gb. Just a number indicates it's in bytes.
556 # randomize-chunk-size: yes # Take a random value for chunk size around the specified value.
557 # # This lower the risk of some evasion technics but could lead
558 # # detection change between runs. It is set to 'yes' by default.
559 # randomize-chunk-range: 10 # If randomize-chunk-size is active, the value of chunk-size is
560 # # a random value between (1 - randomize-chunk-range/100)*toserver-chunk-size
561 # # and (1 + randomize-chunk-range/100)*toserver-chunk-size and the same
562 # # calculation for toclient-chunk-size.
563 # # Default value of randomize-chunk-range is 10.
564 #
565 # raw: yes # 'Raw' reassembly enabled or disabled.
566 # # raw is for content inspection by detection
567 # # engine.
568 #
569 # segment-prealloc: 2048 # number of segments preallocated per thread
570 #
571 # check-overlap-different-data: true|false
572 # # check if a segment contains different data
573 # # than what we've already seen for that
574 # # position in the stream.
575 # # This is enabled automatically if inline mode
576 # # is used or when stream-event:reassembly_overlap_different_data;
577 # # is used in a rule.
578 #
579 stream:
580 memcap: 256mb
581 prealloc-sessions: 4096
582 checksum-validation: yes # reject wrong csums
583 inline: auto # auto will use inline mode in IPS mode, yes or no set it statically
584 reassembly:
585 memcap: 256mb
586 depth: 1mb # reassemble 1mb into a stream
587 toserver-chunk-size: 2560
588 toclient-chunk-size: 2560
589 randomize-chunk-size: yes
590 raw: yes
591 segment-prealloc: 2048
592 check-overlap-different-data: true
593
594 # Host table:
595 #
596 # Host table is used by tagging and per host thresholding subsystems.
597 #
598 host:
599 hash-size: 4096
600 prealloc: 1000
601 memcap: 32mb
602
603 # IP Pair table:
604 #
605 # Used by xbits 'ippair' tracking.
606 #
607 #ippair:
608 # hash-size: 4096
609 # prealloc: 1000
610 # memcap: 32mb
611
612 # Decoder settings
613
614 decoder:
615 # Teredo decoder is known to not be completely accurate
616 # it will sometimes detect non-teredo as teredo.
617 teredo:
618 enabled: false
619
620
621 ##
622 ## Performance tuning and profiling
623 ##
624
625 # The detection engine builds internal groups of signatures. The engine
626 # allow us to specify the profile to use for them, to manage memory on an
627 # efficient way keeping a good performance. For the profile keyword you
628 # can use the words "low", "medium", "high" or "custom". If you use custom
629 # make sure to define the values at "- custom-values" as your convenience.
630 # Usually you would prefer medium/high/low.
631 #
632 # "sgh mpm-context", indicates how the staging should allot mpm contexts for
633 # the signature groups. "single" indicates the use of a single context for
634 # all the signature group heads. "full" indicates a mpm-context for each
635 # group head. "auto" lets the engine decide the distribution of contexts
636 # based on the information the engine gathers on the patterns from each
637 # group head.
638 #
639 # The option inspection-recursion-limit is used to limit the recursive calls
640 # in the content inspection code. For certain payload-sig combinations, we
641 # might end up taking too much time in the content inspection code.
642 # If the argument specified is 0, the engine uses an internally defined
643 # default limit. On not specifying a value, we use no limits on the recursion.
644 detect:
645 profile: custom
646 custom-values:
647 toclient-groups: 200
648 toserver-groups: 200
649 sgh-mpm-context: auto
650 inspection-recursion-limit: 3000
651
652 # If set to yes, the loading of signatures will be made after the capture
653 # is started. This will limit the downtime in IPS mode.
654 delayed-detect: yes
655
656 prefilter:
657 # default prefiltering setting. "mpm" only creates MPM/fast_pattern
658 # engines. "auto" also sets up prefilter engines for other keywords.
659 # Use --list-keywords=all to see which keywords support prefiltering.
660 default: mpm
661
662 # the grouping values above control how many groups are created per
663 # direction. Port whitelisting forces that port to get it's own group.
664 # Very common ports will benefit, as well as ports with many expensive
665 # rules.
666 grouping:
667 #tcp-whitelist: 53, 80, 139, 443, 445, 1433, 3306, 3389, 6666, 6667, 8080
668 #udp-whitelist: 53, 135, 5060
669
670 profiling:
671 # Log the rules that made it past the prefilter stage, per packet
672 # default is off. The threshold setting determines how many rules
673 # must have made it past pre-filter for that rule to trigger the
674 # logging.
675 #inspect-logging-threshold: 200
676 grouping:
677 dump-to-disk: false
678 include-rules: false # very verbose
679 include-mpm-stats: false
680
681 # Select the multi pattern algorithm you want to run for scan/search the
682 # in the engine.
683 #
684 # The supported algorithms are:
685 # "ac" - Aho-Corasick, default implementation
686 # "ac-bs" - Aho-Corasick, reduced memory implementation
687 # "ac-cuda" - Aho-Corasick, CUDA implementation
688 # "ac-ks" - Aho-Corasick, "Ken Steele" variant
689 # "hs" - Hyperscan, available when built with Hyperscan support
690 #
691 # The default mpm-algo value of "auto" will use "hs" if Hyperscan is
692 # available, "ac" otherwise.
693 #
694 # The mpm you choose also decides the distribution of mpm contexts for
695 # signature groups, specified by the conf - "detect.sgh-mpm-context".
696 # Selecting "ac" as the mpm would require "detect.sgh-mpm-context"
697 # to be set to "single", because of ac's memory requirements, unless the
698 # ruleset is small enough to fit in one's memory, in which case one can
699 # use "full" with "ac". Rest of the mpms can be run in "full" mode.
700 #
701 # There is also a CUDA pattern matcher (only available if Suricata was
702 # compiled with --enable-cuda: b2g_cuda. Make sure to update your
703 # max-pending-packets setting above as well if you use b2g_cuda.
704
705 mpm-algo: auto
706
707 # Select the matching algorithm you want to use for single-pattern searches.
708 #
709 # Supported algorithms are "bm" (Boyer-Moore) and "hs" (Hyperscan, only
710 # available if Suricata has been built with Hyperscan support).
711 #
712 # The default of "auto" will use "hs" if available, otherwise "bm".
713
714 spm-algo: auto
715
716 # Suricata is multi-threaded. Here the threading can be influenced.
717 threading:
718 set-cpu-affinity: no
719 # Tune cpu affinity of threads. Each family of threads can be bound
720 # on specific CPUs.
721 #
722 # These 2 apply to the all runmodes:
723 # management-cpu-set is used for flow timeout handling, counters
724 # worker-cpu-set is used for 'worker' threads
725 #
726 # Additionally, for autofp these apply:
727 # receive-cpu-set is used for capture threads
728 # verdict-cpu-set is used for IPS verdict threads
729 #
730 cpu-affinity:
731 - management-cpu-set:
732 cpu: [ 0 ] # include only these cpus in affinity settings
733 - receive-cpu-set:
734 cpu: [ 0 ] # include only these cpus in affinity settings
735 - worker-cpu-set:
736 cpu: [ "all" ]
737 mode: "exclusive"
738 prio:
739 low: [ 0 ]
740 medium: [ "1-2" ]
741 high: [ 3 ]
742 default: "medium"
743 - verdict-cpu-set:
744 cpu: [ 0 ]
745 prio:
746 default: "high"
747 #
748 # By default Suricata creates one "detect" thread per available CPU/CPU core.
749 # This setting allows controlling this behaviour. A ratio setting of 2 will
750 # create 2 detect threads for each CPU/CPU core. So for a dual core CPU this
751 # will result in 4 detect threads. If values below 1 are used, less threads
752 # are created. So on a dual core CPU a setting of 0.5 results in 1 detect
753 # thread being created. Regardless of the setting at a minimum 1 detect
754 # thread will always be created.
755 #
756 detect-thread-ratio: 1.0