5 ## IPFire specific configuration file - an untouched example configuration
6 ## can be found in suricata-example.yaml.
11 # Include HOME_NET declaration from external file.
12 include: /var/ipfire/suricata/suricata-homenet.yaml
16 HTTP_SERVERS: "$HOME_NET"
17 SMTP_SERVERS: "$HOME_NET"
18 SQL_SERVERS: "$HOME_NET"
19 DNS_SERVERS: "$HOME_NET"
20 TELNET_SERVERS: "$HOME_NET"
21 AIM_SERVERS: "$EXTERNAL_NET"
22 DC_SERVERS: "$HOME_NET"
23 DNP3_SERVER: "$HOME_NET"
24 DNP3_CLIENT: "$HOME_NET"
25 MODBUS_CLIENT: "$HOME_NET"
26 MODBUS_SERVER: "$HOME_NET"
27 ENIP_CLIENT: "$HOME_NET"
28 ENIP_SERVER: "$HOME_NET"
32 SHELLCODE_PORTS: "!80"
37 FILE_DATA_PORTS: "[$HTTP_PORTS,110,143]"
41 ## Ruleset specific options.
43 default-rule-path: /var/lib/suricata
45 # Include enabled ruleset files from external file.
46 include: /var/ipfire/suricata/suricata-used-rulefiles.yaml
48 classification-file: /var/lib/suricata/classification.config
49 reference-config-file: /var/lib/suricata/reference.config
50 threshold-file: /var/lib/suricata/threshold.config
56 default-log-dir: /var/log/suricata/
58 # global stats configuration
61 # The interval field (in seconds) controls at what interval
62 # the loggers are invoked.
65 # Add decode events as stats.
67 # Decoder event prefix in stats. Has been 'decoder' before, but that leads
68 # to missing events in the eve.stats records. See issue #2225.
69 decoder-events-prefix: "decoder.event"
70 # Add stream events as stats.
73 # Configure the type of alert (and other) logging you would like.
75 # a line based alerts log similar to Snort's fast.log
80 #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
82 # Stats.log contains data from various counters of the suricata engine.
86 append: no # append to file (yes) or overwrite it (no)
87 totals: yes # stats for all threads merged together
88 threads: no # per thread stats
89 #null-values: yes # print counters that have value 0
92 # The default log level, can be overridden in an output section.
93 # Note that debug level logging will only be emitted if Suricata was
94 # compiled with the --enable-debug configure option.
96 # This value is overriden by the SC_LOG_LEVEL env var.
97 default-log-level: notice
99 # A regex to filter output. Can be overridden in an output section.
100 # Defaults to empty (no filter).
102 # This value is overriden by the SC_LOG_OP_FILTER env var.
103 default-output-filter:
105 # Define your logging outputs. If none are defined, or they are all
106 # disabled you will get the default - console output.
114 filename: /var/log/suricata/suricata.log
123 ## Netfilter configuration
128 repeat-mark: 1879048192
129 repeat-mask: 1879048192
137 ## Step 5: App Layer Protocol Configuration
140 # Configure the app-layer parsers. The protocols section details each
143 # The option "enabled" takes 3 values - "yes", "no", "detection-only".
144 # "yes" enables both detection and the parser, "no" disables both, and
145 # "detection-only" enables protocol detection only (parser disabled).
149 enabled: no # Requires rust
155 dp: "[443,444,465,853,993,995]"
157 # Completely stop processing TLS/SSL session after the handshake
158 # completed. If bypass is enabled this will also trigger flow
159 # bypass. If disabled (the default), TLS/SSL session is still
160 # tracked for Heartbleed and other anomalies.
170 # Configure SMTP-MIME Decoder
172 # Decode MIME messages from SMTP transactions
173 # (may be resource intensive)
174 # This field supercedes all others because it turns the entire
178 # Decode MIME entity bodies (ie. base64, quoted-printable, etc.)
180 decode-quoted-printable: yes
182 # Maximum bytes per header data value stored in the data structure
184 header-value-depth: 2000
186 # Extract URLs and save in state data structure
188 # Set to yes to compute the md5 of the mail body. You will then
189 # be able to journalize it.
191 # Configure inspected-tracker for file_data keyword
193 content-limit: 100000
194 content-inspect-min-size: 32768
195 content-inspect-window: 4096
204 # smb2 detection is disabled internally inside the engine.
208 # memcaps. Globally and per flow/state.
212 # How many unreplied DNS requests are considered a flood.
213 # If the limit is reached, app-layer-event:dns.flooded; will match.
228 # default-config: Used when no server-config matches
229 # personality: List of personalities used by default
230 # request-body-limit: Limit reassembly of request body for inspection
231 # by http_client_body & pcre /P option.
232 # response-body-limit: Limit reassembly of response body for inspection
233 # by file_data, http_server_body & pcre /Q option.
234 # double-decode-path: Double decode path section of the URI
235 # double-decode-query: Double decode query section of the URI
236 # response-body-decompress-layer-limit:
237 # Limit to how many layers of compression will be
238 # decompressed. Defaults to 2.
240 # Currently Available Personalities:
241 # Minimal, Generic, IDS (default), IIS_4_0, IIS_5_0, IIS_5_1, IIS_6_0,
242 # IIS_7_0, IIS_7_5, Apache_2
247 # Can be specified in kb, mb, gb. Just a number indicates
249 request-body-limit: 0
250 response-body-limit: 0
252 # response body decompression (0 disables)
253 response-body-decompress-layer-limit: 2
255 # auto will use http-body-inline mode in IPS mode, yes or no set it statically
256 http-body-inline: auto
258 # Take a random value for inspection sizes around the specified value.
259 # This lower the risk of some evasion technics but could lead
260 # detection change between runs. It is set to 'yes' by default.
261 randomize-inspection-sizes: yes
262 # If randomize-inspection-sizes is active, the value of various
263 # inspection size will be choosen in the [1 - range%, 1 + range%]
265 # Default value of randomize-inspection-range is 10.
266 randomize-inspection-range: 10
269 double-decode-path: no
270 double-decode-query: no
273 # Limit for the maximum number of asn1 frames to decode (default 256)
277 ##############################################################################
279 ## Advanced settings below
281 ##############################################################################
287 # Run suricata as user and group.
292 # Suricata core dump configuration. Limits the size of the core dump file to
293 # approximately max-dump. The actual core dump size will be a multiple of the
294 # page size. Core dumps that would be larger than max-dump are truncated. On
295 # Linux, the actual core dump size may be a few pages larger than max-dump.
296 # Setting max-dump to 0 disables core dumping.
297 # Setting max-dump to 'unlimited' will give the full core dump file.
298 # On 32-bit Linux, a max-dump value >= ULONG_MAX may cause the core dump size
304 # If suricata box is a router for the sniffed networks, set it to 'router'. If
305 # it is a pure sniffing setup, set it to 'sniffer-only'.
306 # If set to auto, the variable is internally switch to 'router' in IPS mode
307 # and 'sniffer-only' in IDS mode.
308 # This feature is currently only used by the reject* keywords.
311 # Number of packets preallocated per thread. The default is 1024. A higher number
312 # will make sure each CPU will be more easily kept busy, but may negatively
314 max-pending-packets: 1024
316 # Runmode the engine should use. Please check --list-runmodes to get the available
317 # runmodes for each packet acquisition method. Defaults to "autofp" (auto flow pinned
321 # Specifies the kind of flow load balancer used by the flow pinned autofp mode.
323 # Supported schedulers are:
325 # round-robin - Flows assigned to threads in a round robin fashion.
326 # active-packets - Flows assigned to threads that have the lowest number of
327 # unprocessed packets (default).
328 # hash - Flow alloted usihng the address hash. More of a random
329 # technique. Was the default in Suricata 1.2.1 and older.
331 #autofp-scheduler: active-packets
333 # Preallocated size for packet. Default is 1514 which is the classical
334 # size for pcap on ethernet. You should adjust this value to the highest
335 # packet size (MTU + hardware header) on your system.
336 default-packet-size: 1514
338 # Unix command socket can be used to pass commands to suricata.
339 # An external tool can then connect to get information from suricata
340 # or trigger some modifications of the engine. Set enabled to yes
341 # to activate the feature. In auto mode, the feature will only be
342 # activated in live capture mode. You can use the filename variable to set
343 # the file name of the socket.
346 #filename: custom.socket
349 magic-file: /usr/share/misc/magic.mgc
355 ## Detection settings
358 # Set the order of alerts bassed on actions
359 # The default order is pass, drop, reject, alert
366 # When run with the option --engine-analysis, the engine will read each of
367 # the parameters below, and print reports for each of the enabled sections
368 # and exit. The reports are printed to a file in the default log dir
369 # given by the parameter "default-log-dir", with engine reporting
370 # subsection below printing reports in its own report file.
372 # enables printing reports for fast-pattern for every rule.
373 rules-fast-pattern: yes
374 # enables printing reports for each rule
377 #recursion and match limits for PCRE where supported
380 match-limit-recursion: 1500
383 ## Advanced Traffic Tracking and Reconstruction Settings
386 # Host specific policies for defragmentation and TCP stream
387 # reassembly. The host OS lookup is done using a radix tree, just
388 # like a routing table so the most specific entry matches.
390 # Make the default policy windows.
410 trackers: 65535 # number of defragmented flows to follow
411 max-frags: 65535 # number of fragments to keep (higher than trackers)
416 # By default, the reserved memory (memcap) for flows is 32MB. This is the limit
417 # for flow allocation inside the engine. You can change this value to allow
418 # more memory usage for flows.
419 # The hash-size determine the size of the hash used to identify flows inside
420 # the engine, and by default the value is 65536.
421 # At the startup, the engine can preallocate a number of flows, to get a better
422 # performance. The number of flows preallocated is 10000 by default.
423 # emergency-recovery is the percentage of flows that the engine need to
424 # prune before unsetting the emergency state. The emergency state is activated
425 # when the memcap limit is reached, allowing to create new flows, but
426 # prunning them with the emergency timeouts (they are defined below).
427 # If the memcap is reached, the engine will try to prune flows
428 # with the default timeouts. If it doens't find a flow to prune, it will set
429 # the emergency bit and it will try again with more agressive timeouts.
430 # If that doesn't work, then it will try to kill the last time seen flows
432 # The memcap can be specified in kb, mb, gb. Just a number indicates it's
439 emergency-recovery: 30
443 # This option controls the use of vlan ids in the flow (and defrag)
444 # hashing. Normally this should be enabled, but in some (broken)
445 # setups where both sides of a flow are not tagged with the same vlan
446 # tag, we can ignore the vlan id's in the flow hashing.
448 use-for-tracking: true
450 # Specific timeouts for flows. Here you can specify the timeouts that the
451 # active flows will wait to transit from the current state to another, on each
452 # protocol. The value of "new" determine the seconds to wait after a hanshake or
453 # stream startup before the engine free the data of that flow it doesn't
454 # change the state to established (usually if we don't receive more packets
455 # of that flow). The value of "established" is the amount of
456 # seconds that the engine will wait to free the flow if it spend that amount
457 # without receiving new packets or closing the connection. "closed" is the
458 # amount of time to wait after a flow is closed (usually zero). "bypassed"
459 # timeout controls locally bypassed flows. For these flows we don't do any other
460 # tracking. If no packets have been seen after this timeout, the flow is discarded.
462 # There's an emergency mode that will become active under attack circumstances,
463 # making the engine to check flow status faster. This configuration variables
464 # use the prefix "emergency-" and work similar as the normal ones.
465 # Some timeouts doesn't apply to all the protocols, like "closed", for udp and
476 emergency-established: 100
478 emergency-bypassed: 50
485 emergency-established: 100
487 emergency-bypassed: 50
493 emergency-established: 100
494 emergency-bypassed: 50
500 emergency-established: 100
501 emergency-bypassed: 50
503 # Stream engine settings. Here the TCP stream tracking and reassembly
504 # engine is configured.
507 # memcap: 32mb # Can be specified in kb, mb, gb. Just a
508 # # number indicates it's in bytes.
509 # checksum-validation: yes # To validate the checksum of received
510 # # packet. If csum validation is specified as
511 # # "yes", then packet with invalid csum will not
512 # # be processed by the engine stream/app layer.
513 # # Warning: locally generated trafic can be
514 # # generated without checksum due to hardware offload
515 # # of checksum. You can control the handling of checksum
516 # # on a per-interface basis via the 'checksum-checks'
518 # prealloc-sessions: 2k # 2k sessions prealloc'd per stream thread
519 # midstream: false # don't allow midstream session pickups
520 # async-oneside: false # don't enable async stream handling
521 # inline: no # stream inline mode
522 # drop-invalid: yes # in inline mode, drop packets that are invalid with regards to streaming engine
523 # max-synack-queued: 5 # Max different SYN/ACKs to queue
524 # bypass: no # Bypass packets when stream.depth is reached
527 # memcap: 64mb # Can be specified in kb, mb, gb. Just a number
528 # # indicates it's in bytes.
529 # depth: 1mb # Can be specified in kb, mb, gb. Just a number
530 # # indicates it's in bytes.
531 # toserver-chunk-size: 2560 # inspect raw stream in chunks of at least
532 # # this size. Can be specified in kb, mb,
533 # # gb. Just a number indicates it's in bytes.
534 # toclient-chunk-size: 2560 # inspect raw stream in chunks of at least
535 # # this size. Can be specified in kb, mb,
536 # # gb. Just a number indicates it's in bytes.
537 # randomize-chunk-size: yes # Take a random value for chunk size around the specified value.
538 # # This lower the risk of some evasion technics but could lead
539 # # detection change between runs. It is set to 'yes' by default.
540 # randomize-chunk-range: 10 # If randomize-chunk-size is active, the value of chunk-size is
541 # # a random value between (1 - randomize-chunk-range/100)*toserver-chunk-size
542 # # and (1 + randomize-chunk-range/100)*toserver-chunk-size and the same
543 # # calculation for toclient-chunk-size.
544 # # Default value of randomize-chunk-range is 10.
546 # raw: yes # 'Raw' reassembly enabled or disabled.
547 # # raw is for content inspection by detection
550 # segment-prealloc: 2048 # number of segments preallocated per thread
552 # check-overlap-different-data: true|false
553 # # check if a segment contains different data
554 # # than what we've already seen for that
555 # # position in the stream.
556 # # This is enabled automatically if inline mode
557 # # is used or when stream-event:reassembly_overlap_different_data;
558 # # is used in a rule.
562 prealloc-sessions: 4096
563 checksum-validation: yes # reject wrong csums
564 inline: auto # auto will use inline mode in IPS mode, yes or no set it statically
567 depth: 1mb # reassemble 1mb into a stream
568 toserver-chunk-size: 2560
569 toclient-chunk-size: 2560
570 randomize-chunk-size: yes
572 segment-prealloc: 2048
573 check-overlap-different-data: true
577 # Host table is used by tagging and per host thresholding subsystems.
586 # Used by xbits 'ippair' tracking.
596 # Teredo decoder is known to not be completely accurate
597 # it will sometimes detect non-teredo as teredo.
603 ## Performance tuning and profiling
606 # The detection engine builds internal groups of signatures. The engine
607 # allow us to specify the profile to use for them, to manage memory on an
608 # efficient way keeping a good performance. For the profile keyword you
609 # can use the words "low", "medium", "high" or "custom". If you use custom
610 # make sure to define the values at "- custom-values" as your convenience.
611 # Usually you would prefer medium/high/low.
613 # "sgh mpm-context", indicates how the staging should allot mpm contexts for
614 # the signature groups. "single" indicates the use of a single context for
615 # all the signature group heads. "full" indicates a mpm-context for each
616 # group head. "auto" lets the engine decide the distribution of contexts
617 # based on the information the engine gathers on the patterns from each
620 # The option inspection-recursion-limit is used to limit the recursive calls
621 # in the content inspection code. For certain payload-sig combinations, we
622 # might end up taking too much time in the content inspection code.
623 # If the argument specified is 0, the engine uses an internally defined
624 # default limit. On not specifying a value, we use no limits on the recursion.
630 sgh-mpm-context: auto
631 inspection-recursion-limit: 3000
633 # If set to yes, the loading of signatures will be made after the capture
634 # is started. This will limit the downtime in IPS mode.
638 # default prefiltering setting. "mpm" only creates MPM/fast_pattern
639 # engines. "auto" also sets up prefilter engines for other keywords.
640 # Use --list-keywords=all to see which keywords support prefiltering.
643 # the grouping values above control how many groups are created per
644 # direction. Port whitelisting forces that port to get it's own group.
645 # Very common ports will benefit, as well as ports with many expensive
648 #tcp-whitelist: 53, 80, 139, 443, 445, 1433, 3306, 3389, 6666, 6667, 8080
649 #udp-whitelist: 53, 135, 5060
652 # Log the rules that made it past the prefilter stage, per packet
653 # default is off. The threshold setting determines how many rules
654 # must have made it past pre-filter for that rule to trigger the
656 #inspect-logging-threshold: 200
659 include-rules: false # very verbose
660 include-mpm-stats: false
662 # Select the multi pattern algorithm you want to run for scan/search the
665 # The supported algorithms are:
666 # "ac" - Aho-Corasick, default implementation
667 # "ac-bs" - Aho-Corasick, reduced memory implementation
668 # "ac-cuda" - Aho-Corasick, CUDA implementation
669 # "ac-ks" - Aho-Corasick, "Ken Steele" variant
670 # "hs" - Hyperscan, available when built with Hyperscan support
672 # The default mpm-algo value of "auto" will use "hs" if Hyperscan is
673 # available, "ac" otherwise.
675 # The mpm you choose also decides the distribution of mpm contexts for
676 # signature groups, specified by the conf - "detect.sgh-mpm-context".
677 # Selecting "ac" as the mpm would require "detect.sgh-mpm-context"
678 # to be set to "single", because of ac's memory requirements, unless the
679 # ruleset is small enough to fit in one's memory, in which case one can
680 # use "full" with "ac". Rest of the mpms can be run in "full" mode.
682 # There is also a CUDA pattern matcher (only available if Suricata was
683 # compiled with --enable-cuda: b2g_cuda. Make sure to update your
684 # max-pending-packets setting above as well if you use b2g_cuda.
688 # Select the matching algorithm you want to use for single-pattern searches.
690 # Supported algorithms are "bm" (Boyer-Moore) and "hs" (Hyperscan, only
691 # available if Suricata has been built with Hyperscan support).
693 # The default of "auto" will use "hs" if available, otherwise "bm".
697 # Suricata is multi-threaded. Here the threading can be influenced.
700 # Tune cpu affinity of threads. Each family of threads can be bound
703 # These 2 apply to the all runmodes:
704 # management-cpu-set is used for flow timeout handling, counters
705 # worker-cpu-set is used for 'worker' threads
707 # Additionally, for autofp these apply:
708 # receive-cpu-set is used for capture threads
709 # verdict-cpu-set is used for IPS verdict threads
712 - management-cpu-set:
713 cpu: [ 0 ] # include only these cpus in affinity settings
715 cpu: [ 0 ] # include only these cpus in affinity settings
729 # By default Suricata creates one "detect" thread per available CPU/CPU core.
730 # This setting allows controlling this behaviour. A ratio setting of 2 will
731 # create 2 detect threads for each CPU/CPU core. So for a dual core CPU this
732 # will result in 4 detect threads. If values below 1 are used, less threads
733 # are created. So on a dual core CPU a setting of 0.5 results in 1 detect
734 # thread being created. Regardless of the setting at a minimum 1 detect
735 # thread will always be created.
737 detect-thread-ratio: 1.0