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