]> git.ipfire.org Git - ipfire-2.x.git/blob - config/suricata/suricata.yaml
suricata.yaml: Re-add EVE log section.
[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,81]"
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 # Extensible Event Format (nicknamed EVE) event log in JSON format
94 - eve-log:
95 enabled: no
96 filetype: regular #regular|syslog|unix_dgram|unix_stream|redis
97 filename: eve.json
98 #prefix: "@cee: " # prefix to prepend to each log entry
99 # the following are valid when type: syslog above
100 #identity: "suricata"
101 #facility: local5
102 #level: Info ## possible levels: Emergency, Alert, Critical,
103 ## Error, Warning, Notice, Info, Debug
104 #redis:
105 # server: 127.0.0.1
106 # port: 6379
107 # async: true ## if redis replies are read asynchronously
108 # mode: list ## possible values: list|lpush (default), rpush, channel|publish
109 # ## lpush and rpush are using a Redis list. "list" is an alias for lpush
110 # ## publish is using a Redis channel. "channel" is an alias for publish
111 # key: suricata ## key or channel to use (default to suricata)
112 # Redis pipelining set up. This will enable to only do a query every
113 # 'batch-size' events. This should lower the latency induced by network
114 # connection at the cost of some memory. There is no flushing implemented
115 # so this setting as to be reserved to high traffic suricata.
116 # pipelining:
117 # enabled: yes ## set enable to yes to enable query pipelining
118 # batch-size: 10 ## number of entry to keep in buffer
119
120 # Include top level metadata. Default yes.
121 #metadata: no
122
123 # include the name of the input pcap file in pcap file processing mode
124 pcap-file: false
125
126 # Community Flow ID
127 # Adds a 'community_id' field to EVE records. These are meant to give
128 # a records a predictable flow id that can be used to match records to
129 # output of other tools such as Bro.
130 #
131 # Takes a 'seed' that needs to be same across sensors and tools
132 # to make the id less predictable.
133
134 # enable/disable the community id feature.
135 community-id: false
136 # Seed value for the ID output. Valid values are 0-65535.
137 community-id-seed: 0
138
139 # HTTP X-Forwarded-For support by adding an extra field or overwriting
140 # the source or destination IP address (depending on flow direction)
141 # with the one reported in the X-Forwarded-For HTTP header. This is
142 # helpful when reviewing alerts for traffic that is being reverse
143 # or forward proxied.
144 xff:
145 enabled: no
146 # Two operation modes are available, "extra-data" and "overwrite".
147 mode: extra-data
148 # Two proxy deployments are supported, "reverse" and "forward". In
149 # a "reverse" deployment the IP address used is the last one, in a
150 # "forward" deployment the first IP address is used.
151 deployment: reverse
152 # Header name where the actual IP address will be reported, if more
153 # than one IP address is present, the last IP address will be the
154 # one taken into consideration.
155 header: X-Forwarded-For
156
157 types:
158 - alert:
159 # payload: yes # enable dumping payload in Base64
160 # payload-buffer-size: 4kb # max size of payload buffer to output in eve-log
161 # payload-printable: yes # enable dumping payload in printable (lossy) format
162 # packet: yes # enable dumping of packet (without stream segments)
163 # metadata: no # enable inclusion of app layer metadata with alert. Default yes
164 # http-body: yes # Requires metadata; enable dumping of http body in Base64
165 # http-body-printable: yes # Requires metadata; enable dumping of http body in printable format
166
167 # Enable the logging of tagged packets for rules using the
168 # "tag" keyword.
169 tagged-packets: yes
170 - anomaly:
171 # Anomaly log records describe unexpected conditions such
172 # as truncated packets, packets with invalid IP/UDP/TCP
173 # length values, and other events that render the packet
174 # invalid for further processing or describe unexpected
175 # behavior on an established stream. Networks which
176 # experience high occurrences of anomalies may experience
177 # packet processing degradation.
178 #
179 # Anomalies are reported for the following:
180 # 1. Decode: Values and conditions that are detected while
181 # decoding individual packets. This includes invalid or
182 # unexpected values for low-level protocol lengths as well
183 # as stream related events (TCP 3-way handshake issues,
184 # unexpected sequence number, etc).
185 # 2. Stream: This includes stream related events (TCP
186 # 3-way handshake issues, unexpected sequence number,
187 # etc).
188 # 3. Application layer: These denote application layer
189 # specific conditions that are unexpected, invalid or are
190 # unexpected given the application monitoring state.
191 #
192 # By default, anomaly logging is disabled. When anomaly
193 # logging is enabled, applayer anomaly reporting is
194 # enabled.
195 enabled: yes
196 #
197 # Choose one or more types of anomaly logging and whether to enable
198 # logging of the packet header for packet anomalies.
199 types:
200 # decode: no
201 # stream: no
202 # applayer: yes
203 #packethdr: no
204 - http:
205 extended: yes # enable this for extended logging information
206 # custom allows additional http fields to be included in eve-log
207 # the example below adds three additional fields when uncommented
208 #custom: [Accept-Encoding, Accept-Language, Authorization]
209 # set this value to one and only one among {both, request, response}
210 # to dump all http headers for every http request and/or response
211 # dump-all-headers: none
212 - dns:
213 # This configuration uses the new DNS logging format,
214 # the old configuration is still available:
215 # https://suricata.readthedocs.io/en/latest/output/eve/eve-json-output.html#dns-v1-format
216
217 # As of Suricata 5.0, version 2 of the eve dns output
218 # format is the default.
219 #version: 2
220
221 # Enable/disable this logger. Default: enabled.
222 #enabled: yes
223
224 # Control logging of requests and responses:
225 # - requests: enable logging of DNS queries
226 # - responses: enable logging of DNS answers
227 # By default both requests and responses are logged.
228 #requests: no
229 #responses: no
230
231 # Format of answer logging:
232 # - detailed: array item per answer
233 # - grouped: answers aggregated by type
234 # Default: all
235 #formats: [detailed, grouped]
236
237 # Types to log, based on the query type.
238 # Default: all.
239 #types: [a, aaaa, cname, mx, ns, ptr, txt]
240 - tls:
241 extended: yes # enable this for extended logging information
242 # output TLS transaction where the session is resumed using a
243 # session id
244 #session-resumption: no
245 # custom allows to control which tls fields that are included
246 # in eve-log
247 #custom: [subject, issuer, session_resumed, serial, fingerprint, sni, version, not_before, not_after, certificate, chain, ja3, ja3s]
248 - files:
249 force-magic: no # force logging magic on all logged files
250 # force logging of checksums, available hash functions are md5,
251 # sha1 and sha256
252 #force-hash: [md5]
253 #- drop:
254 # alerts: yes # log alerts that caused drops
255 # flows: all # start or all: 'start' logs only a single drop
256 # # per flow direction. All logs each dropped pkt.
257 - smtp:
258 #extended: yes # enable this for extended logging information
259 # this includes: bcc, message-id, subject, x_mailer, user-agent
260 # custom fields logging from the list:
261 # reply-to, bcc, message-id, subject, x-mailer, user-agent, received,
262 # x-originating-ip, in-reply-to, references, importance, priority,
263 # sensitivity, organization, content-md5, date
264 #custom: [received, x-mailer, x-originating-ip, relays, reply-to, bcc]
265 # output md5 of fields: body, subject
266 # for the body you need to set app-layer.protocols.smtp.mime.body-md5
267 # to yes
268 #md5: [body, subject]
269
270 #- dnp3
271 - ftp
272 #- rdp
273 - nfs
274 - smb
275 - tftp
276 - ikev2
277 - krb5
278 - snmp
279 #- sip
280 - dhcp:
281 enabled: yes
282 # When extended mode is on, all DHCP messages are logged
283 # with full detail. When extended mode is off (the
284 # default), just enough information to map a MAC address
285 # to an IP address is logged.
286 extended: no
287 - ssh
288 - stats:
289 totals: yes # stats for all threads merged together
290 threads: no # per thread stats
291 deltas: no # include delta values
292 # bi-directional flows
293 - flow
294 # uni-directional flows
295 #- netflow
296
297 # Metadata event type. Triggered whenever a pktvar is saved
298 # and will include the pktvars, flowvars, flowbits and
299 # flowints.
300 #- metadata
301
302 logging:
303 # The default log level, can be overridden in an output section.
304 # Note that debug level logging will only be emitted if Suricata was
305 # compiled with the --enable-debug configure option.
306 #
307 # This value is overriden by the SC_LOG_LEVEL env var.
308 default-log-level: notice
309
310 # A regex to filter output. Can be overridden in an output section.
311 # Defaults to empty (no filter).
312 #
313 # This value is overriden by the SC_LOG_OP_FILTER env var.
314 default-output-filter:
315
316 # Define your logging outputs. If none are defined, or they are all
317 # disabled you will get the default - console output.
318 outputs:
319 - console:
320 enabled: no
321 # type: json
322 - file:
323 enabled: no
324 level: info
325 filename: /var/log/suricata/suricata.log
326 # type: json
327 - syslog:
328 enabled: yes
329 facility: local5
330 format: ""
331 # type: json
332
333 ##
334 ## Netfilter configuration
335 ##
336
337 nfq:
338 mode: repeat
339 repeat-mark: 1879048192
340 repeat-mask: 1879048192
341 # bypass-mark: 1
342 # bypass-mask: 1
343 # route-queue: 2
344 # batchcount: 20
345 fail-open: yes
346
347 ##
348 ## Step 5: App Layer Protocol Configuration
349 ##
350
351 # Configure the app-layer parsers. The protocols section details each
352 # protocol.
353 #
354 # The option "enabled" takes 3 values - "yes", "no", "detection-only".
355 # "yes" enables both detection and the parser, "no" disables both, and
356 # "detection-only" enables protocol detection only (parser disabled).
357 app-layer:
358 protocols:
359 krb5:
360 enabled: yes
361 snmp:
362 enabled: yes
363 ikev2:
364 enabled: yes
365 tls:
366 enabled: yes
367 detection-ports:
368 dp: "[443,444,465,853,993,995]"
369
370 # Generate JA3 fingerprint from client hello. If not specified it
371 # will be disabled by default, but enabled if rules require it.
372 #ja3-fingerprints: auto
373 # Generate JA3 fingerprint from client hello
374 ja3-fingerprints: no
375
376 # Completely stop processing TLS/SSL session after the handshake
377 # completed. If bypass is enabled this will also trigger flow
378 # bypass. If disabled (the default), TLS/SSL session is still
379 # tracked for Heartbleed and other anomalies.
380 #no-reassemble: yes
381 dcerpc:
382 enabled: yes
383 ftp:
384 enabled: yes
385 rdp:
386 enabled: yes
387 ssh:
388 enabled: yes
389 smtp:
390 enabled: yes
391 # Configure SMTP-MIME Decoder
392 mime:
393 # Decode MIME messages from SMTP transactions
394 # (may be resource intensive)
395 # This field supercedes all others because it turns the entire
396 # process on or off
397 decode-mime: yes
398
399 # Decode MIME entity bodies (ie. base64, quoted-printable, etc.)
400 decode-base64: yes
401 decode-quoted-printable: yes
402
403 # Maximum bytes per header data value stored in the data structure
404 # (default is 2000)
405 header-value-depth: 2000
406
407 # Extract URLs and save in state data structure
408 extract-urls: yes
409 # Set to yes to compute the md5 of the mail body. You will then
410 # be able to journalize it.
411 body-md5: no
412 # Configure inspected-tracker for file_data keyword
413 inspected-tracker:
414 content-limit: 100000
415 content-inspect-min-size: 32768
416 content-inspect-window: 4096
417 imap:
418 enabled: yes
419 msn:
420 enabled: yes
421 smb:
422 enabled: yes
423 detection-ports:
424 dp: 139, 445
425 nfs:
426 enabled: yes
427 tftp:
428 enabled: yes
429 dns:
430 # memcaps. Globally and per flow/state.
431 global-memcap: 32mb
432 state-memcap: 512kb
433
434 # How many unreplied DNS requests are considered a flood.
435 # If the limit is reached, app-layer-event:dns.flooded; will match.
436 request-flood: 2048
437
438 tcp:
439 enabled: yes
440 detection-ports:
441 dp: 53
442 udp:
443 enabled: yes
444 detection-ports:
445 dp: 53
446 http:
447 enabled: yes
448 memcap: 256mb
449
450 # default-config: Used when no server-config matches
451 # personality: List of personalities used by default
452 # request-body-limit: Limit reassembly of request body for inspection
453 # by http_client_body & pcre /P option.
454 # response-body-limit: Limit reassembly of response body for inspection
455 # by file_data, http_server_body & pcre /Q option.
456 # double-decode-path: Double decode path section of the URI
457 # double-decode-query: Double decode query section of the URI
458 # response-body-decompress-layer-limit:
459 # Limit to how many layers of compression will be
460 # decompressed. Defaults to 2.
461 #
462 # Currently Available Personalities:
463 # Minimal, Generic, IDS (default), IIS_4_0, IIS_5_0, IIS_5_1, IIS_6_0,
464 # IIS_7_0, IIS_7_5, Apache_2
465 libhtp:
466 default-config:
467 personality: IDS
468
469 # Can be specified in kb, mb, gb. Just a number indicates
470 # it's in bytes.
471 request-body-limit: 0
472 response-body-limit: 0
473
474 # response body decompression (0 disables)
475 response-body-decompress-layer-limit: 2
476
477 # auto will use http-body-inline mode in IPS mode, yes or no set it statically
478 http-body-inline: auto
479
480 # Take a random value for inspection sizes around the specified value.
481 # This lower the risk of some evasion technics but could lead
482 # detection change between runs. It is set to 'yes' by default.
483 randomize-inspection-sizes: yes
484 # If randomize-inspection-sizes is active, the value of various
485 # inspection size will be choosen in the [1 - range%, 1 + range%]
486 # range
487 # Default value of randomize-inspection-range is 10.
488 randomize-inspection-range: 10
489
490 # decoding
491 double-decode-path: no
492 double-decode-query: no
493
494 ntp:
495 enabled: yes
496 dhcp:
497 enabled: yes
498 sip:
499 enabled: yes
500
501 # Limit for the maximum number of asn1 frames to decode (default 256)
502 asn1-max-frames: 256
503
504
505 ##############################################################################
506 ##
507 ## Advanced settings below
508 ##
509 ##############################################################################
510
511 ##
512 ## Run Options
513 ##
514
515 # Run suricata as user and group.
516 run-as:
517 user: suricata
518 group: suricata
519
520 # Suricata core dump configuration. Limits the size of the core dump file to
521 # approximately max-dump. The actual core dump size will be a multiple of the
522 # page size. Core dumps that would be larger than max-dump are truncated. On
523 # Linux, the actual core dump size may be a few pages larger than max-dump.
524 # Setting max-dump to 0 disables core dumping.
525 # Setting max-dump to 'unlimited' will give the full core dump file.
526 # On 32-bit Linux, a max-dump value >= ULONG_MAX may cause the core dump size
527 # to be 'unlimited'.
528
529 coredump:
530 max-dump: unlimited
531
532 # If suricata box is a router for the sniffed networks, set it to 'router'. If
533 # it is a pure sniffing setup, set it to 'sniffer-only'.
534 # If set to auto, the variable is internally switch to 'router' in IPS mode
535 # and 'sniffer-only' in IDS mode.
536 # This feature is currently only used by the reject* keywords.
537 host-mode: auto
538
539 # Number of packets preallocated per thread. The default is 1024. A higher number
540 # will make sure each CPU will be more easily kept busy, but may negatively
541 # impact caching.
542 max-pending-packets: 1024
543
544 # Runmode the engine should use. Please check --list-runmodes to get the available
545 # runmodes for each packet acquisition method. Defaults to "autofp" (auto flow pinned
546 # load balancing).
547 runmode: workers
548
549 # Specifies the kind of flow load balancer used by the flow pinned autofp mode.
550 #
551 # Supported schedulers are:
552 #
553 # round-robin - Flows assigned to threads in a round robin fashion.
554 # active-packets - Flows assigned to threads that have the lowest number of
555 # unprocessed packets (default).
556 # hash - Flow alloted usihng the address hash. More of a random
557 # technique. Was the default in Suricata 1.2.1 and older.
558 #
559 #autofp-scheduler: active-packets
560
561 # Preallocated size for packet. Default is 1514 which is the classical
562 # size for pcap on ethernet. You should adjust this value to the highest
563 # packet size (MTU + hardware header) on your system.
564 default-packet-size: 1514
565
566 # Unix command socket can be used to pass commands to suricata.
567 # An external tool can then connect to get information from suricata
568 # or trigger some modifications of the engine. Set enabled to yes
569 # to activate the feature. In auto mode, the feature will only be
570 # activated in live capture mode. You can use the filename variable to set
571 # the file name of the socket.
572 unix-command:
573 enabled: no
574 #filename: custom.socket
575
576 # Magic file
577 magic-file: /usr/share/misc/magic.mgc
578
579 legacy:
580 uricontent: enabled
581
582 ##
583 ## Detection settings
584 ##
585
586 # Set the order of alerts bassed on actions
587 # The default order is pass, drop, reject, alert
588 # action-order:
589 # - pass
590 # - drop
591 # - reject
592 # - alert
593
594 # When run with the option --engine-analysis, the engine will read each of
595 # the parameters below, and print reports for each of the enabled sections
596 # and exit. The reports are printed to a file in the default log dir
597 # given by the parameter "default-log-dir", with engine reporting
598 # subsection below printing reports in its own report file.
599 engine-analysis:
600 # enables printing reports for fast-pattern for every rule.
601 rules-fast-pattern: yes
602 # enables printing reports for each rule
603 rules: yes
604
605 #recursion and match limits for PCRE where supported
606 pcre:
607 match-limit: 3500
608 match-limit-recursion: 1500
609
610 ##
611 ## Advanced Traffic Tracking and Reconstruction Settings
612 ##
613
614 # Host specific policies for defragmentation and TCP stream
615 # reassembly. The host OS lookup is done using a radix tree, just
616 # like a routing table so the most specific entry matches.
617 host-os-policy:
618 # Make the default policy windows.
619 windows: [0.0.0.0/0]
620 bsd: []
621 bsd-right: []
622 old-linux: []
623 linux: []
624 old-solaris: []
625 solaris: []
626 hpux10: []
627 hpux11: []
628 irix: []
629 macos: []
630 vista: []
631 windows2k3: []
632
633 # Defrag settings:
634
635 defrag:
636 memcap: 64mb
637 hash-size: 65536
638 trackers: 65535 # number of defragmented flows to follow
639 max-frags: 65535 # number of fragments to keep (higher than trackers)
640 prealloc: yes
641 timeout: 60
642
643 # Flow settings:
644 # By default, the reserved memory (memcap) for flows is 32MB. This is the limit
645 # for flow allocation inside the engine. You can change this value to allow
646 # more memory usage for flows.
647 # The hash-size determine the size of the hash used to identify flows inside
648 # the engine, and by default the value is 65536.
649 # At the startup, the engine can preallocate a number of flows, to get a better
650 # performance. The number of flows preallocated is 10000 by default.
651 # emergency-recovery is the percentage of flows that the engine need to
652 # prune before unsetting the emergency state. The emergency state is activated
653 # when the memcap limit is reached, allowing to create new flows, but
654 # prunning them with the emergency timeouts (they are defined below).
655 # If the memcap is reached, the engine will try to prune flows
656 # with the default timeouts. If it doens't find a flow to prune, it will set
657 # the emergency bit and it will try again with more agressive timeouts.
658 # If that doesn't work, then it will try to kill the last time seen flows
659 # not in use.
660 # The memcap can be specified in kb, mb, gb. Just a number indicates it's
661 # in bytes.
662
663 flow:
664 memcap: 256mb
665 hash-size: 65536
666 prealloc: 10000
667 emergency-recovery: 30
668 managers: 1
669 recyclers: 1
670
671 # This option controls the use of vlan ids in the flow (and defrag)
672 # hashing. Normally this should be enabled, but in some (broken)
673 # setups where both sides of a flow are not tagged with the same vlan
674 # tag, we can ignore the vlan id's in the flow hashing.
675 vlan:
676 use-for-tracking: true
677
678 # Specific timeouts for flows. Here you can specify the timeouts that the
679 # active flows will wait to transit from the current state to another, on each
680 # protocol. The value of "new" determine the seconds to wait after a hanshake or
681 # stream startup before the engine free the data of that flow it doesn't
682 # change the state to established (usually if we don't receive more packets
683 # of that flow). The value of "established" is the amount of
684 # seconds that the engine will wait to free the flow if it spend that amount
685 # without receiving new packets or closing the connection. "closed" is the
686 # amount of time to wait after a flow is closed (usually zero). "bypassed"
687 # timeout controls locally bypassed flows. For these flows we don't do any other
688 # tracking. If no packets have been seen after this timeout, the flow is discarded.
689 #
690 # There's an emergency mode that will become active under attack circumstances,
691 # making the engine to check flow status faster. This configuration variables
692 # use the prefix "emergency-" and work similar as the normal ones.
693 # Some timeouts doesn't apply to all the protocols, like "closed", for udp and
694 # icmp.
695
696 flow-timeouts:
697
698 default:
699 new: 30
700 established: 300
701 closed: 0
702 bypassed: 100
703 emergency-new: 10
704 emergency-established: 100
705 emergency-closed: 0
706 emergency-bypassed: 50
707 tcp:
708 new: 60
709 established: 600
710 closed: 60
711 bypassed: 100
712 emergency-new: 5
713 emergency-established: 100
714 emergency-closed: 10
715 emergency-bypassed: 50
716 udp:
717 new: 30
718 established: 300
719 bypassed: 100
720 emergency-new: 10
721 emergency-established: 100
722 emergency-bypassed: 50
723 icmp:
724 new: 30
725 established: 300
726 bypassed: 100
727 emergency-new: 10
728 emergency-established: 100
729 emergency-bypassed: 50
730
731 # Stream engine settings. Here the TCP stream tracking and reassembly
732 # engine is configured.
733 #
734 # stream:
735 # memcap: 32mb # Can be specified in kb, mb, gb. Just a
736 # # number indicates it's in bytes.
737 # checksum-validation: yes # To validate the checksum of received
738 # # packet. If csum validation is specified as
739 # # "yes", then packet with invalid csum will not
740 # # be processed by the engine stream/app layer.
741 # # Warning: locally generated trafic can be
742 # # generated without checksum due to hardware offload
743 # # of checksum. You can control the handling of checksum
744 # # on a per-interface basis via the 'checksum-checks'
745 # # option
746 # prealloc-sessions: 2k # 2k sessions prealloc'd per stream thread
747 # midstream: false # don't allow midstream session pickups
748 # async-oneside: false # don't enable async stream handling
749 # inline: no # stream inline mode
750 # drop-invalid: yes # in inline mode, drop packets that are invalid with regards to streaming engine
751 # max-synack-queued: 5 # Max different SYN/ACKs to queue
752 # bypass: no # Bypass packets when stream.depth is reached
753 #
754 # reassembly:
755 # memcap: 64mb # Can be specified in kb, mb, gb. Just a number
756 # # indicates it's in bytes.
757 # depth: 1mb # Can be specified in kb, mb, gb. Just a number
758 # # indicates it's in bytes.
759 # toserver-chunk-size: 2560 # inspect raw stream in chunks of at least
760 # # this size. Can be specified in kb, mb,
761 # # gb. Just a number indicates it's in bytes.
762 # toclient-chunk-size: 2560 # inspect raw stream in chunks of at least
763 # # this size. Can be specified in kb, mb,
764 # # gb. Just a number indicates it's in bytes.
765 # randomize-chunk-size: yes # Take a random value for chunk size around the specified value.
766 # # This lower the risk of some evasion technics but could lead
767 # # detection change between runs. It is set to 'yes' by default.
768 # randomize-chunk-range: 10 # If randomize-chunk-size is active, the value of chunk-size is
769 # # a random value between (1 - randomize-chunk-range/100)*toserver-chunk-size
770 # # and (1 + randomize-chunk-range/100)*toserver-chunk-size and the same
771 # # calculation for toclient-chunk-size.
772 # # Default value of randomize-chunk-range is 10.
773 #
774 # raw: yes # 'Raw' reassembly enabled or disabled.
775 # # raw is for content inspection by detection
776 # # engine.
777 #
778 # segment-prealloc: 2048 # number of segments preallocated per thread
779 #
780 # check-overlap-different-data: true|false
781 # # check if a segment contains different data
782 # # than what we've already seen for that
783 # # position in the stream.
784 # # This is enabled automatically if inline mode
785 # # is used or when stream-event:reassembly_overlap_different_data;
786 # # is used in a rule.
787 #
788 stream:
789 memcap: 256mb
790 prealloc-sessions: 4096
791 checksum-validation: yes # reject wrong csums
792 inline: auto # auto will use inline mode in IPS mode, yes or no set it statically
793 reassembly:
794 memcap: 256mb
795 depth: 1mb # reassemble 1mb into a stream
796 toserver-chunk-size: 2560
797 toclient-chunk-size: 2560
798 randomize-chunk-size: yes
799 raw: yes
800 segment-prealloc: 2048
801 check-overlap-different-data: true
802
803 # Host table:
804 #
805 # Host table is used by tagging and per host thresholding subsystems.
806 #
807 host:
808 hash-size: 4096
809 prealloc: 1000
810 memcap: 32mb
811
812 # IP Pair table:
813 #
814 # Used by xbits 'ippair' tracking.
815 #
816 #ippair:
817 # hash-size: 4096
818 # prealloc: 1000
819 # memcap: 32mb
820
821 # Decoder settings
822
823 decoder:
824 # Teredo decoder is known to not be completely accurate
825 # it will sometimes detect non-teredo as teredo.
826 teredo:
827 enabled: false
828
829
830 ##
831 ## Performance tuning and profiling
832 ##
833
834 # The detection engine builds internal groups of signatures. The engine
835 # allow us to specify the profile to use for them, to manage memory on an
836 # efficient way keeping a good performance. For the profile keyword you
837 # can use the words "low", "medium", "high" or "custom". If you use custom
838 # make sure to define the values at "- custom-values" as your convenience.
839 # Usually you would prefer medium/high/low.
840 #
841 # "sgh mpm-context", indicates how the staging should allot mpm contexts for
842 # the signature groups. "single" indicates the use of a single context for
843 # all the signature group heads. "full" indicates a mpm-context for each
844 # group head. "auto" lets the engine decide the distribution of contexts
845 # based on the information the engine gathers on the patterns from each
846 # group head.
847 #
848 # The option inspection-recursion-limit is used to limit the recursive calls
849 # in the content inspection code. For certain payload-sig combinations, we
850 # might end up taking too much time in the content inspection code.
851 # If the argument specified is 0, the engine uses an internally defined
852 # default limit. On not specifying a value, we use no limits on the recursion.
853 detect:
854 profile: custom
855 custom-values:
856 toclient-groups: 200
857 toserver-groups: 200
858 sgh-mpm-context: auto
859 inspection-recursion-limit: 3000
860
861 # If set to yes, the loading of signatures will be made after the capture
862 # is started. This will limit the downtime in IPS mode.
863 delayed-detect: yes
864
865 prefilter:
866 # default prefiltering setting. "mpm" only creates MPM/fast_pattern
867 # engines. "auto" also sets up prefilter engines for other keywords.
868 # Use --list-keywords=all to see which keywords support prefiltering.
869 default: mpm
870
871 # the grouping values above control how many groups are created per
872 # direction. Port whitelisting forces that port to get it's own group.
873 # Very common ports will benefit, as well as ports with many expensive
874 # rules.
875 grouping:
876 #tcp-whitelist: 53, 80, 139, 443, 445, 1433, 3306, 3389, 6666, 6667, 8080
877 #udp-whitelist: 53, 135, 5060
878
879 profiling:
880 # Log the rules that made it past the prefilter stage, per packet
881 # default is off. The threshold setting determines how many rules
882 # must have made it past pre-filter for that rule to trigger the
883 # logging.
884 #inspect-logging-threshold: 200
885 grouping:
886 dump-to-disk: false
887 include-rules: false # very verbose
888 include-mpm-stats: false
889
890 # Select the multi pattern algorithm you want to run for scan/search the
891 # in the engine.
892 #
893 # The supported algorithms are:
894 # "ac" - Aho-Corasick, default implementation
895 # "ac-bs" - Aho-Corasick, reduced memory implementation
896 # "ac-cuda" - Aho-Corasick, CUDA implementation
897 # "ac-ks" - Aho-Corasick, "Ken Steele" variant
898 # "hs" - Hyperscan, available when built with Hyperscan support
899 #
900 # The default mpm-algo value of "auto" will use "hs" if Hyperscan is
901 # available, "ac" otherwise.
902 #
903 # The mpm you choose also decides the distribution of mpm contexts for
904 # signature groups, specified by the conf - "detect.sgh-mpm-context".
905 # Selecting "ac" as the mpm would require "detect.sgh-mpm-context"
906 # to be set to "single", because of ac's memory requirements, unless the
907 # ruleset is small enough to fit in one's memory, in which case one can
908 # use "full" with "ac". Rest of the mpms can be run in "full" mode.
909 #
910 # There is also a CUDA pattern matcher (only available if Suricata was
911 # compiled with --enable-cuda: b2g_cuda. Make sure to update your
912 # max-pending-packets setting above as well if you use b2g_cuda.
913
914 mpm-algo: auto
915
916 # Select the matching algorithm you want to use for single-pattern searches.
917 #
918 # Supported algorithms are "bm" (Boyer-Moore) and "hs" (Hyperscan, only
919 # available if Suricata has been built with Hyperscan support).
920 #
921 # The default of "auto" will use "hs" if available, otherwise "bm".
922
923 spm-algo: auto
924
925 # Suricata is multi-threaded. Here the threading can be influenced.
926 threading:
927 set-cpu-affinity: no
928 # Tune cpu affinity of threads. Each family of threads can be bound
929 # on specific CPUs.
930 #
931 # These 2 apply to the all runmodes:
932 # management-cpu-set is used for flow timeout handling, counters
933 # worker-cpu-set is used for 'worker' threads
934 #
935 # Additionally, for autofp these apply:
936 # receive-cpu-set is used for capture threads
937 # verdict-cpu-set is used for IPS verdict threads
938 #
939 cpu-affinity:
940 - management-cpu-set:
941 cpu: [ 0 ] # include only these cpus in affinity settings
942 - receive-cpu-set:
943 cpu: [ 0 ] # include only these cpus in affinity settings
944 - worker-cpu-set:
945 cpu: [ "all" ]
946 mode: "exclusive"
947 prio:
948 low: [ 0 ]
949 medium: [ "1-2" ]
950 high: [ 3 ]
951 default: "medium"
952 - verdict-cpu-set:
953 cpu: [ 0 ]
954 prio:
955 default: "high"
956 #
957 # By default Suricata creates one "detect" thread per available CPU/CPU core.
958 # This setting allows controlling this behaviour. A ratio setting of 2 will
959 # create 2 detect threads for each CPU/CPU core. So for a dual core CPU this
960 # will result in 4 detect threads. If values below 1 are used, less threads
961 # are created. So on a dual core CPU a setting of 0.5 results in 1 detect
962 # thread being created. Regardless of the setting at a minimum 1 detect
963 # thread will always be created.
964 #
965 detect-thread-ratio: 1.0