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