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