imherenotyet

/etc/suricata/suricata.yaml

Jun 22nd, 2023
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 75.79 KB | None | 0 0
  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://suricata.readthedocs.io/en/latest/configuration/suricata-yaml.html
  7.  
  8. # This configuration file generated by Suricata 6.0.12.
  9. suricata-version: "6.0"
  10.  
  11. ##
  12. ## Step 1: Inform Suricata about your network
  13. ##
  14.  
  15. vars:
  16. # more specific is better for alert accuracy and performance
  17. address-groups:
  18. HOME_NET: "[192.168.0.0/16,10.0.0.0/8,172.16.0.0/12]"
  19. #HOME_NET: "[192.168.0.0/16]"
  20. #HOME_NET: "[10.0.0.0/8]"
  21. #HOME_NET: "[172.16.0.0/12]"
  22. #HOME_NET: "any"
  23.  
  24. EXTERNAL_NET: "!$HOME_NET"
  25. #EXTERNAL_NET: "any"
  26.  
  27. HTTP_SERVERS: "$HOME_NET"
  28. SMTP_SERVERS: "$HOME_NET"
  29. SQL_SERVERS: "$HOME_NET"
  30. DNS_SERVERS: "$HOME_NET"
  31. TELNET_SERVERS: "$HOME_NET"
  32. AIM_SERVERS: "$EXTERNAL_NET"
  33. DC_SERVERS: "$HOME_NET"
  34. DNP3_SERVER: "$HOME_NET"
  35. DNP3_CLIENT: "$HOME_NET"
  36. MODBUS_CLIENT: "$HOME_NET"
  37. MODBUS_SERVER: "$HOME_NET"
  38. ENIP_CLIENT: "$HOME_NET"
  39. ENIP_SERVER: "$HOME_NET"
  40.  
  41. port-groups:
  42. HTTP_PORTS: "80"
  43. SHELLCODE_PORTS: "!80"
  44. ORACLE_PORTS: 1521
  45. SSH_PORTS: 22
  46. DNP3_PORTS: 20000
  47. MODBUS_PORTS: 502
  48. FILE_DATA_PORTS: "[$HTTP_PORTS,110,143]"
  49. FTP_PORTS: 21
  50. GENEVE_PORTS: 6081
  51. VXLAN_PORTS: 4789
  52. TEREDO_PORTS: 3544
  53.  
  54. ##
  55. ## Step 2: Select outputs to enable
  56. ##
  57.  
  58. # The default logging directory. Any log or output file will be
  59. # placed here if it's not specified with a full path name. This can be
  60. # overridden with the -l command line parameter.
  61. default-log-dir: /var/log/suricata
  62.  
  63. # Global stats configuration
  64. stats:
  65. enabled: yes
  66. # The interval field (in seconds) controls the interval at
  67. # which stats are updated in the log.
  68. interval: 8
  69. # Add decode events to stats.
  70. #decoder-events: true
  71. # Decoder event prefix in stats. Has been 'decoder' before, but that leads
  72. # to missing events in the eve.stats records. See issue #2225.
  73. #decoder-events-prefix: "decoder.event"
  74. # Add stream events as stats.
  75. #stream-events: false
  76.  
  77. # Configure the type of alert (and other) logging you would like.
  78. outputs:
  79. # a line based alerts log similar to Snort's fast.log
  80. - fast:
  81. enabled: yes
  82. filename: fast.log
  83. append: yes
  84. #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
  85.  
  86. # Extensible Event Format (nicknamed EVE) event log in JSON format
  87. - eve-log:
  88. enabled: yes
  89. filetype: regular #regular|syslog|unix_dgram|unix_stream|redis
  90. filename: eve.json
  91. # Enable for multi-threaded eve.json output; output files are amended with
  92. # with an identifier, e.g., eve.9.json
  93. #threaded: false
  94. #prefix: "@cee: " # prefix to prepend to each log entry
  95. # the following are valid when type: syslog above
  96. #identity: "suricata"
  97. #facility: local5
  98. #level: Info ## possible levels: Emergency, Alert, Critical,
  99. ## Error, Warning, Notice, Info, Debug
  100. #ethernet: no # log ethernet header in events when available
  101. #redis:
  102. # server: 127.0.0.1
  103. # port: 6379
  104. # async: true ## if redis replies are read asynchronously
  105. # mode: list ## possible values: list|lpush (default), rpush, channel|publish
  106. # ## lpush and rpush are using a Redis list. "list" is an alias for lpush
  107. # ## publish is using a Redis channel. "channel" is an alias for publish
  108. # key: suricata ## key or channel to use (default to suricata)
  109. # Redis pipelining set up. This will enable to only do a query every
  110. # 'batch-size' events. This should lower the latency induced by network
  111. # connection at the cost of some memory. There is no flushing implemented
  112. # so this setting should be reserved to high traffic Suricata deployments.
  113. # pipelining:
  114. # enabled: yes ## set enable to yes to enable query pipelining
  115. # batch-size: 10 ## number of entries to keep in buffer
  116.  
  117. # Include top level metadata. Default yes.
  118. #metadata: no
  119.  
  120. # include the name of the input pcap file in pcap file processing mode
  121. pcap-file: false
  122.  
  123. # Community Flow ID
  124. # Adds a 'community_id' field to EVE records. These are meant to give
  125. # records a predictable flow ID that can be used to match records to
  126. # output of other tools such as Zeek (Bro).
  127. #
  128. # Takes a 'seed' that needs to be same across sensors and tools
  129. # to make the id less predictable.
  130.  
  131. # enable/disable the community id feature.
  132. community-id: false
  133. # Seed value for the ID output. Valid values are 0-65535.
  134. community-id-seed: 0
  135.  
  136. # HTTP X-Forwarded-For support by adding an extra field or overwriting
  137. # the source or destination IP address (depending on flow direction)
  138. # with the one reported in the X-Forwarded-For HTTP header. This is
  139. # helpful when reviewing alerts for traffic that is being reverse
  140. # or forward proxied.
  141. xff:
  142. enabled: no
  143. # Two operation modes are available: "extra-data" and "overwrite".
  144. mode: extra-data
  145. # Two proxy deployments are supported: "reverse" and "forward". In
  146. # a "reverse" deployment the IP address used is the last one, in a
  147. # "forward" deployment the first IP address is used.
  148. deployment: reverse
  149. # Header name where the actual IP address will be reported. If more
  150. # than one IP address is present, the last IP address will be the
  151. # one taken into consideration.
  152. header: X-Forwarded-For
  153.  
  154. types:
  155. - alert:
  156. # payload: yes # enable dumping payload in Base64
  157. # payload-buffer-size: 4kb # max size of payload buffer to output in eve-log
  158. # payload-printable: yes # enable dumping payload in printable (lossy) format
  159. # packet: yes # enable dumping of packet (without stream segments)
  160. # metadata: no # enable inclusion of app layer metadata with alert. Default yes
  161. # http-body: yes # Requires metadata; enable dumping of HTTP body in Base64
  162. # http-body-printable: yes # Requires metadata; enable dumping of HTTP body in printable format
  163.  
  164. # Enable the logging of tagged packets for rules using the
  165. # "tag" keyword.
  166. tagged-packets: yes
  167. - anomaly:
  168. # Anomaly log records describe unexpected conditions such
  169. # as truncated packets, packets with invalid IP/UDP/TCP
  170. # length values, and other events that render the packet
  171. # invalid for further processing or describe unexpected
  172. # behavior on an established stream. Networks which
  173. # experience high occurrences of anomalies may experience
  174. # packet processing degradation.
  175. #
  176. # Anomalies are reported for the following:
  177. # 1. Decode: Values and conditions that are detected while
  178. # decoding individual packets. This includes invalid or
  179. # unexpected values for low-level protocol lengths as well
  180. # as stream related events (TCP 3-way handshake issues,
  181. # unexpected sequence number, etc).
  182. # 2. Stream: This includes stream related events (TCP
  183. # 3-way handshake issues, unexpected sequence number,
  184. # etc).
  185. # 3. Application layer: These denote application layer
  186. # specific conditions that are unexpected, invalid or are
  187. # unexpected given the application monitoring state.
  188. #
  189. # By default, anomaly logging is enabled. When anomaly
  190. # logging is enabled, applayer anomaly reporting is
  191. # also enabled.
  192. enabled: yes
  193. #
  194. # Choose one or more types of anomaly logging and whether to enable
  195. # logging of the packet header for packet anomalies.
  196. types:
  197. # decode: no
  198. # stream: no
  199. # applayer: yes
  200. #packethdr: no
  201. - http:
  202. extended: yes # enable this for extended logging information
  203. # custom allows additional HTTP fields to be included in eve-log.
  204. # the example below adds three additional fields when uncommented
  205. #custom: [Accept-Encoding, Accept-Language, Authorization]
  206. # set this value to one and only one from {both, request, response}
  207. # to dump all HTTP headers for every HTTP request and/or response
  208. # dump-all-headers: none
  209. - dns:
  210. # This configuration uses the new DNS logging format,
  211. # the old configuration is still available:
  212. # https://suricata.readthedocs.io/en/latest/output/eve/eve-json-output.html#dns-v1-format
  213.  
  214. # As of Suricata 5.0, version 2 of the eve dns output
  215. # format is the default.
  216. #version: 2
  217.  
  218. # Enable/disable this logger. Default: enabled.
  219. #enabled: yes
  220.  
  221. # Control logging of requests and responses:
  222. # - requests: enable logging of DNS queries
  223. # - responses: enable logging of DNS answers
  224. # By default both requests and responses are logged.
  225. #requests: no
  226. #responses: no
  227.  
  228. # Format of answer logging:
  229. # - detailed: array item per answer
  230. # - grouped: answers aggregated by type
  231. # Default: all
  232. #formats: [detailed, grouped]
  233.  
  234. # DNS record types to log, based on the query type.
  235. # Default: all.
  236. #types: [a, aaaa, cname, mx, ns, ptr, txt]
  237. - tls:
  238. extended: yes # enable this for extended logging information
  239. # output TLS transaction where the session is resumed using a
  240. # session id
  241. #session-resumption: no
  242. # custom controls which TLS fields that are included in eve-log
  243. #custom: [subject, issuer, session_resumed, serial, fingerprint, sni, version, not_before, not_after, certificate, chain, ja3, ja3s]
  244. - files:
  245. force-magic: no # force logging magic on all logged files
  246. # force logging of checksums, available hash functions are md5,
  247. # sha1 and sha256
  248. #force-hash: [md5]
  249. - drop:
  250. alerts: yes # log alerts that caused drops
  251. flows: all # start or all: 'start' logs only a single drop
  252. # # per flow direction. All logs each dropped pkt.
  253. - smtp:
  254. #extended: yes # enable this for extended logging information
  255. # this includes: bcc, message-id, subject, x_mailer, user-agent
  256. # custom fields logging from the list:
  257. # reply-to, bcc, message-id, subject, x-mailer, user-agent, received,
  258. # x-originating-ip, in-reply-to, references, importance, priority,
  259. # sensitivity, organization, content-md5, date
  260. #custom: [received, x-mailer, x-originating-ip, relays, reply-to, bcc]
  261. # output md5 of fields: body, subject
  262. # for the body you need to set app-layer.protocols.smtp.mime.body-md5
  263. # to yes
  264. #md5: [body, subject]
  265.  
  266. #- dnp3
  267. - ftp
  268. - rdp
  269. - nfs
  270. - smb
  271. - tftp
  272. - ikev2
  273. - dcerpc
  274. - krb5
  275. - snmp
  276. - rfb
  277. - sip
  278. - dhcp:
  279. enabled: yes
  280. # When extended mode is on, all DHCP messages are logged
  281. # with full detail. When extended mode is off (the
  282. # default), just enough information to map a MAC address
  283. # to an IP address is logged.
  284. extended: no
  285. - ssh
  286. - mqtt:
  287. # passwords: yes # enable output of passwords
  288. # HTTP2 logging. HTTP2 support is currently experimental and
  289. # disabled by default. To enable, uncomment the following line
  290. # and be sure to enable http2 in the app-layer section.
  291. #- http2
  292. - stats:
  293. totals: yes # stats for all threads merged together
  294. threads: no # per thread stats
  295. deltas: no # include delta values
  296. # bi-directional flows
  297. - flow
  298. # uni-directional flows
  299. #- netflow
  300.  
  301. # Metadata event type. Triggered whenever a pktvar is saved
  302. # and will include the pktvars, flowvars, flowbits and
  303. # flowints.
  304. #- metadata
  305.  
  306. # a line based log of HTTP requests (no alerts)
  307. - http-log:
  308. enabled: no
  309. filename: http.log
  310. append: yes
  311. #extended: yes # enable this for extended logging information
  312. #custom: yes # enable the custom logging format (defined by customformat)
  313. #customformat: "%{%D-%H:%M:%S}t.%z %{X-Forwarded-For}i %H %m %h %u %s %B %a:%p -> %A:%P"
  314. #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
  315.  
  316. # a line based log of TLS handshake parameters (no alerts)
  317. - tls-log:
  318. enabled: no # Log TLS connections.
  319. filename: tls.log # File to store TLS logs.
  320. append: yes
  321. #extended: yes # Log extended information like fingerprint
  322. #custom: yes # enabled the custom logging format (defined by customformat)
  323. #customformat: "%{%D-%H:%M:%S}t.%z %a:%p -> %A:%P %v %n %d %D"
  324. #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
  325. # output TLS transaction where the session is resumed using a
  326. # session id
  327. #session-resumption: no
  328.  
  329. # output module to store certificates chain to disk
  330. - tls-store:
  331. enabled: no
  332. #certs-log-dir: certs # directory to store the certificates files
  333.  
  334. # Packet log... log packets in pcap format. 3 modes of operation: "normal"
  335. # "multi" and "sguil".
  336. #
  337. # In normal mode a pcap file "filename" is created in the default-log-dir,
  338. # or as specified by "dir".
  339. # In multi mode, a file is created per thread. This will perform much
  340. # better, but will create multiple files where 'normal' would create one.
  341. # In multi mode the filename takes a few special variables:
  342. # - %n -- thread number
  343. # - %i -- thread id
  344. # - %t -- timestamp (secs or secs.usecs based on 'ts-format'
  345. # E.g. filename: pcap.%n.%t
  346. #
  347. # Note that it's possible to use directories, but the directories are not
  348. # created by Suricata. E.g. filename: pcaps/%n/log.%s will log into the
  349. # per thread directory.
  350. #
  351. # Also note that the limit and max-files settings are enforced per thread.
  352. # So the size limit when using 8 threads with 1000mb files and 2000 files
  353. # is: 8*1000*2000 ~ 16TiB.
  354. #
  355. # In Sguil mode "dir" indicates the base directory. In this base dir the
  356. # pcaps are created in the directory structure Sguil expects:
  357. #
  358. # $sguil-base-dir/YYYY-MM-DD/$filename.<timestamp>
  359. #
  360. # By default all packets are logged except:
  361. # - TCP streams beyond stream.reassembly.depth
  362. # - encrypted streams after the key exchange
  363. #
  364. - pcap-log:
  365. enabled: no
  366. filename: log.pcap
  367.  
  368. # File size limit. Can be specified in kb, mb, gb. Just a number
  369. # is parsed as bytes.
  370. limit: 1000mb
  371.  
  372. # If set to a value, ring buffer mode is enabled. Will keep maximum of
  373. # "max-files" of size "limit"
  374. max-files: 2000
  375.  
  376. # Compression algorithm for pcap files. Possible values: none, lz4.
  377. # Enabling compression is incompatible with the sguil mode. Note also
  378. # that on Windows, enabling compression will *increase* disk I/O.
  379. compression: none
  380.  
  381. # Further options for lz4 compression. The compression level can be set
  382. # to a value between 0 and 16, where higher values result in higher
  383. # compression.
  384. #lz4-checksum: no
  385. #lz4-level: 0
  386.  
  387. mode: normal # normal, multi or sguil.
  388.  
  389. # Directory to place pcap files. If not provided the default log
  390. # directory will be used. Required for "sguil" mode.
  391. #dir: /nsm_data/
  392.  
  393. #ts-format: usec # sec or usec second format (default) is filename.sec usec is filename.sec.usec
  394. use-stream-depth: no #If set to "yes" packets seen after reaching stream inspection depth are ignored. "no" logs all packets
  395. honor-pass-rules: no # If set to "yes", flows in which a pass rule matched will stop being logged.
  396.  
  397. # a full alert log containing much information for signature writers
  398. # or for investigating suspected false positives.
  399. - alert-debug:
  400. enabled: no
  401. filename: alert-debug.log
  402. append: yes
  403. #filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
  404.  
  405. # alert output to prelude (https://www.prelude-siem.org/) only
  406. # available if Suricata has been compiled with --enable-prelude
  407. - alert-prelude:
  408. enabled: no
  409. profile: suricata
  410. log-packet-content: no
  411. log-packet-header: yes
  412.  
  413. # Stats.log contains data from various counters of the Suricata engine.
  414. - stats:
  415. enabled: yes
  416. filename: stats.log
  417. append: yes # append to file (yes) or overwrite it (no)
  418. totals: yes # stats for all threads merged together
  419. threads: no # per thread stats
  420. #null-values: yes # print counters that have value 0. Default: no
  421.  
  422. # a line based alerts log similar to fast.log into syslog
  423. - syslog:
  424. enabled: no
  425. # reported identity to syslog. If omitted the program name (usually
  426. # suricata) will be used.
  427. #identity: "suricata"
  428. facility: local5
  429. #level: Info ## possible levels: Emergency, Alert, Critical,
  430. ## Error, Warning, Notice, Info, Debug
  431.  
  432. # Output module for storing files on disk. Files are stored in
  433. # directory names consisting of the first 2 characters of the
  434. # SHA256 of the file. Each file is given its SHA256 as a filename.
  435. #
  436. # When a duplicate file is found, the timestamps on the existing file
  437. # are updated.
  438. #
  439. # Unlike the older filestore, metadata is not written by default
  440. # as each file should already have a "fileinfo" record in the
  441. # eve-log. If write-fileinfo is set to yes, then each file will have
  442. # one more associated .json files that consist of the fileinfo
  443. # record. A fileinfo file will be written for each occurrence of the
  444. # file seen using a filename suffix to ensure uniqueness.
  445. #
  446. # To prune the filestore directory see the "suricatactl filestore
  447. # prune" command which can delete files over a certain age.
  448. - file-store:
  449. version: 2
  450. enabled: no
  451.  
  452. # Set the directory for the filestore. Relative pathnames
  453. # are contained within the "default-log-dir".
  454. #dir: filestore
  455.  
  456. # Write out a fileinfo record for each occurrence of a file.
  457. # Disabled by default as each occurrence is already logged
  458. # as a fileinfo record to the main eve-log.
  459. #write-fileinfo: yes
  460.  
  461. # Force storing of all files. Default: no.
  462. #force-filestore: yes
  463.  
  464. # Override the global stream-depth for sessions in which we want
  465. # to perform file extraction. Set to 0 for unlimited; otherwise,
  466. # must be greater than the global stream-depth value to be used.
  467. #stream-depth: 0
  468.  
  469. # Uncomment the following variable to define how many files can
  470. # remain open for filestore by Suricata. Default value is 0 which
  471. # means files get closed after each write to the file.
  472. #max-open-files: 1000
  473.  
  474. # Force logging of checksums: available hash functions are md5,
  475. # sha1 and sha256. Note that SHA256 is automatically forced by
  476. # the use of this output module as it uses the SHA256 as the
  477. # file naming scheme.
  478. #force-hash: [sha1, md5]
  479. # NOTE: X-Forwarded configuration is ignored if write-fileinfo is disabled
  480. # HTTP X-Forwarded-For support by adding an extra field or overwriting
  481. # the source or destination IP address (depending on flow direction)
  482. # with the one reported in the X-Forwarded-For HTTP header. This is
  483. # helpful when reviewing alerts for traffic that is being reverse
  484. # or forward proxied.
  485. xff:
  486. enabled: no
  487. # Two operation modes are available, "extra-data" and "overwrite".
  488. mode: extra-data
  489. # Two proxy deployments are supported, "reverse" and "forward". In
  490. # a "reverse" deployment the IP address used is the last one, in a
  491. # "forward" deployment the first IP address is used.
  492. deployment: reverse
  493. # Header name where the actual IP address will be reported. If more
  494. # than one IP address is present, the last IP address will be the
  495. # one taken into consideration.
  496. header: X-Forwarded-For
  497.  
  498. # Log TCP data after stream normalization
  499. # Two types: file or dir:
  500. # - file logs into a single logfile.
  501. # - dir creates 2 files per TCP session and stores the raw TCP
  502. # data into them.
  503. # Use 'both' to enable both file and dir modes.
  504. #
  505. # Note: limited by "stream.reassembly.depth"
  506. - tcp-data:
  507. enabled: no
  508. type: file
  509. filename: tcp-data.log
  510.  
  511. # Log HTTP body data after normalization, de-chunking and unzipping.
  512. # Two types: file or dir.
  513. # - file logs into a single logfile.
  514. # - dir creates 2 files per HTTP session and stores the
  515. # normalized data into them.
  516. # Use 'both' to enable both file and dir modes.
  517. #
  518. # Note: limited by the body limit settings
  519. - http-body-data:
  520. enabled: no
  521. type: file
  522. filename: http-data.log
  523.  
  524. # Lua Output Support - execute lua script to generate alert and event
  525. # output.
  526. # Documented at:
  527. # https://suricata.readthedocs.io/en/latest/output/lua-output.html
  528. - lua:
  529. enabled: no
  530. #scripts-dir: /etc/suricata/lua-output/
  531. scripts:
  532. # - script1.lua
  533.  
  534. # Logging configuration. This is not about logging IDS alerts/events, but
  535. # output about what Suricata is doing, like startup messages, errors, etc.
  536. logging:
  537. # The default log level: can be overridden in an output section.
  538. # Note that debug level logging will only be emitted if Suricata was
  539. # compiled with the --enable-debug configure option.
  540. #
  541. # This value is overridden by the SC_LOG_LEVEL env var.
  542. default-log-level: notice
  543.  
  544. # The default output format. Optional parameter, should default to
  545. # something reasonable if not provided. Can be overridden in an
  546. # output section. You can leave this out to get the default.
  547. #
  548. # This value is overridden by the SC_LOG_FORMAT env var.
  549. #default-log-format: "[%i] %t - (%f:%l) <%d> (%n) -- "
  550.  
  551. # A regex to filter output. Can be overridden in an output section.
  552. # Defaults to empty (no filter).
  553. #
  554. # This value is overridden by the SC_LOG_OP_FILTER env var.
  555. default-output-filter:
  556.  
  557. # Requires libunwind to be available when Suricata is configured and built.
  558. # If a signal unexpectedly terminates Suricata, displays a brief diagnostic
  559. # message with the offending stacktrace if enabled.
  560. #stacktrace-on-signal: on
  561.  
  562. # Define your logging outputs. If none are defined, or they are all
  563. # disabled you will get the default: console output.
  564. outputs:
  565. - console:
  566. enabled: yes
  567. # type: json
  568. - file:
  569. enabled: yes
  570. level: info
  571. filename: suricata.log
  572. # type: json
  573. - syslog:
  574. enabled: no
  575. facility: local5
  576. format: "[%i] <%d> -- "
  577. # type: json
  578.  
  579.  
  580. ##
  581. ## Step 3: Configure common capture settings
  582. ##
  583. ## See "Advanced Capture Options" below for more options, including Netmap
  584. ## and PF_RING.
  585. ##
  586.  
  587. # Linux high speed capture support
  588. af-packet:
  589. - interface: enp34s0
  590. cluster-id: 97
  591. cluster-type: cluster_flow
  592. use-mmap: yes
  593. copy-mode: ips
  594. buffer-size: 64535
  595. # Number of receive threads. "auto" uses the number of cores
  596. threads: auto
  597. # Default clusterid. AF_PACKET will load balance packets based on flow.
  598. # cluster-id: 99
  599. # Default AF_PACKET cluster type. AF_PACKET can load balance per flow or per hash.
  600. # This is only supported for Linux kernel > 3.1
  601. # possible value are:
  602. # * cluster_flow: all packets of a given flow are sent to the same socket
  603. # * cluster_cpu: all packets treated in kernel by a CPU are sent to the same socket
  604. # * cluster_qm: all packets linked by network card to a RSS queue are sent to the same
  605. # socket. Requires at least Linux 3.14.
  606. # * cluster_ebpf: eBPF file load balancing. See doc/userguide/capture-hardware/ebpf-xdp.rst for
  607. # more info.
  608. # Recommended modes are cluster_flow on most boxes and cluster_cpu or cluster_qm on system
  609. # with capture card using RSS (requires cpu affinity tuning and system IRQ tuning)
  610. # cluster-type: cluster_flow
  611. # In some fragmentation cases, the hash can not be computed. If "defrag" is set
  612. # to yes, the kernel will do the needed defragmentation before sending the packets.
  613. # defrag: yes
  614. # To use the ring feature of AF_PACKET, set 'use-mmap' to yes
  615. #use-mmap: yes
  616. # Lock memory map to avoid it being swapped. Be careful that over
  617. # subscribing could lock your system
  618. #mmap-locked: yes
  619. # Use tpacket_v3 capture mode, only active if use-mmap is true
  620. # Don't use it in IPS or TAP mode as it causes severe latency
  621. #tpacket-v3: yes
  622. # Ring size will be computed with respect to "max-pending-packets" and number
  623. # of threads. You can set manually the ring size in number of packets by setting
  624. # the following value. If you are using flow "cluster-type" and have really network
  625. # intensive single-flow you may want to set the "ring-size" independently of the number
  626. # of threads:
  627. #ring-size: 2048
  628. # Block size is used by tpacket_v3 only. It should set to a value high enough to contain
  629. # a decent number of packets. Size is in bytes so please consider your MTU. It should be
  630. # a power of 2 and it must be multiple of page size (usually 4096).
  631. #block-size: 32768
  632. # tpacket_v3 block timeout: an open block is passed to userspace if it is not
  633. # filled after block-timeout milliseconds.
  634. #block-timeout: 10
  635. # On busy systems, set it to yes to help recover from a packet drop
  636. # phase. This will result in some packets (at max a ring flush) not being inspected.
  637. #use-emergency-flush: yes
  638. # recv buffer size, increased value could improve performance
  639. # buffer-size: 32768
  640. # Set to yes to disable promiscuous mode
  641. # disable-promisc: no
  642. # Choose checksum verification mode for the interface. At the moment
  643. # of the capture, some packets may have an invalid checksum due to
  644. # the checksum computation being offloaded to the network card.
  645. # Possible values are:
  646. # - kernel: use indication sent by kernel for each packet (default)
  647. # - yes: checksum validation is forced
  648. # - no: checksum validation is disabled
  649. # - auto: Suricata uses a statistical approach to detect when
  650. # checksum off-loading is used.
  651. # Warning: 'capture.checksum-validation' must be set to yes to have any validation
  652. #checksum-checks: kernel
  653. # BPF filter to apply to this interface. The pcap filter syntax applies here.
  654. #bpf-filter: port 80 or udp
  655. # You can use the following variables to activate AF_PACKET tap or IPS mode.
  656. # If copy-mode is set to ips or tap, the traffic coming to the current
  657. # interface will be copied to the copy-iface interface. If 'tap' is set, the
  658. # copy is complete. If 'ips' is set, the packet matching a 'drop' action
  659. # will not be copied.
  660. #copy-mode: ips
  661. #copy-iface: eth1
  662. # For eBPF and XDP setup including bypass, filter and load balancing, please
  663. # see doc/userguide/capture-hardware/ebpf-xdp.rst for more info.
  664.  
  665. # Put default values here. These will be used for an interface that is not
  666. # in the list above.
  667. # - interface: default
  668. #threads: auto
  669. #use-mmap: no
  670. #tpacket-v3: yes
  671.  
  672. # Cross platform libpcap capture support
  673. pcap:
  674. - interface: enp34s0
  675. # On Linux, pcap will try to use mmap'ed capture and will use "buffer-size"
  676. # as total memory used by the ring. So set this to something bigger
  677. # than 1% of your bandwidth.
  678. #buffer-size: 16777216
  679. #bpf-filter: "tcp and port 25"
  680. # Choose checksum verification mode for the interface. At the moment
  681. # of the capture, some packets may have an invalid checksum due to
  682. # the checksum computation being offloaded to the network card.
  683. # Possible values are:
  684. # - yes: checksum validation is forced
  685. # - no: checksum validation is disabled
  686. # - auto: Suricata uses a statistical approach to detect when
  687. # checksum off-loading is used. (default)
  688. # Warning: 'capture.checksum-validation' must be set to yes to have any validation
  689. #checksum-checks: auto
  690. # With some accelerator cards using a modified libpcap (like Myricom), you
  691. # may want to have the same number of capture threads as the number of capture
  692. # rings. In this case, set up the threads variable to N to start N threads
  693. # listening on the same interface.
  694. #threads: 16
  695. # set to no to disable promiscuous mode:
  696. #promisc: no
  697. # set snaplen, if not set it defaults to MTU if MTU can be known
  698. # via ioctl call and to full capture if not.
  699. #snaplen: 1518
  700. # Put default values here
  701. - interface: default
  702. #checksum-checks: auto
  703.  
  704. # Settings for reading pcap files
  705. pcap-file:
  706. # Possible values are:
  707. # - yes: checksum validation is forced
  708. # - no: checksum validation is disabled
  709. # - auto: Suricata uses a statistical approach to detect when
  710. # checksum off-loading is used. (default)
  711. # Warning: 'checksum-validation' must be set to yes to have checksum tested
  712. checksum-checks: auto
  713.  
  714. # See "Advanced Capture Options" below for more options, including Netmap
  715. # and PF_RING.
  716.  
  717.  
  718. ##
  719. ## Step 4: App Layer Protocol configuration
  720. ##
  721.  
  722. # Configure the app-layer parsers.
  723. #
  724. # The error-policy setting applies to all app-layer parsers. Values can be
  725. # "drop-flow", "pass-flow", "bypass", "drop-packet", "pass-packet", "reject" or
  726. # "ignore" (the default).
  727. #
  728. # The protocol's section details each protocol.
  729. #
  730. # The option "enabled" takes 3 values - "yes", "no", "detection-only".
  731. # "yes" enables both detection and the parser, "no" disables both, and
  732. # "detection-only" enables protocol detection only (parser disabled).
  733. app-layer:
  734. # error-policy: ignore
  735. protocols:
  736. rfb:
  737. enabled: yes
  738. detection-ports:
  739. dp: 5900, 5901, 5902, 5903, 5904, 5905, 5906, 5907, 5908, 5909
  740. # MQTT, disabled by default.
  741. mqtt:
  742. enabled: yes
  743. # max-msg-length: 1mb
  744. # subscribe-topic-match-limit: 100
  745. # unsubscribe-topic-match-limit: 100
  746. # Maximum number of live MQTT transactions per flow
  747. # max-tx: 4096
  748. krb5:
  749. enabled: yes
  750. snmp:
  751. enabled: yes
  752. ikev2:
  753. enabled: yes
  754. tls:
  755. enabled: yes
  756. detection-ports:
  757. dp: 443
  758.  
  759. # Generate JA3 fingerprint from client hello. If not specified it
  760. # will be disabled by default, but enabled if rules require it.
  761. #ja3-fingerprints: auto
  762.  
  763. # What to do when the encrypted communications start:
  764. # - default: keep tracking TLS session, check for protocol anomalies,
  765. # inspect tls_* keywords. Disables inspection of unmodified
  766. # 'content' signatures.
  767. # - bypass: stop processing this flow as much as possible. No further
  768. # TLS parsing and inspection. Offload flow bypass to kernel
  769. # or hardware if possible.
  770. # - full: keep tracking and inspection as normal. Unmodified content
  771. # keyword signatures are inspected as well.
  772. #
  773. # For best performance, select 'bypass'.
  774. #
  775. #encryption-handling: default
  776.  
  777. dcerpc:
  778. enabled: yes
  779. ftp:
  780. enabled: yes
  781. # memcap: 64mb
  782. rdp:
  783. enabled: yes
  784. ssh:
  785. enabled: yes
  786. #hassh: yes
  787. # HTTP2: Experimental HTTP 2 support. Disabled by default.
  788. http2:
  789. enabled: no
  790. # use http keywords on HTTP2 traffic
  791. http1-rules: no
  792. smtp:
  793. enabled: yes
  794. raw-extraction: no
  795. # Configure SMTP-MIME Decoder
  796. mime:
  797. # Decode MIME messages from SMTP transactions
  798. # (may be resource intensive)
  799. # This field supersedes all others because it turns the entire
  800. # process on or off
  801. decode-mime: yes
  802.  
  803. # Decode MIME entity bodies (ie. Base64, quoted-printable, etc.)
  804. decode-base64: yes
  805. decode-quoted-printable: yes
  806.  
  807. # Maximum bytes per header data value stored in the data structure
  808. # (default is 2000)
  809. header-value-depth: 2000
  810.  
  811. # Extract URLs and save in state data structure
  812. extract-urls: yes
  813. # Set to yes to compute the md5 of the mail body. You will then
  814. # be able to journalize it.
  815. body-md5: no
  816. # Configure inspected-tracker for file_data keyword
  817. inspected-tracker:
  818. content-limit: 100000
  819. content-inspect-min-size: 32768
  820. content-inspect-window: 4096
  821. imap:
  822. enabled: detection-only
  823. smb:
  824. enabled: yes
  825. detection-ports:
  826. dp: 139, 445
  827.  
  828. # Stream reassembly size for SMB streams. By default track it completely.
  829. #stream-depth: 0
  830.  
  831. nfs:
  832. enabled: yes
  833. tftp:
  834. enabled: yes
  835. dns:
  836. tcp:
  837. enabled: yes
  838. detection-ports:
  839. dp: 53
  840. udp:
  841. enabled: yes
  842. detection-ports:
  843. dp: 53
  844. http:
  845. enabled: yes
  846. # memcap: Maximum memory capacity for HTTP
  847. # Default is unlimited, values can be 64mb, e.g.
  848.  
  849. # default-config: Used when no server-config matches
  850. # personality: List of personalities used by default
  851. # request-body-limit: Limit reassembly of request body for inspection
  852. # by http_client_body & pcre /P option.
  853. # response-body-limit: Limit reassembly of response body for inspection
  854. # by file_data, http_server_body & pcre /Q option.
  855. #
  856. # For advanced options, see the user guide
  857.  
  858.  
  859. # server-config: List of server configurations to use if address matches
  860. # address: List of IP addresses or networks for this block
  861. # personality: List of personalities used by this block
  862. #
  863. # Then, all the fields from default-config can be overloaded
  864. #
  865. # Currently Available Personalities:
  866. # Minimal, Generic, IDS (default), IIS_4_0, IIS_5_0, IIS_5_1, IIS_6_0,
  867. # IIS_7_0, IIS_7_5, Apache_2
  868. libhtp:
  869. default-config:
  870. personality: IDS
  871.  
  872. # Can be specified in kb, mb, gb. Just a number indicates
  873. # it's in bytes.
  874. request-body-limit: 100kb
  875. response-body-limit: 100kb
  876.  
  877. # inspection limits
  878. request-body-minimal-inspect-size: 32kb
  879. request-body-inspect-window: 4kb
  880. response-body-minimal-inspect-size: 40kb
  881. response-body-inspect-window: 16kb
  882.  
  883. # response body decompression (0 disables)
  884. response-body-decompress-layer-limit: 2
  885.  
  886. # auto will use http-body-inline mode in IPS mode, yes or no set it statically
  887. http-body-inline: auto
  888.  
  889. # Decompress SWF files.
  890. # Two types: 'deflate', 'lzma', 'both' will decompress deflate and lzma
  891. # compress-depth:
  892. # Specifies the maximum amount of data to decompress,
  893. # set 0 for unlimited.
  894. # decompress-depth:
  895. # Specifies the maximum amount of decompressed data to obtain,
  896. # set 0 for unlimited.
  897. swf-decompression:
  898. enabled: yes
  899. type: both
  900. compress-depth: 100kb
  901. decompress-depth: 100kb
  902.  
  903. # Use a random value for inspection sizes around the specified value.
  904. # This lowers the risk of some evasion techniques but could lead
  905. # to detection change between runs. It is set to 'yes' by default.
  906. #randomize-inspection-sizes: yes
  907. # If "randomize-inspection-sizes" is active, the value of various
  908. # inspection size will be chosen from the [1 - range%, 1 + range%]
  909. # range
  910. # Default value of "randomize-inspection-range" is 10.
  911. #randomize-inspection-range: 10
  912.  
  913. # decoding
  914. double-decode-path: no
  915. double-decode-query: no
  916.  
  917. # Can enable LZMA decompression
  918. #lzma-enabled: false
  919. # Memory limit usage for LZMA decompression dictionary
  920. # Data is decompressed until dictionary reaches this size
  921. #lzma-memlimit: 1mb
  922. # Maximum decompressed size with a compression ratio
  923. # above 2048 (only LZMA can reach this ratio, deflate cannot)
  924. #compression-bomb-limit: 1mb
  925. # Maximum time spent decompressing a single transaction in usec
  926. #decompression-time-limit: 100000
  927.  
  928. server-config:
  929.  
  930. #- apache:
  931. # address: [192.168.1.0/24, 127.0.0.0/8, "::1"]
  932. # personality: Apache_2
  933. # # Can be specified in kb, mb, gb. Just a number indicates
  934. # # it's in bytes.
  935. # request-body-limit: 4096
  936. # response-body-limit: 4096
  937. # double-decode-path: no
  938. # double-decode-query: no
  939.  
  940. #- iis7:
  941. # address:
  942. # - 192.168.0.0/24
  943. # - 192.168.10.0/24
  944. # personality: IIS_7_0
  945. # # Can be specified in kb, mb, gb. Just a number indicates
  946. # # it's in bytes.
  947. # request-body-limit: 4096
  948. # response-body-limit: 4096
  949. # double-decode-path: no
  950. # double-decode-query: no
  951.  
  952. # Note: Modbus probe parser is minimalist due to the limited usage in the field.
  953. # Only Modbus message length (greater than Modbus header length)
  954. # and protocol ID (equal to 0) are checked in probing parser
  955. # It is important to enable detection port and define Modbus port
  956. # to avoid false positives
  957. modbus:
  958. # How many unanswered Modbus requests are considered a flood.
  959. # If the limit is reached, the app-layer-event:modbus.flooded; will match.
  960. #request-flood: 500
  961.  
  962. enabled: no
  963. detection-ports:
  964. dp: 502
  965. # According to MODBUS Messaging on TCP/IP Implementation Guide V1.0b, it
  966. # is recommended to keep the TCP connection opened with a remote device
  967. # and not to open and close it for each MODBUS/TCP transaction. In that
  968. # case, it is important to set the depth of the stream reassembling as
  969. # unlimited (stream.reassembly.depth: 0)
  970.  
  971. # Stream reassembly size for modbus. By default track it completely.
  972. stream-depth: 0
  973.  
  974. # DNP3
  975. dnp3:
  976. enabled: no
  977. detection-ports:
  978. dp: 20000
  979.  
  980. # SCADA EtherNet/IP and CIP protocol support
  981. enip:
  982. enabled: no
  983. detection-ports:
  984. dp: 44818
  985. sp: 44818
  986.  
  987. ntp:
  988. enabled: yes
  989.  
  990. dhcp:
  991. enabled: yes
  992.  
  993. sip:
  994. enabled: yes
  995.  
  996. # Limit for the maximum number of asn1 frames to decode (default 256)
  997. asn1-max-frames: 256
  998.  
  999. # Datasets default settings
  1000. # datasets:
  1001. # # Default fallback memcap and hashsize values for datasets in case these
  1002. # # were not explicitly defined.
  1003. # defaults:
  1004. # memcap: 100mb
  1005. # hashsize: 2048
  1006.  
  1007. ##############################################################################
  1008. ##
  1009. ## Advanced settings below
  1010. ##
  1011. ##############################################################################
  1012.  
  1013. ##
  1014. ## Run Options
  1015. ##
  1016.  
  1017. # Run Suricata with a specific user-id and group-id:
  1018. #run-as:
  1019. # user: suri
  1020. # group: suri
  1021.  
  1022. # Some logging modules will use that name in event as identifier. The default
  1023. # value is the hostname
  1024. #sensor-name: suricata
  1025.  
  1026. # Default location of the pid file. The pid file is only used in
  1027. # daemon mode (start Suricata with -D). If not running in daemon mode
  1028. # the --pidfile command line option must be used to create a pid file.
  1029. #pid-file: /var/run/suricata.pid
  1030.  
  1031. # Daemon working directory
  1032. # Suricata will change directory to this one if provided
  1033. # Default: "/"
  1034. #daemon-directory: "/"
  1035.  
  1036. # Umask.
  1037. # Suricata will use this umask if it is provided. By default it will use the
  1038. # umask passed on by the shell.
  1039. #umask: 022
  1040.  
  1041. # Suricata core dump configuration. Limits the size of the core dump file to
  1042. # approximately max-dump. The actual core dump size will be a multiple of the
  1043. # page size. Core dumps that would be larger than max-dump are truncated. On
  1044. # Linux, the actual core dump size may be a few pages larger than max-dump.
  1045. # Setting max-dump to 0 disables core dumping.
  1046. # Setting max-dump to 'unlimited' will give the full core dump file.
  1047. # On 32-bit Linux, a max-dump value >= ULONG_MAX may cause the core dump size
  1048. # to be 'unlimited'.
  1049.  
  1050. coredump:
  1051. max-dump: unlimited
  1052.  
  1053. # If the Suricata box is a router for the sniffed networks, set it to 'router'. If
  1054. # it is a pure sniffing setup, set it to 'sniffer-only'.
  1055. # If set to auto, the variable is internally switched to 'router' in IPS mode
  1056. # and 'sniffer-only' in IDS mode.
  1057. # This feature is currently only used by the reject* keywords.
  1058. host-mode: auto
  1059.  
  1060. # Number of packets preallocated per thread. The default is 1024. A higher number
  1061. # will make sure each CPU will be more easily kept busy, but may negatively
  1062. # impact caching.
  1063. #max-pending-packets: 1024
  1064.  
  1065. # Runmode the engine should use. Please check --list-runmodes to get the available
  1066. # runmodes for each packet acquisition method. Default depends on selected capture
  1067. # method. 'workers' generally gives best performance.
  1068. #runmode: autofp
  1069.  
  1070. # Specifies the kind of flow load balancer used by the flow pinned autofp mode.
  1071. #
  1072. # Supported schedulers are:
  1073. #
  1074. # hash - Flow assigned to threads using the 5-7 tuple hash.
  1075. # ippair - Flow assigned to threads using addresses only.
  1076. #
  1077. #autofp-scheduler: hash
  1078.  
  1079. # Preallocated size for each packet. Default is 1514 which is the classical
  1080. # size for pcap on Ethernet. You should adjust this value to the highest
  1081. # packet size (MTU + hardware header) on your system.
  1082. #default-packet-size: 1514
  1083.  
  1084. # Unix command socket that can be used to pass commands to Suricata.
  1085. # An external tool can then connect to get information from Suricata
  1086. # or trigger some modifications of the engine. Set enabled to yes
  1087. # to activate the feature. In auto mode, the feature will only be
  1088. # activated in live capture mode. You can use the filename variable to set
  1089. # the file name of the socket.
  1090. unix-command:
  1091. enabled: auto
  1092. #filename: custom.socket
  1093.  
  1094. # Magic file. The extension .mgc is added to the value here.
  1095. #magic-file: /usr/share/file/magic
  1096. #magic-file:
  1097.  
  1098. # GeoIP2 database file. Specify path and filename of GeoIP2 database
  1099. # if using rules with "geoip" rule option.
  1100. #geoip-database: /usr/share/GeoIP/GeoLite2-Country.mmdb
  1101.  
  1102. legacy:
  1103. uricontent: enabled
  1104.  
  1105. ##
  1106. ## Detection settings
  1107. ##
  1108.  
  1109. # Set the order of alerts based on actions
  1110. # The default order is pass, drop, reject, alert
  1111. # action-order:
  1112. # - pass
  1113. # - drop
  1114. # - reject
  1115. # - alert
  1116.  
  1117. # Define maximum number of possible alerts that can be triggered for the same
  1118. # packet. Default is 15
  1119. #packet-alert-max: 15
  1120.  
  1121. # IP Reputation
  1122. #reputation-categories-file: /etc/suricata/iprep/categories.txt
  1123. #default-reputation-path: /etc/suricata/iprep
  1124. #reputation-files:
  1125. # - reputation.list
  1126.  
  1127. # When run with the option --engine-analysis, the engine will read each of
  1128. # the parameters below, and print reports for each of the enabled sections
  1129. # and exit. The reports are printed to a file in the default log dir
  1130. # given by the parameter "default-log-dir", with engine reporting
  1131. # subsection below printing reports in its own report file.
  1132. engine-analysis:
  1133. # enables printing reports for fast-pattern for every rule.
  1134. rules-fast-pattern: yes
  1135. # enables printing reports for each rule
  1136. rules: yes
  1137.  
  1138. #recursion and match limits for PCRE where supported
  1139. pcre:
  1140. match-limit: 3500
  1141. match-limit-recursion: 1500
  1142.  
  1143. ##
  1144. ## Advanced Traffic Tracking and Reconstruction Settings
  1145. ##
  1146.  
  1147. # Host specific policies for defragmentation and TCP stream
  1148. # reassembly. The host OS lookup is done using a radix tree, just
  1149. # like a routing table so the most specific entry matches.
  1150. host-os-policy:
  1151. # Make the default policy windows.
  1152. windows: [0.0.0.0/0]
  1153. bsd: []
  1154. bsd-right: []
  1155. old-linux: []
  1156. linux: []
  1157. old-solaris: []
  1158. solaris: []
  1159. hpux10: []
  1160. hpux11: []
  1161. irix: []
  1162. macos: []
  1163. vista: []
  1164. windows2k3: []
  1165.  
  1166. # Defrag settings:
  1167.  
  1168. # The memcap-policy value can be "drop-packet", "pass-packet", "reject" or
  1169. # "ignore" (which is the default).
  1170. defrag:
  1171. memcap: 32mb
  1172. # memcap-policy: ignore
  1173. hash-size: 65536
  1174. trackers: 65535 # number of defragmented flows to follow
  1175. max-frags: 65535 # number of fragments to keep (higher than trackers)
  1176. prealloc: yes
  1177. timeout: 60
  1178.  
  1179. # Enable defrag per host settings
  1180. # host-config:
  1181. #
  1182. # - dmz:
  1183. # timeout: 30
  1184. # 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"]
  1185. #
  1186. # - lan:
  1187. # timeout: 45
  1188. # address:
  1189. # - 192.168.0.0/24
  1190. # - 192.168.10.0/24
  1191. # - 172.16.14.0/24
  1192.  
  1193. # Flow settings:
  1194. # By default, the reserved memory (memcap) for flows is 32MB. This is the limit
  1195. # for flow allocation inside the engine. You can change this value to allow
  1196. # more memory usage for flows.
  1197. # The hash-size determines the size of the hash used to identify flows inside
  1198. # the engine, and by default the value is 65536.
  1199. # At startup, the engine can preallocate a number of flows, to get better
  1200. # performance. The number of flows preallocated is 10000 by default.
  1201. # emergency-recovery is the percentage of flows that the engine needs to
  1202. # prune before clearing the emergency state. The emergency state is activated
  1203. # when the memcap limit is reached, allowing new flows to be created, but
  1204. # pruning them with the emergency timeouts (they are defined below).
  1205. # If the memcap is reached, the engine will try to prune flows
  1206. # with the default timeouts. If it doesn't find a flow to prune, it will set
  1207. # the emergency bit and it will try again with more aggressive timeouts.
  1208. # If that doesn't work, then it will try to kill the oldest flows using
  1209. # last time seen flows.
  1210. # The memcap can be specified in kb, mb, gb. Just a number indicates it's
  1211. # in bytes.
  1212. # The memcap-policy can be "drop-packet", "pass-packet", "reject" or "ignore"
  1213. # (which is the default).
  1214.  
  1215. flow:
  1216. memcap: 128mb
  1217. #memcap-policy: ignore
  1218. hash-size: 65536
  1219. prealloc: 10000
  1220. emergency-recovery: 30
  1221. #managers: 1 # default to one flow manager
  1222. #recyclers: 1 # default to one flow recycler thread
  1223.  
  1224. # This option controls the use of VLAN ids in the flow (and defrag)
  1225. # hashing. Normally this should be enabled, but in some (broken)
  1226. # setups where both sides of a flow are not tagged with the same VLAN
  1227. # tag, we can ignore the VLAN id's in the flow hashing.
  1228. vlan:
  1229. use-for-tracking: true
  1230.  
  1231. # Specific timeouts for flows. Here you can specify the timeouts that the
  1232. # active flows will wait to transit from the current state to another, on each
  1233. # protocol. The value of "new" determines the seconds to wait after a handshake or
  1234. # stream startup before the engine frees the data of that flow it doesn't
  1235. # change the state to established (usually if we don't receive more packets
  1236. # of that flow). The value of "established" is the amount of
  1237. # seconds that the engine will wait to free the flow if that time elapses
  1238. # without receiving new packets or closing the connection. "closed" is the
  1239. # amount of time to wait after a flow is closed (usually zero). "bypassed"
  1240. # timeout controls locally bypassed flows. For these flows we don't do any other
  1241. # tracking. If no packets have been seen after this timeout, the flow is discarded.
  1242. #
  1243. # There's an emergency mode that will become active under attack circumstances,
  1244. # making the engine to check flow status faster. This configuration variables
  1245. # use the prefix "emergency-" and work similar as the normal ones.
  1246. # Some timeouts doesn't apply to all the protocols, like "closed", for udp and
  1247. # icmp.
  1248.  
  1249. flow-timeouts:
  1250.  
  1251. default:
  1252. new: 30
  1253. established: 300
  1254. closed: 0
  1255. bypassed: 100
  1256. emergency-new: 10
  1257. emergency-established: 100
  1258. emergency-closed: 0
  1259. emergency-bypassed: 50
  1260. tcp:
  1261. new: 60
  1262. established: 600
  1263. closed: 60
  1264. bypassed: 100
  1265. emergency-new: 5
  1266. emergency-established: 100
  1267. emergency-closed: 10
  1268. emergency-bypassed: 50
  1269. udp:
  1270. new: 30
  1271. established: 300
  1272. bypassed: 100
  1273. emergency-new: 10
  1274. emergency-established: 100
  1275. emergency-bypassed: 50
  1276. icmp:
  1277. new: 30
  1278. established: 300
  1279. bypassed: 100
  1280. emergency-new: 10
  1281. emergency-established: 100
  1282. emergency-bypassed: 50
  1283.  
  1284. # Stream engine settings. Here the TCP stream tracking and reassembly
  1285. # engine is configured.
  1286. #
  1287. # stream:
  1288. # memcap: 64mb # Can be specified in kb, mb, gb. Just a
  1289. # # number indicates it's in bytes.
  1290. # memcap-policy: ignore # Can be "drop-flow", "pass-flow", "bypass",
  1291. # # "drop-packet", "pass-packet", "reject" or
  1292. # # "ignore" default is "ignore"
  1293. # checksum-validation: yes # To validate the checksum of received
  1294. # # packet. If csum validation is specified as
  1295. # # "yes", then packets with invalid csum values will not
  1296. # # be processed by the engine stream/app layer.
  1297. # # Warning: locally generated traffic can be
  1298. # # generated without checksum due to hardware offload
  1299. # # of checksum. You can control the handling of checksum
  1300. # # on a per-interface basis via the 'checksum-checks'
  1301. # # option
  1302. # prealloc-sessions: 2k # 2k sessions prealloc'd per stream thread
  1303. # midstream: false # don't allow midstream session pickups
  1304. # midstream-policy: ignore # Can be "drop-flow", "pass-flow", "bypass",
  1305. # # "drop-packet", "pass-packet", "reject" or
  1306. # # "ignore" default is "ignore"
  1307. # async-oneside: false # don't enable async stream handling
  1308. # inline: no # stream inline mode
  1309. # drop-invalid: yes # in inline mode, drop packets that are invalid with regards to streaming engine
  1310. # max-synack-queued: 5 # Max different SYN/ACKs to queue
  1311. # bypass: no # Bypass packets when stream.reassembly.depth is reached.
  1312. # # Warning: first side to reach this triggers
  1313. # # the bypass.
  1314. # liberal-timestamps: false # Treat all timestamps as if the Linux policy applies. This
  1315. # # means it's slightly more permissive. Enabled by default.
  1316. #
  1317. # reassembly:
  1318. # memcap: 256mb # Can be specified in kb, mb, gb. Just a number
  1319. # # indicates it's in bytes.
  1320. # memcap-policy: ignore # Can be "drop-flow", "pass-flow", "bypass",
  1321. # # "drop-packet", "pass-packet", "reject" or
  1322. # # "ignore" default is "ignore"
  1323. # depth: 1mb # Can be specified in kb, mb, gb. Just a number
  1324. # # indicates it's in bytes.
  1325. # toserver-chunk-size: 2560 # inspect raw stream in chunks of at least
  1326. # # this size. Can be specified in kb, mb,
  1327. # # gb. Just a number indicates it's in bytes.
  1328. # toclient-chunk-size: 2560 # inspect raw stream in chunks of at least
  1329. # # this size. Can be specified in kb, mb,
  1330. # # gb. Just a number indicates it's in bytes.
  1331. # randomize-chunk-size: yes # Take a random value for chunk size around the specified value.
  1332. # # This lowers the risk of some evasion techniques but could lead
  1333. # # to detection change between runs. It is set to 'yes' by default.
  1334. # randomize-chunk-range: 10 # If randomize-chunk-size is active, the value of chunk-size is
  1335. # # a random value between (1 - randomize-chunk-range/100)*toserver-chunk-size
  1336. # # and (1 + randomize-chunk-range/100)*toserver-chunk-size and the same
  1337. # # calculation for toclient-chunk-size.
  1338. # # Default value of randomize-chunk-range is 10.
  1339. #
  1340. # raw: yes # 'Raw' reassembly enabled or disabled.
  1341. # # raw is for content inspection by detection
  1342. # # engine.
  1343. #
  1344. # segment-prealloc: 2048 # number of segments preallocated per thread
  1345. #
  1346. # check-overlap-different-data: true|false
  1347. # # check if a segment contains different data
  1348. # # than what we've already seen for that
  1349. # # position in the stream.
  1350. # # This is enabled automatically if inline mode
  1351. # # is used or when stream-event:reassembly_overlap_different_data;
  1352. # # is used in a rule.
  1353. #
  1354. stream:
  1355. memcap: 64mb
  1356. #memcap-policy: ignore
  1357. checksum-validation: yes # reject incorrect csums
  1358. #midstream: false
  1359. #midstream-policy: ignore
  1360. inline: auto # auto will use inline mode in IPS mode, yes or no set it statically
  1361. reassembly:
  1362. memcap: 256mb
  1363. #memcap-policy: ignore
  1364. depth: 1mb # reassemble 1mb into a stream
  1365. toserver-chunk-size: 2560
  1366. toclient-chunk-size: 2560
  1367. randomize-chunk-size: yes
  1368. #randomize-chunk-range: 10
  1369. #raw: yes
  1370. #segment-prealloc: 2048
  1371. #check-overlap-different-data: true
  1372.  
  1373. # Host table:
  1374. #
  1375. # Host table is used by the tagging and per host thresholding subsystems.
  1376. #
  1377. host:
  1378. hash-size: 4096
  1379. prealloc: 1000
  1380. memcap: 32mb
  1381.  
  1382. # IP Pair table:
  1383. #
  1384. # Used by xbits 'ippair' tracking.
  1385. #
  1386. #ippair:
  1387. # hash-size: 4096
  1388. # prealloc: 1000
  1389. # memcap: 32mb
  1390.  
  1391. # Decoder settings
  1392.  
  1393. decoder:
  1394. # Teredo decoder is known to not be completely accurate
  1395. # as it will sometimes detect non-teredo as teredo.
  1396. teredo:
  1397. enabled: true
  1398. # ports to look for Teredo. Max 4 ports. If no ports are given, or
  1399. # the value is set to 'any', Teredo detection runs on _all_ UDP packets.
  1400. ports: $TEREDO_PORTS # syntax: '[3544, 1234]' or '3533' or 'any'.
  1401.  
  1402. # VXLAN decoder is assigned to up to 4 UDP ports. By default only the
  1403. # IANA assigned port 4789 is enabled.
  1404. vxlan:
  1405. enabled: true
  1406. ports: $VXLAN_PORTS # syntax: '[8472, 4789]' or '4789'.
  1407.  
  1408. # VNTag decode support
  1409. vntag:
  1410. enabled: false
  1411.  
  1412. # Geneve decoder is assigned to up to 4 UDP ports. By default only the
  1413. # IANA assigned port 6081 is enabled.
  1414. geneve:
  1415. enabled: true
  1416. ports: $GENEVE_PORTS # syntax: '[6081, 1234]' or '6081'.
  1417.  
  1418. # maximum number of decoder layers for a packet
  1419. # max-layers: 16
  1420.  
  1421. ##
  1422. ## Performance tuning and profiling
  1423. ##
  1424.  
  1425. # The detection engine builds internal groups of signatures. The engine
  1426. # allows us to specify the profile to use for them, to manage memory in an
  1427. # efficient way keeping good performance. For the profile keyword you
  1428. # can use the words "low", "medium", "high" or "custom". If you use custom,
  1429. # make sure to define the values in the "custom-values" section.
  1430. # Usually you would prefer medium/high/low.
  1431. #
  1432. # "sgh mpm-context", indicates how the staging should allot mpm contexts for
  1433. # the signature groups. "single" indicates the use of a single context for
  1434. # all the signature group heads. "full" indicates a mpm-context for each
  1435. # group head. "auto" lets the engine decide the distribution of contexts
  1436. # based on the information the engine gathers on the patterns from each
  1437. # group head.
  1438. #
  1439. # The option inspection-recursion-limit is used to limit the recursive calls
  1440. # in the content inspection code. For certain payload-sig combinations, we
  1441. # might end up taking too much time in the content inspection code.
  1442. # If the argument specified is 0, the engine uses an internally defined
  1443. # default limit. When a value is not specified, there are no limits on the recursion.
  1444. detect:
  1445. profile: medium
  1446. custom-values:
  1447. toclient-groups: 3
  1448. toserver-groups: 25
  1449. sgh-mpm-context: auto
  1450. inspection-recursion-limit: 3000
  1451. # If set to yes, the loading of signatures will be made after the capture
  1452. # is started. This will limit the downtime in IPS mode.
  1453. #delayed-detect: yes
  1454.  
  1455. prefilter:
  1456. # default prefiltering setting. "mpm" only creates MPM/fast_pattern
  1457. # engines. "auto" also sets up prefilter engines for other keywords.
  1458. # Use --list-keywords=all to see which keywords support prefiltering.
  1459. default: mpm
  1460.  
  1461. # the grouping values above control how many groups are created per
  1462. # direction. Port whitelisting forces that port to get its own group.
  1463. # Very common ports will benefit, as well as ports with many expensive
  1464. # rules.
  1465. grouping:
  1466. #tcp-whitelist: 53, 80, 139, 443, 445, 1433, 3306, 3389, 6666, 6667, 8080
  1467. #udp-whitelist: 53, 135, 5060
  1468.  
  1469. profiling:
  1470. # Log the rules that made it past the prefilter stage, per packet
  1471. # default is off. The threshold setting determines how many rules
  1472. # must have made it past pre-filter for that rule to trigger the
  1473. # logging.
  1474. #inspect-logging-threshold: 200
  1475. grouping:
  1476. dump-to-disk: false
  1477. include-rules: false # very verbose
  1478. include-mpm-stats: false
  1479.  
  1480. # Select the multi pattern algorithm you want to run for scan/search the
  1481. # in the engine.
  1482. #
  1483. # The supported algorithms are:
  1484. # "ac" - Aho-Corasick, default implementation
  1485. # "ac-bs" - Aho-Corasick, reduced memory implementation
  1486. # "ac-ks" - Aho-Corasick, "Ken Steele" variant
  1487. # "hs" - Hyperscan, available when built with Hyperscan support
  1488. #
  1489. # The default mpm-algo value of "auto" will use "hs" if Hyperscan is
  1490. # available, "ac" otherwise.
  1491. #
  1492. # The mpm you choose also decides the distribution of mpm contexts for
  1493. # signature groups, specified by the conf - "detect.sgh-mpm-context".
  1494. # Selecting "ac" as the mpm would require "detect.sgh-mpm-context"
  1495. # to be set to "single", because of ac's memory requirements, unless the
  1496. # ruleset is small enough to fit in memory, in which case one can
  1497. # use "full" with "ac". The rest of the mpms can be run in "full" mode.
  1498.  
  1499. mpm-algo: auto
  1500.  
  1501. # Select the matching algorithm you want to use for single-pattern searches.
  1502. #
  1503. # Supported algorithms are "bm" (Boyer-Moore) and "hs" (Hyperscan, only
  1504. # available if Suricata has been built with Hyperscan support).
  1505. #
  1506. # The default of "auto" will use "hs" if available, otherwise "bm".
  1507.  
  1508. spm-algo: auto
  1509.  
  1510. # Suricata is multi-threaded. Here the threading can be influenced.
  1511. threading:
  1512. set-cpu-affinity: no
  1513. # Tune cpu affinity of threads. Each family of threads can be bound
  1514. # to specific CPUs.
  1515. #
  1516. # These 2 apply to the all runmodes:
  1517. # management-cpu-set is used for flow timeout handling, counters
  1518. # worker-cpu-set is used for 'worker' threads
  1519. #
  1520. # Additionally, for autofp these apply:
  1521. # receive-cpu-set is used for capture threads
  1522. # verdict-cpu-set is used for IPS verdict threads
  1523. #
  1524. cpu-affinity:
  1525. - management-cpu-set:
  1526. cpu: [ 0 ] # include only these CPUs in affinity settings
  1527. - receive-cpu-set:
  1528. cpu: [ 0 ] # include only these CPUs in affinity settings
  1529. - worker-cpu-set:
  1530. cpu: [ "all" ]
  1531. mode: "exclusive"
  1532. # Use explicitly 3 threads and don't compute number by using
  1533. # detect-thread-ratio variable:
  1534. # threads: 3
  1535. prio:
  1536. low: [ 0 ]
  1537. medium: [ "1-2" ]
  1538. high: [ 3 ]
  1539. default: "medium"
  1540. #- verdict-cpu-set:
  1541. # cpu: [ 0 ]
  1542. # prio:
  1543. # default: "high"
  1544. #
  1545. # By default Suricata creates one "detect" thread per available CPU/CPU core.
  1546. # This setting allows controlling this behaviour. A ratio setting of 2 will
  1547. # create 2 detect threads for each CPU/CPU core. So for a dual core CPU this
  1548. # will result in 4 detect threads. If values below 1 are used, less threads
  1549. # are created. So on a dual core CPU a setting of 0.5 results in 1 detect
  1550. # thread being created. Regardless of the setting at a minimum 1 detect
  1551. # thread will always be created.
  1552. #
  1553. detect-thread-ratio: 1.0
  1554. #
  1555. # By default, the per-thread stack size is left to its default setting. If
  1556. # the default thread stack size is too small, use the following configuration
  1557. # setting to change the size. Note that if any thread's stack size cannot be
  1558. # set to this value, a fatal error occurs.
  1559. #
  1560. # Generally, the per-thread stack-size should not exceed 8MB.
  1561. #stack-size: 8mb
  1562.  
  1563. # Luajit has a strange memory requirement, its 'states' need to be in the
  1564. # first 2G of the process' memory.
  1565. #
  1566. # 'luajit.states' is used to control how many states are preallocated.
  1567. # State use: per detect script: 1 per detect thread. Per output script: 1 per
  1568. # script.
  1569. luajit:
  1570. states: 128
  1571.  
  1572. # Profiling settings. Only effective if Suricata has been built with
  1573. # the --enable-profiling configure flag.
  1574. #
  1575. profiling:
  1576. # Run profiling for every X-th packet. The default is 1, which means we
  1577. # profile every packet. If set to 1000, one packet is profiled for every
  1578. # 1000 received.
  1579. #sample-rate: 1000
  1580.  
  1581. # rule profiling
  1582. rules:
  1583.  
  1584. # Profiling can be disabled here, but it will still have a
  1585. # performance impact if compiled in.
  1586. enabled: yes
  1587. filename: rule_perf.log
  1588. append: yes
  1589.  
  1590. # Sort options: ticks, avgticks, checks, matches, maxticks
  1591. # If commented out all the sort options will be used.
  1592. #sort: avgticks
  1593.  
  1594. # Limit the number of sids for which stats are shown at exit (per sort).
  1595. limit: 10
  1596.  
  1597. # output to json
  1598. json: yes
  1599.  
  1600. # per keyword profiling
  1601. keywords:
  1602. enabled: yes
  1603. filename: keyword_perf.log
  1604. append: yes
  1605.  
  1606. prefilter:
  1607. enabled: yes
  1608. filename: prefilter_perf.log
  1609. append: yes
  1610.  
  1611. # per rulegroup profiling
  1612. rulegroups:
  1613. enabled: yes
  1614. filename: rule_group_perf.log
  1615. append: yes
  1616.  
  1617. # packet profiling
  1618. packets:
  1619.  
  1620. # Profiling can be disabled here, but it will still have a
  1621. # performance impact if compiled in.
  1622. enabled: yes
  1623. filename: packet_stats.log
  1624. append: yes
  1625.  
  1626. # per packet csv output
  1627. csv:
  1628.  
  1629. # Output can be disabled here, but it will still have a
  1630. # performance impact if compiled in.
  1631. enabled: no
  1632. filename: packet_stats.csv
  1633.  
  1634. # profiling of locking. Only available when Suricata was built with
  1635. # --enable-profiling-locks.
  1636. locks:
  1637. enabled: no
  1638. filename: lock_stats.log
  1639. append: yes
  1640.  
  1641. pcap-log:
  1642. enabled: no
  1643. filename: pcaplog_stats.log
  1644. append: yes
  1645.  
  1646. ##
  1647. ## Netfilter integration
  1648. ##
  1649.  
  1650. # When running in NFQ inline mode, it is possible to use a simulated
  1651. # non-terminal NFQUEUE verdict.
  1652. # This permits sending all needed packet to Suricata via this rule:
  1653. # iptables -I FORWARD -m mark ! --mark $MARK/$MASK -j NFQUEUE
  1654. # And below, you can have your standard filtering ruleset. To activate
  1655. # this mode, you need to set mode to 'repeat'
  1656. # If you want a packet to be sent to another queue after an ACCEPT decision
  1657. # set the mode to 'route' and set next-queue value.
  1658. # On Linux >= 3.1, you can set batchcount to a value > 1 to improve performance
  1659. # by processing several packets before sending a verdict (worker runmode only).
  1660. # On Linux >= 3.6, you can set the fail-open option to yes to have the kernel
  1661. # accept the packet if Suricata is not able to keep pace.
  1662. # bypass mark and mask can be used to implement NFQ bypass. If bypass mark is
  1663. # set then the NFQ bypass is activated. Suricata will set the bypass mark/mask
  1664. # on packet of a flow that need to be bypassed. The Nefilter ruleset has to
  1665. # directly accept all packets of a flow once a packet has been marked.
  1666. #nfq:
  1667. # mode: accept
  1668. # repeat-mark: 1
  1669. # repeat-mask: 1
  1670. # bypass-mark: 2
  1671. # bypass-mask: 2
  1672. # route-queue: 2
  1673. # batchcount: 20
  1674. # fail-open: yes
  1675.  
  1676. #nflog support
  1677. nflog:
  1678. # netlink multicast group
  1679. # (the same as the iptables --nflog-group param)
  1680. # Group 0 is used by the kernel, so you can't use it
  1681. - group: 2
  1682. # netlink buffer size
  1683. buffer-size: 18432
  1684. # put default value here
  1685. - group: default
  1686. # set number of packets to queue inside kernel
  1687. qthreshold: 1
  1688. # set the delay before flushing packet in the kernel's queue
  1689. qtimeout: 100
  1690. # netlink max buffer size
  1691. max-size: 20000
  1692.  
  1693. ##
  1694. ## Advanced Capture Options
  1695. ##
  1696.  
  1697. # General settings affecting packet capture
  1698. capture:
  1699. # disable NIC offloading. It's restored when Suricata exits.
  1700. # Enabled by default.
  1701. #disable-offloading: false
  1702. #
  1703. # disable checksum validation. Same as setting '-k none' on the
  1704. # commandline.
  1705. #checksum-validation: none
  1706.  
  1707. # Netmap support
  1708. #
  1709. # Netmap operates with NIC directly in driver, so you need FreeBSD 11+ which has
  1710. # built-in Netmap support or compile and install the Netmap module and appropriate
  1711. # NIC driver for your Linux system.
  1712. # To reach maximum throughput disable all receive-, segmentation-,
  1713. # checksum- offloading on your NIC (using ethtool or similar).
  1714. # Disabling TX checksum offloading is *required* for connecting OS endpoint
  1715. # with NIC endpoint.
  1716. # You can find more information at https://github.com/luigirizzo/netmap
  1717. #
  1718. netmap:
  1719. # To specify OS endpoint add plus sign at the end (e.g. "enp34s0+")
  1720. - interface: eth2
  1721. # Number of capture threads. "auto" uses number of RSS queues on interface.
  1722. # Warning: unless the RSS hashing is symmetrical, this will lead to
  1723. # accuracy issues.
  1724. #threads: auto
  1725. # You can use the following variables to activate netmap tap or IPS mode.
  1726. # If copy-mode is set to ips or tap, the traffic coming to the current
  1727. # interface will be copied to the copy-iface interface. If 'tap' is set, the
  1728. # copy is complete. If 'ips' is set, the packet matching a 'drop' action
  1729. # will not be copied.
  1730. # To specify the OS as the copy-iface (so the OS can route packets, or forward
  1731. # to a service running on the same machine) add a plus sign at the end
  1732. # (e.g. "copy-iface: enp34s0+"). Don't forget to set up a symmetrical enp34s0+ -> enp34s0
  1733. # for return packets. Hardware checksumming must be *off* on the interface if
  1734. # using an OS endpoint (e.g. 'ifconfig enp34s0 -rxcsum -txcsum -rxcsum6 -txcsum6' for FreeBSD
  1735. # or 'ethtool -K enp34s0 tx off rx off' for Linux).
  1736. #copy-mode: tap
  1737. #copy-iface: eth3
  1738. # Set to yes to disable promiscuous mode
  1739. # disable-promisc: no
  1740. # Choose checksum verification mode for the interface. At the moment
  1741. # of the capture, some packets may have an invalid checksum due to
  1742. # the checksum computation being offloaded to the network card.
  1743. # Possible values are:
  1744. # - yes: checksum validation is forced
  1745. # - no: checksum validation is disabled
  1746. # - auto: Suricata uses a statistical approach to detect when
  1747. # checksum off-loading is used.
  1748. # Warning: 'checksum-validation' must be set to yes to have any validation
  1749. #checksum-checks: auto
  1750. # BPF filter to apply to this interface. The pcap filter syntax apply here.
  1751. #bpf-filter: port 80 or udp
  1752. #- interface: eth3
  1753. #threads: auto
  1754. #copy-mode: tap
  1755. #copy-iface: eth2
  1756. # Put default values here
  1757. - interface: default
  1758.  
  1759. # PF_RING configuration: for use with native PF_RING support
  1760. # for more info see http://www.ntop.org/products/pf_ring/
  1761. pfring:
  1762. - interface: enp34s0
  1763. # Number of receive threads. If set to 'auto' Suricata will first try
  1764. # to use CPU (core) count and otherwise RSS queue count.
  1765. threads: auto
  1766.  
  1767. # Default clusterid. PF_RING will load balance packets based on flow.
  1768. # All threads/processes that will participate need to have the same
  1769. # clusterid.
  1770. cluster-id: 99
  1771.  
  1772. # Default PF_RING cluster type. PF_RING can load balance per flow.
  1773. # Possible values are:
  1774. # - cluster_flow: 6-tuple: <src ip, src_port, dst ip, dst port, proto, vlan>
  1775. # - cluster_inner_flow: 6-tuple: <src ip, src port, dst ip, dst port, proto, vlan>
  1776. # - cluster_inner_flow_2_tuple: 2-tuple: <src ip, dst ip >
  1777. # - cluster_inner_flow_4_tuple: 4-tuple: <src ip, src port, dst ip, dst port >
  1778. # - cluster_inner_flow_5_tuple: 5-tuple: <src ip, src port, dst ip, dst port, proto >
  1779. # - cluster_round_robin (NOT RECOMMENDED)
  1780. cluster-type: cluster_flow
  1781.  
  1782. # bpf filter for this interface
  1783. #bpf-filter: tcp
  1784.  
  1785. # If bypass is set then the PF_RING hw bypass is activated, when supported
  1786. # by the network interface. Suricata will instruct the interface to bypass
  1787. # all future packets for a flow that need to be bypassed.
  1788. #bypass: yes
  1789.  
  1790. # Choose checksum verification mode for the interface. At the moment
  1791. # of the capture, some packets may have an invalid checksum due to
  1792. # the checksum computation being offloaded to the network card.
  1793. # Possible values are:
  1794. # - rxonly: only compute checksum for packets received by network card.
  1795. # - yes: checksum validation is forced
  1796. # - no: checksum validation is disabled
  1797. # - auto: Suricata uses a statistical approach to detect when
  1798. # checksum off-loading is used. (default)
  1799. # Warning: 'checksum-validation' must be set to yes to have any validation
  1800. #checksum-checks: auto
  1801. # Second interface
  1802. #- interface: eth1
  1803. # threads: 3
  1804. # cluster-id: 93
  1805. # cluster-type: cluster_flow
  1806. # Put default values here
  1807. - interface: default
  1808. #threads: 2
  1809.  
  1810. # For FreeBSD ipfw(8) divert(4) support.
  1811. # Please make sure you have ipfw_load="YES" and ipdivert_load="YES"
  1812. # in /etc/loader.conf or kldload'ing the appropriate kernel modules.
  1813. # Additionally, you need to have an ipfw rule for the engine to see
  1814. # the packets from ipfw. For Example:
  1815. #
  1816. # ipfw add 100 divert 8000 ip from any to any
  1817. #
  1818. # N.B. This example uses "8000" -- this number must mach the values
  1819. # you passed on the command line, i.e., -d 8000
  1820. #
  1821. ipfw:
  1822.  
  1823. # Reinject packets at the specified ipfw rule number. This config
  1824. # option is the ipfw rule number AT WHICH rule processing continues
  1825. # in the ipfw processing system after the engine has finished
  1826. # inspecting the packet for acceptance. If no rule number is specified,
  1827. # accepted packets are reinjected at the divert rule which they entered
  1828. # and IPFW rule processing continues. No check is done to verify
  1829. # this will rule makes sense so care must be taken to avoid loops in ipfw.
  1830. #
  1831. ## The following example tells the engine to reinject packets
  1832. # back into the ipfw firewall AT rule number 5500:
  1833. #
  1834. # ipfw-reinjection-rule-number: 5500
  1835.  
  1836.  
  1837. napatech:
  1838. # When use_all_streams is set to "yes" the initialization code will query
  1839. # the Napatech service for all configured streams and listen on all of them.
  1840. # When set to "no" the streams config array will be used.
  1841. #
  1842. # This option necessitates running the appropriate NTPL commands to create
  1843. # the desired streams prior to running Suricata.
  1844. #use-all-streams: no
  1845.  
  1846. # The streams to listen on when auto-config is disabled or when and threading
  1847. # cpu-affinity is disabled. This can be either:
  1848. # an individual stream (e.g. streams: [0])
  1849. # or
  1850. # a range of streams (e.g. streams: ["0-3"])
  1851. #
  1852. streams: ["0-3"]
  1853.  
  1854. # Stream stats can be enabled to provide fine grain packet and byte counters
  1855. # for each thread/stream that is configured.
  1856. #
  1857. enable-stream-stats: no
  1858.  
  1859. # When auto-config is enabled the streams will be created and assigned
  1860. # automatically to the NUMA node where the thread resides. If cpu-affinity
  1861. # is enabled in the threading section. Then the streams will be created
  1862. # according to the number of worker threads specified in the worker-cpu-set.
  1863. # Otherwise, the streams array is used to define the streams.
  1864. #
  1865. # This option is intended primarily to support legacy configurations.
  1866. #
  1867. # This option cannot be used simultaneously with either "use-all-streams"
  1868. # or "hardware-bypass".
  1869. #
  1870. auto-config: yes
  1871.  
  1872. # Enable hardware level flow bypass.
  1873. #
  1874. hardware-bypass: yes
  1875.  
  1876. # Enable inline operation. When enabled traffic arriving on a given port is
  1877. # automatically forwarded out its peer port after analysis by Suricata.
  1878. #
  1879. inline: no
  1880.  
  1881. # Ports indicates which Napatech ports are to be used in auto-config mode.
  1882. # these are the port IDs of the ports that will be merged prior to the
  1883. # traffic being distributed to the streams.
  1884. #
  1885. # When hardware-bypass is enabled the ports must be configured as a segment.
  1886. # specify the port(s) on which upstream and downstream traffic will arrive.
  1887. # This information is necessary for the hardware to properly process flows.
  1888. #
  1889. # When using a tap configuration one of the ports will receive inbound traffic
  1890. # for the network and the other will receive outbound traffic. The two ports on a
  1891. # given segment must reside on the same network adapter.
  1892. #
  1893. # When using a SPAN-port configuration the upstream and downstream traffic
  1894. # arrives on a single port. This is configured by setting the two sides of the
  1895. # segment to reference the same port. (e.g. 0-0 to configure a SPAN port on
  1896. # port 0).
  1897. #
  1898. # port segments are specified in the form:
  1899. # ports: [0-1,2-3,4-5,6-6,7-7]
  1900. #
  1901. # For legacy systems when hardware-bypass is disabled this can be specified in any
  1902. # of the following ways:
  1903. #
  1904. # a list of individual ports (e.g. ports: [0,1,2,3])
  1905. #
  1906. # a range of ports (e.g. ports: [0-3])
  1907. #
  1908. # "all" to indicate that all ports are to be merged together
  1909. # (e.g. ports: [all])
  1910. #
  1911. # This parameter has no effect if auto-config is disabled.
  1912. #
  1913. ports: [0-1,2-3]
  1914.  
  1915. # When auto-config is enabled the hashmode specifies the algorithm for
  1916. # determining to which stream a given packet is to be delivered.
  1917. # This can be any valid Napatech NTPL hashmode command.
  1918. #
  1919. # The most common hashmode commands are: hash2tuple, hash2tuplesorted,
  1920. # hash5tuple, hash5tuplesorted and roundrobin.
  1921. #
  1922. # See Napatech NTPL documentation other hashmodes and details on their use.
  1923. #
  1924. # This parameter has no effect if auto-config is disabled.
  1925. #
  1926. hashmode: hash5tuplesorted
  1927.  
  1928. ##
  1929. ## Configure Suricata to load Suricata-Update managed rules.
  1930. ##
  1931.  
  1932. default-rule-path: /var/lib/suricata/rules
  1933. #default-rule-path: /etc/suricata/rules
  1934.  
  1935. rule-files:
  1936. - suricata.rules
  1937. - bittorrent.rules
  1938. - emerging-p2p.rules
  1939. # - emerging-p2p-2.rules
  1940.  
  1941. ##
  1942. ## Auxiliary configuration files.
  1943. ##
  1944.  
  1945. classification-file: /etc/suricata/classification.config
  1946. reference-config-file: /etc/suricata/reference.config
  1947. # threshold-file: /etc/suricata/threshold.config
  1948.  
  1949. ##
  1950. ## Include other configs
  1951. ##
  1952.  
  1953. # Includes: Files included here will be handled as if they were in-lined
  1954. # in this configuration file. Files with relative pathnames will be
  1955. # searched for in the same directory as this configuration file. You may
  1956. # use absolute pathnames too.
  1957. # You can specify more than 2 configuration files, if needed.
  1958. #include: include1.yaml
  1959. #include: include2.yaml
  1960.  
Add Comment
Please, Sign In to add comment