]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - suricata/suricata.conf
suricata: Added default config file.
[people/amarx/ipfire-3.x.git] / suricata / suricata.conf
CommitLineData
272bae8f
CS
1%YAML 1.1
2---
3# Suricata Emergingthreats Pro Open Rulesets Recommended
4
5# Number of packets allowed to be processed simultaneously. Default is a
6# conservative 50. a higher number will make sure CPU's/CPU cores will be
7# more easily kept busy, but will negatively impact caching.
8#
9# If you are using the CUDA pattern matcher (b2g_cuda below), different rules
10# apply. In that case try something like 4000 or more. This is because the CUDA
11# pattern matcher scans many packets in parallel.
12#max-pending-packets: 50
13
14# Set the order of alerts bassed on actions
15# The default order is pass, drop, reject, alert
16action-order:
17 - pass
18 - drop
19 - reject
20 - alert
21
22
23# The default logging directory. Any log or output file will be
24# placed here if its not specified with a full path name. This can be
25# overridden with the -l command line parameter.
26default-log-dir: /var/log/suricata
27
28# Configure the type of alert (and other) logging you would like.
29outputs:
30
31 # a line based alerts log similar to Snort's fast.log
32 - fast:
33 enabled: yes
34 filename: fast.log
35
36 # log output for use with Barnyard
37 - unified-log:
38 enabled: no
39 filename: unified.log
40
41 # Limit in MB.
42 #limit: 32
43
44 # alert output for use with Barnyard
45 - unified-alert:
46 enabled: no
47 filename: unified.alert
48
49 # Limit in MB.
50 #limit: 32
51
52 # alert output for use with Barnyard2
53 - unified2-alert:
54 enabled: no
55 filename: unified2.alert
56
57 # Limit in MB.
58 #limit: 32
59
60 # a line based log of HTTP requests (no alerts)
61 - http-log:
62 enabled: yes
63 filename: http.log
64
65 # a full alerts log containing much information for signature writers
66 # or for investigating suspected false positives.
67 - alert-debug:
68 enabled: no
69 filename: alert-debug.log
70
71 # alert output to prelude (http://www.prelude-technologies.com/) only
72 # available if Suricata has been compiled with --enable-prelude
73 - alert-prelude:
74 enabled: no
75 profile: suricata
76
77defrag:
78 max-frags: 65535
79 prealloc: yes
80 timeout: 60
81
82# You can specify a threshold config file by setting "threshold-file"
83# to the path of the threshold config file:
84# threshold-file: /etc/suricata/threshold.config
85
86# The detection engine builds internal groups of signatures. The engine
87# allow us to specify the profile to use for them, to manage memory on an
88# efficient way keeping a good performance. For the profile keyword you
89# can use the words "low", "medium", "high" or "custom". If you use custom
90# make sure to define the values at "- custom-values" as your convenience.
91# Usually you would prefer medium/high/low
92detect-engine:
93 - profile: medium
94 - custom-values:
95 toclient_src_groups: 2
96 toclient_dst_groups: 2
97 toclient_sp_groups: 2
98 toclient_dp_groups: 3
99 toserver_src_groups: 2
100 toserver_dst_groups: 4
101 toserver_sp_groups: 2
102 toserver_dp_groups: 25
103
104# Suricata is multi-threaded. Here the threading can be influenced.
105threading:
106 # On some cpu's/architectures it is beneficial to tie individual threads
107 # to specific CPU's/CPU cores. In this case all threads are tied to CPU0,
108 # and each extra CPU/core has one "detect" thread.
109 #
110 # On Intel Core2 and Nehalem CPU's enabling this will degrade performance.
111 #
112 set_cpu_affinity: no
113 #
114 # By default Suricata creates one "detect" thread per available CPU/CPU core.
115 # This setting allows controlling this behaviour. A ratio setting of 2 will
116 # create 2 detect threads for each CPU/CPU core. So for a dual core CPU this
117 # will result in 4 detect threads. If values below 1 are used, less threads
118 # are created. So on a dual core CPU a setting of 0.5 results in 1 detect
119 # thread being created. Regardless of the setting at a minimum 1 detect
120 # thread will always be created.
121 #
122 detect_thread_ratio: 1.5
123
124# Select the cuda device to use. The device_id identifies the device to be used
125# if one has multiple devices on the system. To find out device_id associated
126# with the card(s) on the system run "suricata --list-cuda-cards".
127cuda:
128 device_id: 0
129
130# Select the multi pattern algorithm you want to run for scan/search the
131# in the engine. The supported algorithms are b2g, b3g and wumanber.
132#
133# There is also a CUDA pattern matcher (only available if Suricata was
134# compiled with --enable-cuda: b2g_cuda. Make sure to update your
135# max-pending-packets setting above as well if you use b2g_cuda.
136
137mpm-algo: b2g
138
139# The memory settings for hash size of these algorithms can vary from lowest
140# (2048) - low (4096) - medium (8192) - high (16384) - highest (32768) - max
141# (65536). The bloomfilter sizes of these algorithms can vary from low (512) -
142# medium (1024) - high (2048).
143#
144# For B2g/B3g algorithms, there is a support for two different scan/search
145# algorithms. For B2g the scan algorithms are B2gScan & B2gScanBNDMq, and
146# search algorithms are B2gSearch & B2gSearchBNDMq. For B3g scan algorithms
147# are B3gScan & B3gScanBNDMq, and search algorithms are B3gSearch &
148# B3gSearchBNDMq.
149#
150# For B2g the different scan/search algorithms and, hash and bloom
151# filter size settings. For B3g the different scan/search algorithms and, hash
152# and bloom filter size settings. For wumanber the hash and bloom filter size
153# settings.
154
155pattern-matcher:
156 - b2g:
157 scan_algo: B2gScanBNDMq
158 search_algo: B2gSearchBNDMq
159 hash_size: low
160 bf_size: medium
161 - b3g:
162 scan_algo: B3gScanBNDMq
163 search_algo: B3gSearchBNDMq
164 hash_size: low
165 bf_size: medium
166 - wumanber:
167 hash_size: low
168 bf_size: medium
169
170# Flow settings:
171# By default, the reserved memory (memcap) for flows is 32MB. This is the limit
172# for flow allocation inside the engine. You can change this value to allow
173# more memory usage for flows.
174# The hash_size determine the size of the hash used to identify flows inside
175# the engine, and by default the value is 65536.
176# At the startup, the engine can preallocate a number of flows, to get a better
177# performance. The number of flows preallocated is 10000 by default.
178# emergency_recovery is the percentage of flows that the engine need to
179# prune before unsetting the emergency state. The emergency state is activated
180# when the memcap limit is reached, allowing to create new flows, but
181# prunning them with the emergency timeouts (they are defined below).
182# If the memcap is reached, the engine will try to prune prune_flows
183# with the default timeouts. If it doens't find a flow to prune, it will set
184# the emergency bit and it will try again with more agressive timeouts.
185# If that doesn't work, then it will try to kill the last time seen flows
186# not in use.
187
188flow:
189 memcap: 33554432
190 hash_size: 65536
191 prealloc: 10000
192 emergency_recovery: 30
193 prune_flows: 5
194
195# Specific timeouts for flows. Here you can specify the timeouts that the
196# active flows will wait to transit from the current state to another, on each
197# protocol. The value of "new" determine the seconds to wait after a hanshake or
198# stream startup before the engine free the data of that flow it doesn't
199# change the state to established (usually if we don't receive more packets
200# of that flow). The value of "established" is the amount of
201# seconds that the engine will wait to free the flow if it spend that amount
202# without receiving new packets or closing the connection. "closed" is the
203# amount of time to wait after a flow is closed (usually zero).
204#
205# There's an emergency mode that will become active under attack circumstances,
206# making the engine to check flow status faster. This configuration variables
207# use the prefix "emergency_" and work similar as the normal ones.
208# Some timeouts doesn't apply to all the protocols, like "closed", for udp and
209# icmp.
210
211flow-timeouts:
212
213 default:
214 new: 30
215 established: 300
216 closed: 0
217 emergency_new: 10
218 emergency_established: 100
219 emergency_closed: 0
220 tcp:
221 new: 60
222 established: 3600
223 closed: 120
224 emergency_new: 10
225 emergency_established: 300
226 emergency_closed: 20
227 udp:
228 new: 30
229 established: 300
230 emergency_new: 10
231 emergency_established: 100
232 icmp:
233 new: 30
234 established: 300
235 emergency_new: 10
236 emergency_established: 100
237
238# Stream engine settings. Here the TCP stream tracking and reaasembly
239# engine is configured.
240#
241# stream:
242# memcap: 33554432 # 32mb tcp session memcap
243# checksum_validation: yes # To validate the checksum of received
244 # packet. If csum validation is specified as
245 # "yes", then packet with invalid csum will not
246 # be processed by the engine stream/app layer.
247# max_sessions: 262144 # 256k concurrent sessions
248# prealloc_sessions: 32768 # 32k sessions prealloc'd
249# midstream: false # don't allow midstream session pickups
250# async_oneside: false # don't enable async stream handling
251# reassembly:
252# memcap: 67108864 # 64mb tcp reassembly memcap
253# depth: 1048576 # 1 MB reassembly depth
254stream:
255 memcap: 33554432
256 checksum_validation: yes
257 reassembly:
258 memcap: 67108864
259 depth: 1048576
260
261# Logging configuration. This is not about logging IDS alerts, but
262# IDS output about what its doing, errors, etc.
263logging:
264
265 # The default log level, can be overridden in an output section.
266 # Note that debug level logging will only be emitted if Suricata was
267 # compiled with the --enable-debug configure option.
268 #
269 # This value is overriden by the SC_LOG_LEVEL env var.
270 default-log-level: info
271
272 # The default output format. Optional parameter, should default to
273 # something reasonable if not provided. Can be overriden in an
274 # output section. You can leave this out to get the default.
275 #
276 # This value is overriden by the SC_LOG_FORMAT env var.
277 #default-log-format: "[%i] %t - (%f:%l) <%d> (%n) -- "
278
279 # A regex to filter output. Can be overridden in an output section.
280 # Defaults to empty (no filter).
281 #
282 # This value is overriden by the SC_LOG_OP_FILTER env var.
283 default-output-filter:
284
285 # Define your logging outputs. If none are defined, or they are all
286 # disabled you will get the default - console output.
287 outputs:
288 - console:
289 enabled: yes
290 - file:
291 enabled: yes
292 filename: /var/log/suricata.log
293 - syslog:
294 enabled: no
295 facility: local5
296 format: "[%i] <%d> -- "
297
298# PF_RING configuration. for use with native PF_RING support
299# for more info see http://www.ntop.org/PF_RING.html
300pfring:
301
302 # Default interface we will listen on.
303 interface: eth0
304
305 # Default clusterid. PF_RING will load balance packets based on flow.
306 # All threads/processes that will participate need to have the same
307 # clusterid.
308 cluster-id: 99
309
310 # Default PF_RING cluster type. PF_RING can load balance per flow or per hash.
311 # This is only supported in versions of PF_RING > 4.1.1.
312 cluster-type: cluster_round_robin
313
314# For FreeBSD ipfw(8) divert(4) support.
315# Please make sure you have ipfw_load="YES" and ipdivert_load="YES"
316# in /etc/loader.conf or kldload'ing the appropriate kernel modules.
317# Additionally, you need to have an ipfw rule for the engine to see
318# the packets from ipfw. For Example:
319#
320# ipfw add 100 divert 8000 ip from any to any
321#
322# The 8000 above should be the same number you passed on the command
323# line, i.e. -d 8000
324#
325ipfw:
326
327 # Reinject packets at the specified ipfw rule number. This config
328 # option is the ipfw rule number AT WHICH rule processing continues
329 # in the ipfw processing system after the engine has finished
330 # inspecting the packet for acceptance. If no rule number is specified,
331 # accepted packets are reinjected at the divert rule which they entered
332 # and IPFW rule processing continues. No check is done to verify
333 # this will rule makes sense so care must be taken to avoid loops in ipfw.
334 #
335 ## The following example tells the engine to reinject packets
336 # back into the ipfw firewall AT rule number 5500:
337 #
338 # ipfw-reinjection-rule-number: 5500
339
340# Set the default rule path here to search for the files.
341# if not set, it will look at the current working dir
342default-rule-path: /etc/suricata/rules/
343rule-files:
344# - emerging-ftp.rules
345# - emerging-policy.rules
346# - emerging-trojan.rules
347# - emerging-games.rules
348# - emerging-pop3.rules
349# - emerging-user_agents.rules
350# - emerging-activex.rules
351# - emerging-rpc.rules
352# - emerging-virus.rules
353# - emerging-attack_response.rules
354# - emerging-icmp.rules
355# - emerging-scan.rules
356# - emerging-scada.rules
357# - emerging-voip.rules
358# - emerging-chat.rules
359# - emerging-icmp_info.rules
360# - emerging-shellcode.rules
361# - emerging-web_client.rules
362# - emerging-imap.rules
363# - emerging-web_server.rules
364# - emerging-current_events.rules
365# - emerging-inappropriate.rules
366# - emerging-smtp.rules
367# - emerging-web_specific_apps.rules
368# - emerging-deleted.rules
369# - emerging-malware.rules
370# - emerging-snmp.rules
371# - emerging-worm.rules
372# - emerging-dns.rules
373# - emerging-misc.rules
374# - emerging-sql.rules
375# - emerging-dos.rules
376# - emerging-netbios.rules
377# - emerging-telnet.rules
378# - emerging-exploit.rules
379# - emerging-p2p.rules
380# - emerging-tftp.rules
381# - emerging-botcc.rules
382# - emerging-compromised.rules
383# - emerging-drop.rules
384# - emerging-dshield.rules
385# - emerging-rbn.rules
386# - emerging-rbn-malvertisers.rules
387# - emerging-tor.rules
388# - emerging-mobile_malware.rules
389
390classification-file: /etc/suricata/classification.config
391
392# Holds variables that would be used by the engine.
393vars:
394
395 # Holds the address group vars that would be passed in a Signature.
396 # These would be retrieved during the Signature address parsing stage.
397 address-groups:
398
399 HOME_NET: "[192.168.0.0/16,10.0.0.0/8,172.16.0.0/12]"
400
401 EXTERNAL_NET: any
402
403 HTTP_SERVERS: "$HOME_NET"
404
405 SMTP_SERVERS: "$HOME_NET"
406
407 SQL_SERVERS: "$HOME_NET"
408
409 DNS_SERVERS: "$HOME_NET"
410
411 TELNET_SERVERS: "$HOME_NET"
412
413 AIM_SERVERS: any
414
415#These vars are required if you're using the Digitalbond Scada signatures in the scada.rules category
416# DNP3_SERVER: "$HOME_NET"
417# DNP3_CLIENT: "$HOME_NET"
418# MODBUS_CLIENT: "$HOME_NET"
419# MODBUS_SERVER: "$HOME_NET"
420# ENIP_CLIENT: "$HOME_NET"
421# ENIP_SERVER: "$HOME_NET"
422
423
424 # Holds the port group vars that would be passed in a Signature.
425 # These would be retrieved during the Signature port parsing stage.
426 port-groups:
427
428 HTTP_PORTS: "80"
429
430 SHELLCODE_PORTS: "!80"
431
432 ORACLE_PORTS: 1521
433
434 SSH_PORTS: 22
435
436# DNP3_PORTS: 20000
437
438# Host specific policies for defragmentation and TCP stream
439# reassembly. The host OS lookup is done using a radix tree, just
440# like a routing table so the most specific entry matches.
441host-os-policy:
442 # Make the default policy windows.
443 windows: [0.0.0.0/0]
444 bsd: []
445 bsd_right: []
446 old_linux: []
447 linux: [10.0.0.0/8, 192.168.1.100, "8762:2352:6241:7245:E000:0000:0000:0000"]
448 old_solaris: []
449 solaris: ["::1"]
450 hpux10: []
451 hpux11: []
452 irix: []
453 macos: []
454 vista: []
455 windows2k3: []
456
457###########################################################################
458# Configure libhtp.
459#
460#
461# default-config: Used when no server-config matches
462# personality: List of personalities used by default
463#
464# server-config: List of server configurations to use if address matches
465# address: List of ip addresses or networks for this block
466# personalitiy: List of personalities used by this block
467#
468# Currently Available Personalities:
469# Minimal
470# Generic
471# IDS (default)
472# IIS_4_0
473# IIS_5_0
474# IIS_5_1
475# IIS_6_0
476# IIS_7_0
477# IIS_7_5
478# Apache
479# Apache_2_2
480###########################################################################
481libhtp:
482
483 default-config:
484 personality: IDS
485
486 server-config:
487
488 - apache:
489 address: [192.168.1.0/24, 127.0.0.0/8, "::1"]
490 personality: Apache_2_2
491
492 - iis7:
493 address:
494 - 192.168.0.0/24
495 - 192.168.10.0/24
496 personality: IIS_7_0
497
498# rule profiling settings. Only effective if Suricata has been built with the
499# the --enable-profiling configure flag.
500#
501profiling:
502
503 rules:
504
505 # Profiling can be disabled here, but it will still have a
506 # performance impact if compiled in.
507 enabled: yes
508
509 # Sort options: ticks, avgticks, checks, matches
510 sort: avgticks
511
512 # Limit the number of items printed at exit.
513 limit: 100
514
515